Access GSM Distractor Triplets
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
This is an evaluation set built from GSM8K (MIT, OpenAI) and GSM-IC (Shi et al., 2023). The GSM-IC distractor sentences are reproduced with attribution; the GSM-IC repository states no license. By requesting access you agree to use the dataset for research and evaluation, to keep the attribution to both sources, and not to train or fine-tune models on its dev or test problems.
Log in or Sign Up to review the conditions and access this dataset content.
GSM Distractor Triplets
320 grade-school math word problems. Each problem comes in three versions that differ by exactly one sentence:
| Condition | What is added | Example |
|---|---|---|
clean |
nothing | Peter has 4 boxes … Martha has 7 boxes … If Peter and Martha have totals of 64 and 56 chocolate bars respectively, how many more chocolate bars does Peter have in each box than Martha? |
numeric |
an irrelevant sentence that contains a number | … A local bakery displays 11 almond cookies. If Peter and Martha have … |
neutral |
the same sentence with the number replaced by a non-quantity word | … A local bakery displays fresh almond cookies. If Peter and Martha have … |
The answer is identical in all three versions (here: 8). numeric vs clean measures how much an irrelevant sentence hurts. numeric vs neutral isolates the effect of the number itself, because the two added sentences have the same subject, structure and word count.
Quick start
Access is gated: accept the terms on this page, then authenticate (hf auth login, or set HF_TOKEN).
from datasets import load_dataset
triplets = load_dataset("dnouv/gsm-distractor-triplets") # default config: dev / test
variants = load_dataset("dnouv/gsm-distractor-triplets", "variants") # one row per prompt
fewshot = load_dataset("dnouv/gsm-distractor-triplets", "fewshot", split="train")
row = triplets["test"][0]
row["clean_question"], row["numeric_question"], row["neutral_question"], row["answer"]
Composition
| Split | Problems | Source | Prompts (variants) |
|---|---|---|---|
dev |
20 | GSM-IC (12 two-step, 8 multi-step) | 60 |
test |
300 | GSM-IC (48 two-step, 32 multi-step) + 220 GSM8K test | 900 |
| total | 320 | 100 GSM-IC + 220 GSM8K | 960 |
- GSM-IC problems (100). All 100 base problems of GSM-IC (Shi et al., 2023), which GSM-IC drew from the GSM8K training set: 60 two-step and 40 multi-step (3–7 steps). The numeric sentence is one of GSM-IC's own published distractors. All selected GSM-IC distractors are GSM-IC
out_topicsentences. - GSM8K problems (220). Problems from the official GSM8K test set (Cobbe et al., 2021), each kept verbatim by GSM8K-Platinum with the same answer (207
consensus, 13verified). The added sentences come from a fixed bank of 20 generic, off-topic template pairs (listed below), used 11 times each. devandtestshare no problem and no near-duplicate. Answers are all integers (1 to 845,640). Reasoning length ranges from 1 to 8 arithmetic steps (median 3).
Configs and fields
triplets (default): one row per problem
| Field | Type | Description |
|---|---|---|
id |
string | Stable problem ID: gsmic_<hash> or gsm8k_<hash>, a SHA-256 prefix of the source question text. |
clean_question |
string | The problem with nothing added. |
numeric_question |
string | clean_question with numeric_sentence inserted. |
neutral_question |
string | clean_question with neutral_sentence inserted at the same position. |
answer |
int | Reference answer, the same for all three versions. |
numeric_sentence |
string | The added sentence containing the distractor number. |
neutral_sentence |
string | The matched sentence without a number (same word count). |
distractor_number |
int | The number in numeric_sentence. |
source |
string | GSM-IC or GSM8K. |
gsm_ic_subset |
string? | 2-step or multi-step for GSM-IC problems, null for GSM8K. |
arithmetic_steps |
int | GSM-IC: its n_steps. GSM8K: the number of calculator annotations in the reference solution. |
template_id |
string | gsmic01–gsmic05 or bank01–bank20 (see Added sentences). |
distractor_source |
string | GSM-IC (the published GSM-IC sentence) or template_bank. |
insertion_position |
string | before_final_question for 319 problems. One problem is before_antecedent_of_final_question (see Edits to source text). |
insertion_offset |
int | Character offset in clean_question where the sentence is inserted: numeric_question == clean_question[:k] + numeric_sentence + " " + clean_question[k:]. |
source_item_id |
string | validation:<i>: row i (0-based) of GSM-IC's gsm8k_validation.jsonl. test:<i>: row i of GSM8K test.jsonl. |
source_url |
string | Link to the source file at the pinned commit (GSM8K links include the line). |
source_question |
string | The source question text. It equals clean_question except for 10 GSM-IC problems. |
gsm8k_platinum_status |
string? | GSM8K-Platinum cleaning_status (consensus / verified). Null for GSM-IC. |
gsm_ic_row_index |
int? | Row in GSM-IC_2step.json / GSM-IC_mstep.json whose distractor sentence was used. |
gsm_ic_role_label, gsm_ic_number_label, gsm_ic_sentence_label |
string? | GSM-IC's labels for that sentence: role overlapped/nonoverlapped, number in_range/out_range, sentence out_topic. |
variants: one row per (problem, condition)
The same data in long form, ready to send to a model. Fields: id (<problem id>:<condition>), base_id, condition (clean / numeric / neutral), question, answer, added_sentence, distractor_number (numeric only), insertion_offset, template_id, source, gsm_ic_subset, arithmetic_steps. For clean rows, the added-sentence fields are null.
fewshot: four exemplars (split train)
Four GSM8K train problems for building a fixed few-shot prompt. None of them is a near-duplicate of any problem in dev or test. Fields: id, question, solution (the GSM8K reference solution, including <<a*b=c>> calculator annotations and the final #### n line), answer, source_item_id (train:<i>).
Construction
The dataset is built by a deterministic script (seed 42) from pinned sources:
| Source | Revision |
|---|---|
| openai/grade-school-math (GSM8K) | 3101c7d5072418e28b9008a6636bde82a006892c |
| google-research-datasets/GSM-IC | 0c1da13552afcc5d995d6f1ad5288417cb110246 |
| madrylab/gsm8k-platinum | e762492455a1cf7967de89f05b6bef72fc713b66 |
Text normalisation. Invisible and control characters are removed, and unusual Unicode spaces become ASCII spaces. Visible wording, including source double spaces after full stops, is unchanged.
GSM-IC problems. For each of the 100 base problems, the builder keeps the GSM-IC variants that meet three conditions. The variant's sentence template must have a neutral counterpart. Its number must not appear in the question or equal the answer. GSM-IC must have placed the sentence before the final question. One variant is then picked by seeded hash. The 20
devproblems (12 two-step, 8 multi-step) are also chosen by seeded hash.GSM8K problems. Test problems are visited in a seeded order. A problem is skipped if any of the following holds:
- its reference-solution arithmetic does not check out;
- it is a near-duplicate of a GSM-IC problem, a few-shot exemplar or an already chosen problem;
- no distractor number is available;
- GSM8K-Platinum does not keep it verbatim with the same answer;
- its answer is ambiguous. One problem was excluded for this, because its wording supports two totals.
Template pairs are assigned round-robin. The distractor number is drawn from a fixed pool (3, 7, 9, 11, 12, 14, 15, 18, 20, 24, 25, 30, 36, 40, 45, 50, 60, 75, 80, 90). It never equals a number in the question, an intermediate result of the reference solution, or the answer.
Insertion. The added sentence goes directly before the final question sentence, at the same offset in
numericandneutral. Sentence boundaries ignore abbreviations such as Mr., Mrs., Dr., a.m. and p.m. A final question that opens with this/that is/was … refers to the previous sentence, so the addition is placed before that sentence instead (1 problem).
Added sentences
The neutral sentence swaps the number for a non-quantity modifier. It never contains digits, number words or quantity words (such as few, several, pair or dozen). It always has exactly the same word count as the numeric sentence.
GSM-IC templates (numeric side from GSM-IC; {role} is GSM-IC's person):
| ID | Numeric (GSM-IC) | Neutral | Uses |
|---|---|---|---|
| gsmic01 | The shoe size of {role} is {number}. | The shoe style of {role} is casual. | 18 |
| gsmic02 | {role} bought {number} tomatoes from the grocery store. | {role} bought fresh tomatoes from the grocery store. | 30 |
| gsmic03 | The height of {role} is {number} feet. | The height of {role} is fairly average. | 20 |
| gsmic04 | {role} is {number} years old. | {role} is a retired adult. | 17 |
| gsmic05 | {role} has read {number} books in the past year. | {role} has read paperback books in the past year. | 15 |
Template bank (GSM8K problems, 11 uses each):
| ID | Numeric | Neutral |
|---|---|---|
| bank01 | A nearby library has {number} wooden chairs. | A nearby library has polished wooden chairs. |
| bank02 | The shop across the road sells {number} umbrellas. | The shop across the road sells colourful umbrellas. |
| bank03 | A local bakery displays {number} almond cookies. | A local bakery displays fresh almond cookies. |
| bank04 | The community centre owns {number} acoustic guitars. | The community centre owns polished acoustic guitars. |
| bank05 | A nearby cafe serves {number} mango drinks. | A nearby cafe serves chilled mango drinks. |
| bank06 | The school office stores {number} blue folders. | The school office stores sturdy blue folders. |
| bank07 | A neighbourhood flower shop stocks {number} tulip bouquets. | A neighbourhood flower shop stocks fragrant tulip bouquets. |
| bank08 | The sports club keeps {number} badminton rackets. | The sports club keeps spare badminton rackets. |
| bank09 | A nearby studio displays {number} landscape paintings. | A nearby studio displays abstract landscape paintings. |
| bank10 | The corner store carries {number} jasmine teas. | The corner store carries fragrant jasmine teas. |
| bank11 | A local museum exhibits {number} ceramic bowls. | A local museum exhibits glazed ceramic bowls. |
| bank12 | The workshop beside the park repairs {number} bicycles. | The workshop beside the park repairs vintage bicycles. |
| bank13 | A nearby bookshop stocks {number} travel guides. | A nearby bookshop stocks illustrated travel guides. |
| bank14 | The neighbourhood pool has {number} lane ropes. | The neighbourhood pool has floating lane ropes. |
| bank15 | A nearby restaurant serves {number} pumpkin soups. | A nearby restaurant serves creamy pumpkin soups. |
| bank16 | The community hall contains {number} folding tables. | The community hall contains sturdy folding tables. |
| bank17 | A local clothing shop displays {number} cotton shirts. | A local clothing shop displays patterned cotton shirts. |
| bank18 | The shop near the station sells {number} canvas bags. | The shop near the station sells durable canvas bags. |
| bank19 | A nearby gallery exhibits {number} charcoal sketches. | A nearby gallery exhibits detailed charcoal sketches. |
| bank20 | The classroom next door has {number} swivel chairs. | The classroom next door has padded swivel chairs. |
Bank subjects are places, not people, so a following he/she in the question cannot refer to them.
Edits to source text
Apart from normalisation, the source text is changed in only two ways:
- 10 GSM-IC problems: pronoun replaced by a name. In these problems the added sentence introduces a person, such as Jack's brother, directly before a bare he/she in the question. The pronoun is replaced by the protagonist's name in all three versions. For example, How much did he pay? becomes How much did Jack pay? Eight of the replacements follow GSM-IC's own wording for the same problem, and two (
gsmic_c573b9a19b27a95d,gsmic_e87070071a3112ad) apply the same substitution. The original text is kept insource_question, and the answers are unchanged. - 1 GSM8K problem: insertion moved earlier.
gsm8k_4721af5b47d5297easks If this is 3 quarters of …, where this refers to the previous sentence. The added sentence goes before that sentence, so this cannot point at the distractor.
Quality control
- Answers. Every
clean_questionwas re-solved independently, without access to the reference answer. All 320 results agree withanswer. Every GSM8K problem is also kept unchanged, with the same answer, in GSM8K-Platinum. GSM8K-Platinum is a cleaned GSM8K test set: each problem was run through several frontier models, and any problem a model got wrong was reviewed by hand. - Triplet text. Every
numericandneutralversion was read for grammar, for what pronouns and this/that refer to, and for whether the added sentence could bear on the computation. No open issues remain. - Automated checks (33). The builder checks the following, and all checks pass:
- each sentence sits exactly at its insertion offset, and removing it gives back
clean_question; - the neutral sentence has no quantity and the same word count as the numeric one;
- the distractor number does not collide with the question, its solution steps or the answer;
- the reference-solution arithmetic of each GSM8K problem holds;
- there are no duplicates or near-duplicates, and no problem crosses splits;
- each problem maps back to its pinned source file (checked by hash);
- every GSM8K problem is in GSM8K-Platinum.
- each sentence sits exactly at its insertion offset, and removing it gives back
Limitations and known quirks
- Distractor style. All added sentences are off-topic: GSM-IC
out_topicsentences, and generic place-based templates for GSM8K. Effects measured here may not transfer to on-topic or more plausible distractors. - Two sources, two constructions. GSM-IC and GSM8K problems differ in origin, selection and distractor wording, not only in difficulty. Compare conditions within a source and report each source separately.
- Length is matched in words, not tokens. Numeric and neutral sentences always have the same word count. Large GSM-IC
out_rangenumbers (up to 390,200) can still make the numeric version noticeably longer in tokens. With common tokenizers, 6 GSM-IC problems differ by more than 10%. - Source wording is kept as published, including these three quirks that do not affect the answer:
gsm8k_87eb24d76991fe4cintroduces Kim and then asks about Lucas;gsmic_166358bd8a4880ecsays Julia and then Julie;gsm8k_e49b9105c273e5adlists a towing package without a price (the answer, 43,500, is the GSM8K and GSM8K-Platinum answer).
- Contamination. GSM8K and GSM-IC are public and widely used, so models may have seen the source problems in training.
- Size. With 100 GSM-IC and 220 GSM8K problems, per-source estimates have wide confidence intervals. Resampling by problem (
id) is recommended.
Licensing
This dataset combines material under different terms:
- GSM8K text: all 320 base problems and the few-shot exemplars. MIT License, © 2021 OpenAI. GSM-IC's base problems are GSM8K training problems.
- GSM-IC distractor sentences: the
numeric_sentenceof the 100 GSM-IC problems, and the 8 name substitutions that follow GSM-IC wording. These come from GSM-IC by Shi et al. (2023). The GSM-IC repository states no license and asks users to cite the paper, so they are reproduced here with that attribution. gsm8k_platinum_status: taken from GSM8K-Platinum, whose annotations are licensed CC BY-SA 4.0.- Everything else, including the neutral sentences, the template bank, the two other name substitutions and the remaining metadata, is released under the MIT License.
Access is gated so that users acknowledge these terms before downloading.
Citation
If you use this dataset, please cite the sources:
@article{cobbe2021gsm8k,
title = {Training Verifiers to Solve Math Word Problems},
author = {Cobbe, Karl and Kosaraju, Vineet and Bavarian, Mohammad and Chen, Mark and Jun, Heewoo and Kaiser, Lukasz and Plappert, Matthias and Tworek, Jerry and Hilton, Jacob and Nakano, Reiichiro and Hesse, Christopher and Schulman, John},
journal = {arXiv preprint arXiv:2110.14168},
year = {2021}
}
@inproceedings{shi2023large,
title = {Large Language Models Can Be Easily Distracted by Irrelevant Context},
author = {Shi, Freda and Chen, Xinyun and Misra, Kanishka and Scales, Nathan and Dohan, David and Chi, Ed H. and Sch{\"a}rli, Nathanael and Zhou, Denny},
booktitle = {Proceedings of the 40th International Conference on Machine Learning},
year = {2023}
}
@misc{vendrow2025largelanguagemodelbenchmarks,
title = {Do Large Language Model Benchmarks Test Reliability?},
author = {Joshua Vendrow and Edward Vendrow and Sara Beery and Aleksander Madry},
year = {2025},
eprint = {2502.03461},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2502.03461}
}
- Downloads last month
- 12