Large Language Models Can Be Easily Distracted by Irrelevant Context
GSM-IC shows LLMs are easily distracted; SC and ignore-the-noise instructions partly recover accuracy.
Key Findings
Methodology
The authors sample 1,000 GSM8K training problems as a development pool, then select 100 base problems that are solvable by at least one prompting method. For each base problem, they insert one syntactically natural but answer-preserving irrelevant sentence via templates, controlling three orthogonal factors: topic (in-topic vs. off-topic), role-name overlap, and number range. This yields GSM-IC with 58,052 examples. They evaluate COT, 0-COT, LTM, PROGRAM, and self-consistency (SC) on code-davinci-002 and text-davinci-003 using micro accuracy, macro accuracy, and normalized accuracy.
Key Results
- On GSM-IC-4K, every prompting method degrades sharply. For code-davinci-002, COT reaches 72.4 micro / 6.0 macro, LTM 77.5 / 18.0, PROGRAM 54.4 / 5.0, and 0-COT only 29.0 / 1.0. The very low macro scores show that many originally solvable problems stop being consistently solved once a single distractor sentence is added.
- SC is the strongest mitigation. With code-davinci-002, LTM+SC jumps to 93.4 micro and 45.0 macro; COT+SC reaches 88.1 / 30.0. The paper also reports that with 20 samples per problem, the recall of the correct answer can reach 99.7%, meaning the right solution is almost always present among sampled reasoning paths.
- Adding distractors to exemplars and explicitly instructing the model to ignore irrelevant information both improve robustness. Factor analysis suggests that number magnitude alone matters little, whereas lexical/role overlap with the original problem strongly increases susceptibility. text-davinci-003 often has better normalized micro accuracy, but macro accuracy remains weak, indicating that RLHF does not eliminate distractibility.
Significance
This paper turns a vague intuition—models can be “distracted”—into a measurable robustness problem. That matters because many real-world tasks are not clean exams: they contain side remarks, chat history, footnotes, and incidental numbers. The study therefore fills an important gap between benchmark performance and practical reliability. For academia, GSM-IC adds a missing evaluation axis: not only can a model solve hard problems, but can it identify what to ignore? For industry, the implications are immediate for tutoring systems, assistants, customer support, and any workflow where irrelevant context can trigger wrong calculations or wrong evidence selection.
Technical Contribution
The contribution is primarily methodological and diagnostic rather than a new model architecture. First, GSM-IC isolates distractibility by preserving the original problem and appending a guaranteed-answer-preserving irrelevant sentence, decoupling noise sensitivity from task reformulation. Second, the paper introduces micro, macro, and normalized accuracy, where macro is especially strict because a base problem is counted correct only if all of its distractor variants are solved correctly. Third, it provides a unified evaluation of COT, 0-COT, LTM, PROGRAM, and SC, plus two practical mitigations: distractor-bearing exemplars and an explicit ignore-instructions prompt. Together, these pieces form a concrete framework for studying context selection in LLM reasoning.
Novelty
The novelty lies in studying distraction through additive, answer-preserving context rather than paraphrase, perturbation, or adversarial rewriting. This is closer to real usage, where irrelevant information is often present without changing the task itself. The paper is also unusually systematic: it disentangles topic, name overlap, and numeric range, and it evaluates both prompting paradigms and mitigation strategies. In short, it is one of the first works to make irrelevant-context sensitivity a first-class benchmark for arithmetic reasoning.
Limitations
- The benchmark is built from only 100 base problems, and those are selected from the easier subset of GSM8K, so the conclusions mainly reflect distractibility on accessible arithmetic reasoning rather than on broader multi-step reasoning. The small base set also means that some estimates, especially macro accuracy, can be sensitive to dataset composition.
- The distractors are template-generated and manually checked, which ensures control but limits realism. Real-world irrelevant context can be longer, subtler, and discourse-dependent, so performance on GSM-IC may not fully predict behavior on natural documents or conversations.
- SC improves results substantially, but it does so by sampling 20 candidates per problem, which increases inference cost. It is a retrieval-by-rerun remedy, not a principled solution to relevance filtering.
Future Work
The authors point toward extending this line of work to more challenging reasoning tasks and to methods that explicitly teach models to ignore irrelevant information. A natural next step is training-time robustness: fine-tuning or instruction tuning on distractor-rich data, possibly combined with decomposition or tool use, so that relevance filtering becomes a learned capability rather than a prompting trick. Broader benchmarks across languages, longer contexts, and richer noise types are also needed.
AI Executive Summary
Large language models have become impressively good at exam-style reasoning, but this paper asks a more unsettling question: what happens when the question contains a small amount of irrelevant but natural-looking text? To probe that, the authors introduce GSM-IC, a new benchmark built from GSM8K by appending one answer-preserving distractor sentence to each problem. The setup is deliberately simple: the task stays the same, only the context becomes noisier, so any performance drop can be blamed on distractibility rather than task change.
The benchmark is then used to test four major prompting families—chain-of-thought (COT), zero-shot chain-of-thought (0-COT), least-to-most prompting (LTM), and program prompting (PROGRAM)—on two OpenAI models, code-davinci-002 and text-davinci-003. The headline result is sobering: performance falls sharply across the board. On GSM-IC-4K, code-davinci-002 with COT scores 72.4 micro accuracy but only 6.0 macro accuracy; LTM does better at 77.5 micro, yet macro is still only 18.0. Macro accuracy is the stricter metric here: a problem counts only if all distractor variants are solved, so the low scores reveal instability rather than isolated mistakes.
The paper also shows that the weakness is not hopeless. Self-consistency (SC), which samples multiple reasoning paths and majority-votes the answer, dramatically improves robustness. With code-davinci-002, LTM+SC reaches 93.4 micro and 45.0 macro, while the correct answer recall can rise to 99.7% with 20 samples. Another surprisingly effective fix is to teach by example: when the prompt exemplars themselves include irrelevant context, or when the prompt explicitly says “feel free to ignore irrelevant information,” performance consistently improves. The authors further find that raw number magnitude in the distractor matters little; lexical and role-name overlap with the original problem matters much more.
Beyond the numbers, the paper makes a conceptual point with broad consequences. Current LLM evaluations often assume every sentence in the input matters, yet real-world tasks rarely work that way. Emails, documents, chat logs, and support tickets all contain side information that must be filtered out before reasoning begins. GSM-IC therefore shifts the field’s attention from “Can the model solve the problem?” to “Can it find the problem inside the noise?” That is a crucial step toward trustworthy assistants.
The limitations are equally important. The benchmark uses only 100 base problems, drawn from an easier GSM8K subset, and the distractors are template-generated. SC also boosts performance at extra compute cost rather than teaching true robustness. Even so, the study gives the community a valuable testbed and a warning: strong reasoning scores do not automatically imply strong context understanding.
Deep Analysis
Background
Recent progress in LLM reasoning has been driven by prompting methods such as few-shot prompting, COT (Wei et al., 2022), 0-COT (Kojima et al., 2022), LTM (Zhou et al., 2022), program prompting (Chowdhery et al., 2022), and self-consistency (Wang et al., 2022c). On GSM8K, these methods can solve many arithmetic problems without finetuning. However, most benchmarks assume that every sentence in the input is relevant. Psychology and NLP both suggest this is unrealistic: irrelevant information can degrade human reasoning and can mislead models in QA, factual reasoning, code generation, and syntactic generalization. This paper targets that missing regime directly.
Core Problem
The problem is to measure and mitigate distractibility: how much does an LLM’s answer change when a semantically irrelevant sentence is inserted into an otherwise solvable math problem? The challenge is not merely robustness to paraphrase or noise, because the distractor must be answer-preserving, fluent, and plausibly related to the problem. The authors therefore separate relevance filtering from reasoning itself, asking whether models can ignore unnecessary context while preserving the original solution.
Innovation
The paper contributes three main innovations. First, GSM-IC constructs distractor-augmented arithmetic problems by appending one irrelevant sentence to GSM8K items, keeping the gold answer unchanged. This design is conceptually clean: any degradation reflects failure of context selection. Second, the evaluation uses micro accuracy, macro accuracy, and normalized accuracy; macro is especially informative because it measures whether the model is consistently correct across all distractor variants of the same base problem. Third, the paper studies practical mitigation strategies—SC, distractor-bearing exemplars, and explicit ignore instructions—rather than only diagnosing the weakness. That combination makes the work both diagnostic and actionable.
Methodology
- �� Base set construction: sample 1,000 GSM8K training problems, then choose 100 base problems that at least one of the investigated prompting methods can solve. These are relatively easy arithmetic tasks, requiring 2 to 7 reasoning steps.\n\n• Distractor generation: for each base problem, add one template-generated sentence containing irrelevant information. The distractor is varied along three axes: topic (in-topic vs. off-topic), role-name overlap (e.g., A’s father), and numeric range (in-range vs. out-of-range). The authors manually verify grammaticality and answer preservation.\n\n• Prompting methods: evaluate COT, 0-COT, LTM, and PROGRAM. COT uses exemplars with intermediate reasoning; 0-COT uses only the instruction “Let’s think step by step”; LTM decomposes the problem into subproblems; PROGRAM encodes reasoning as executable Python and runs it with an external interpreter.\n\n• Self-consistency: sample 20 reasoning traces at temperature 0.7 and take majority vote. This is orthogonal to the prompting method and can be applied to each of them.\n\n• In-context mitigation: compare prompts whose exemplars are clean versus exemplars that themselves contain irrelevant context. Also prepend an instruction: “Solve grade school math problems. Feel free to ignore irrelevant information given in the questions.”\n\n• Metrics: micro accuracy averages over all examples; macro accuracy requires all distractor variants of a base problem to be correct; normalized accuracy divides distractor-set accuracy by base-problem accuracy, isolating relative robustness.
Experiments
Experiments are run on GSM-IC-4K, a uniformly sampled 4,000-example subset covering all 100 base problems. The main model is code-davinci-002; text-davinci-003 is used to test whether instruction-following RLHF changes the picture. Without SC, greedy decoding is used (temperature 0). With SC, the authors sample 20 completions per problem at temperature 0.7. They compare clean exemplars against distractor-bearing exemplars and also test an explicit ignore instruction. Table 2 reports base accuracies on the 100-problem set, such as 95.0 for COT, 94.0 for LTM, 83.0 for PROGRAM, and 44.0 for 0-COT on code-davinci-002; SC raises these to 96.0, 99.0, 91.0, and 76.0 respectively.
Results
The core finding is a large and consistent drop in performance once irrelevant context is added. For code-davinci-002 on GSM-IC-4K, COT achieves 72.4 micro / 6.0 macro, LTM 77.5 / 18.0, PROGRAM 54.4 / 5.0, and 0-COT 29.0 / 1.0. Even methods that look decent in micro accuracy are unstable in macro accuracy, meaning they do not reliably solve all distractor variants of the same base problem. The paper notes that fewer than 18% of base problems are consistently solved across all distractor types under greedy decoding.\n\nSC substantially improves robustness. On code-davinci-002, COT+SC reaches 88.1 micro / 30.0 macro, LTM+SC reaches 93.4 / 45.0, and PROGRAM+SC reaches 74.6 / 13.0. The paper highlights a 99.7% correct-answer recall with 20 samples, showing that multiple draws can recover the right answer almost always.\n\nMitigation through prompt design also works. Using exemplars that themselves include distractors, or explicitly instructing the model to ignore irrelevant information, consistently boosts performance, and does not hurt the original GSM8K set. Factor analysis suggests that lexical overlap is more harmful than numeric range, giving a mechanistic clue about where the model’s attention goes wrong.
Applications
In the short term, GSM-IC is a diagnostic benchmark for any LLM application that must reason over verbose input: tutoring systems, customer support, workflow assistants, and document QA. It helps developers detect whether a model can separate signal from noise before deploying it on long, messy contexts. It is also useful for prompt engineering, because it reveals whether adding an explicit ignore instruction or distractor-rich exemplars improves reliability.
Limitations & Outlook
Finally, the study is centered on two API models and English-only prompts. A broader picture would require open models, more languages, and longer, discourse-level distractors that resemble real emails, webpages, or conversations.
Key Concepts
Irrelevant Context
Any added text that does not change the gold answer but can mislead the model. The paper’s central stress test is built around this idea.
Normalized Accuracy
Accuracy divided by the base-problem accuracy, used to measure how much distractors hurt relative to the model’s starting strength.
Instruction Tuning / Ignore Instruction
A prompt-level directive telling the model to disregard irrelevant information. The paper finds this simple instruction helps in practice.
Prompt Exemplar
A worked example placed in the prompt to demonstrate the desired reasoning style. Exemplar choice matters: clean versus distractor-bearing examples lead to different robustness.
Lexical Overlap
The amount of shared wording between distractor and original problem. Higher overlap makes the distractor more confusing and more harmful.
Open Questions Unanswered questions from this research
- 1 What internal mechanism actually drives distractibility—attention drift, spurious lexical association, or number confusion? The paper documents the symptom and some correlates, but not a full causal account. Answering this likely requires mechanistic analysis of hidden states, attention, or symbolic intermediates.
- 2 How can models be trained to ignore irrelevant context by default, rather than being patched at inference time with SC or prompt instructions? This remains open because the best practical fix may differ from the best learnable objective.
Applications
Immediate Applications
LLM safety check for noisy inputs
Researchers and product teams can rapidly test whether a model is robust to chatty, cluttered, or annotated inputs before shipping it to users.
Benchmark design
The benchmark offers a template for building more realistic evaluations where relevance selection matters as much as raw problem solving.
Long-term Vision
Noise-robust assistant behavior
The longer-term vision is assistants that can reliably ignore distractions in emails, documents, and retrieval results, improving trust in enterprise and consumer settings.
Abstract
Large language models have achieved impressive performance on various natural language processing tasks. However, so far they have been evaluated primarily on benchmarks where all information in the input context is relevant for solving the task. In this work, we investigate the distractibility of large language models, i.e., how the model problem-solving accuracy can be influenced by irrelevant context. In particular, we introduce Grade-School Math with Irrelevant Context (GSM-IC), an arithmetic reasoning dataset with irrelevant information in the problem description. We use this benchmark to measure the distractibility of cutting-edge prompting techniques for large language models, and find that the model performance is dramatically decreased when irrelevant information is included. We also identify several approaches for mitigating this deficiency, such as decoding with self-consistency and adding to the prompt an instruction that tells the language model to ignore the irrelevant information.