Checklist IOAI Indonesia 2025 OSN 2025 AI Exhibition – Final · P4 task
Shuffled Documents
Indonesian title: Acak Dokumen
Re-pair the first and second paragraphs of Indonesian two-paragraph documents after the second halves were shuffled.
The task
Documents in Indonesian on various topics consist of exactly two paragraphs stored in lists first and second; the second list has been shuffled. The contestant completes predict_pair(first_list, second_list), returning for each first[i] the index of its matching second paragraph.
A development set of 25 documents with answers is provided (afaji/wikipair-dev); the graded test set of 300 documents (afaji/wikipair-test) was opened only in the last hour of the contest.
Abridged and translated by SOTA from the official Indonesian materials. The official statement has the exact rules, and it wins wherever this summary differs.
In English
This task was published in Indonesian. SOTA translated its 2 files into English on 17 September 2026. Only the words changed in the notebooks: markdown, code comments, messages and printed output. The code, file names and paths are the original's, so a translated notebook runs with the original data.
- Task notebook Indonesian original of Task notebook
- Task statement (printed notebook, PDF pp. 20–22) Indonesian original of Task statement (printed notebook, PDF pp. 20–22)
Read the task notebook in English
Shuffled Documents
Aji has been assigned to send documents containing important information that will become part of an effort to document human knowledge and experience, in case this civilisation one day disappears. These documents contain Indonesian-language writing on various topics, and each is guaranteed to consist of 2 paragraphs. For security reasons, the first and second paragraphs are stored in different lists, namely the lists first and second.
However, Ammar played a prank on Aji's computer system, and the list of second paragraphs has now been shuffled! In other words, the partner of first[i] is no longer guaranteed to be second[i]. Now Aji is asking for your help to restore the original pairs of these documents!
Reading the Data
The code fragment below is there to help download the file. It does not need to be changed; just run it!
from datasets import load_dataset
def read_wikipair_texts(base):
ds = load_dataset(base)
first = [str(x) for x in list(ds["first_part"]["text"]) if x is not None]
second = [str(x) for x in list(ds["second_part"]["text"]) if x is not None]
return first, second
The following is the process for downloading the data. In this case, we use the development set, or dev data, which contains only 25 documents.
These are NOT the documents that will be used for scoring.
first, second = read_wikipair_texts("afaji/wikipair-dev")
Let us look at an example.
You can see that the first and second data do not match as pairs!
Your task is to match them up again.
import textwrap
print("First 1\n", textwrap.fill(first[0], width=80))
print("First 2\n", textwrap.fill(first[1], width=80))
print("---")
print("Second 1\n", textwrap.fill(second[0], width=80))
print("Second 2\n", textwrap.fill(second[1], width=80))
For example, for the dev data, the partner of first[0] is second[11]. This can be seen below:
print(textwrap.fill(first[0], width=80))
print()
print(textwrap.fill(second[11], width=80))
YOUR TASK
Determine the correct pairs between the paragraphs in the lists first and second. Complete the following function: given the lists first_list and second_list, return a list of indices.
The value at position i in the answer list must be the index in second of the partner of first[i].
For example, for the dev data, the output at position 0 is 11
import random
# TODO: COMPLETE THIS FUNCTION
# given a first paragraph text and a list of second paragraphs, return the most likely pair index
def predict_pair(first_list: list[str], second_list: list[str]):
answer = []
N = len(first_list)
for i in range(N):
answer.append(random.randint(0, N - 1))
return answer
Making Predictions on the Dev Data
The function fragment below makes predictions on all the data and, if the labels are given, also computes the accuracy.
def run_and_evaluate(first, second, golds):
preds = predict_pair(first, second)
# print accuracy from a list of gold label
if golds is not None:
correct = 0
for i in range(len(preds)):
if preds[i] == golds[i]:
correct += 1
print("Accuracy:", 100 * correct / len(preds), "%")
Let us call the evaluation function. Note that the answer key is available only for the dev data.
# golds is indexed from 1 - N, so we offset by 1
golds = [(int(x) - 1) for x in load_dataset("afaji/wikipair-dev-answer")['answer']['label']]
run_and_evaluate(first, second, golds)
SCORING: Making Predictions on the Test Data
Your actual task is to match the documents in the test data, which contains 300 documents in total.
However, for security reasons, and so that Ammar does not play pranks again, Aji will only open access to this data in the last hour of the competition! In the meantime, you can experiment with the dev data above first!
So the following part of the program can only be run in the last hour!
first_test, second_test = read_wikipair_texts("afaji/wikipair-test")
run_and_evaluate(first_test, second_test, None)
Scoring
The participant with the best accuracy will receive a perfect score (100). The baseline accuracy is 0%. Participants whose accuracy is equal to or lower than the baseline will receive 0.
Otherwise, participants receive a normalised score:
100 * (participant_accuracy - baseline) / (best_participant - baseline)
The baseline is 0%
Translated by SOTA. The Indonesian original is the official version and wins wherever the two differ. The documents to be paired are Indonesian text, so the printed data samples stay in Indonesian. The PDF prints all four programming problems of the final; the English statement covers the pages of this problem. If you organise this olympiad and would like the translation removed, email [email protected] and we will take it down.
At a glance
- You get
- Hugging Face datasets afaji/wikipair-dev (with answers) and afaji/wikipair-test.
- You submit
- A list of indices, one per first paragraph.
- Scoring
- Accuracy of the predicted pairings.
- Format
- Final (on-site) of the AI Exhibition at OSN 2025, Universitas Muhammadiyah Malang, 6–10 October 2025: an essay paper and programming tasks in Google Colab.