Hidden in the Haystack: Smaller Needles are More Difficult for LLMs to Find
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) face significant challenges with needle-in-ahaystack tasks, where relevant information ("the needle") must be drawn from a large pool of irrelevant context ("the haystack"). Previous studies have highlighted positional bias and distractor quantity as critical factors affecting model performance, yet the influence of gold context size, the length of the answer-containing document, has received little attention. We present the first systematic study of gold context size in long-context question answering, spanning three diverse benchmarks (general knowledge, biomedical reasoning, and mathematical reasoning), eleven state-of-the-art LLMs (including recent reasoning models), and more than 150K controlled runs. Our experiments reveal that LLM performance drops sharply when the gold context is shorter, i.e., smaller gold contexts consistently degrade model performance and amplify positional sensitivity, posing a major challenge for agentic systems that must integrate scattered, fine-grained information of varying lengths. This effect persists under rigorous confounder analysis: even after controlling for gold context position, answer token repetition, gold-to-distractor ratio, distractor volume, and domain specificity, gold context size remains a decisive, independent predictor of success. Our work provides clear insights to guide the design of robust, context-aware LLM-driven systems.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 40 of its 55 references that are in the map. First posted on arXiv 23 May 2025.
Builds on
40 of 55 references.
References · 40
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 573
- 2023Large Language Models Are Not Robust Multiple Choice Selectorscited by 486
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2023LooGLE: Can Long-Context Language Models Understand Long Contexts?cited by 202
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 176
28 more
- 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
- 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Modelscited by 152
- 2025NoLiMa: Long-Context Evaluation Beyond Literal Matchingcited by 126
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 125
- 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 101
- 2024LongCite: Enabling LLMs to Generate Fine-grained Citations in Long-context QAcited by 81
- 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
- 2024Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?cited by 56
- 2025MTRAG: A Multi-Turn Conversational Benchmark for Evaluating Retrieval-Augmented Generation Systemscited by 51
- 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 50
- 2025LongReason: A Synthetic Long-Context Reasoning Benchmark via Context Expansioncited by 50
- 2024Insights into LLM Long-Context Failures: When Transformers Know but Don't Tellcited by 36
- 2024ChemReasoner: Heuristic Search over a Large Language Model's Knowledge Space using Quantum-Chemical Feedbackcited by 33
- 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 31
- 2024PubTator 3.0: an AI-powered Literature Resource for Unlocking Biomedical Knowledgecited by 30
- 2025LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs -- No Silver Bullet for LC or RAG Routingcited by 29
- 2025CURIE: Evaluating LLMs On Multitask Scientific Long Context Understanding and Reasoningcited by 28
- 2021Simplified Data Wrangling with ir_datasetscited by 27
- 2023Primacy Effect of ChatGPTcited by 27
- 2024ToolBeHonest: A Multi-level Hallucination Diagnostic Benchmark for Tool-Augmented Large Language Modelscited by 25
- 2025U-NIAH: Unified RAG and LLM Evaluation for Long Context Needle-In-A-Haystackcited by 20
- 2024From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Datacited by 18
- 2025InfiniteICL: Breaking the Limit of Context Window Size via Long Short-term Memory Transformationcited by 17
- 2025More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAGcited by 16
- 2024AnaloBench: Benchmarking the Identification of Abstract and Long-context Analogiescited by 13
- 2024Understanding Synthetic Context Extension via Retrieval Headscited by 10
- 2025arXiv2Table: Toward Realistic Benchmarking and Evaluation for LLM-Based Literature-Review Table Generationcited by 6
- 2025DocPuzzle: A Process-Aware Benchmark for Evaluating Realistic Long-Context Reasoning Capabilitiescited by 4
Built on by
Citing papers per year: 2025: 1; 2026: 6.
7 papers.
- 2025Context Is What You Need: The Maximum Effective Context Window for Real World Limits of LLMscited by 12
- 2026MemDelta: Controlled Baselines and Hidden Confounds in Agent Memory Evaluationcited by 3
- 2026Are Finer Citations Always Better? Rethinking Granularity for Attributed Generationcited by 2
- 2026Evaluating Relational Reasoning in LLMs with RELcited by 2
- 2026Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledgecited by 1
- 2026The First Drop of Ink: Nonlinear Impact of Distracting Information in Long-Context Reasoningcited by 0
- 2026Asking Questions the Right Way: A Multi-Agent Conversational System for Prompt Formulation in Complex Task Resolutioncited by 0
- 2026Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledge12 Aug 2026
- 2026Asking Questions the Right Way: A Multi-Agent Conversational System for Prompt Formulation in Complex Task Resolution2 Aug 2026
- 2026MemDelta: Controlled Baselines and Hidden Confounds in Agent Memory Evaluation29 Jun 2026
- 2026The First Drop of Ink: Nonlinear Impact of Distracting Information in Long-Context Reasoning11 May 2026
- 2026Evaluating Relational Reasoning in LLMs with REL14 Apr 2026
- 2026Are Finer Citations Always Better? Rethinking Granularity for Attributed Generation1 Apr 2026
- 2025Context Is What You Need: The Maximum Effective Context Window for Real World Limits of LLMs21 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2026Context-Length Robustness in Question Answering Models: A Comparative Empirical Study
- 2024Large Language Models Can Self-Improve in Long-context Reasoning
- 2025Systematic Evaluation of Optimization Techniques for Long-Context Language Models
- 2026Positional Failures in Long-Context LLMs: A Blind Spot in Reasoning Benchmarks
- 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation
- 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models
- 2024Leave No Document Behind: Benchmarking Long-Context LLMs with Extended Multi-Doc QA
- 2024ALR2: A Retrieve-then-Reason Framework for Long-context Question Answering