mlsanityData to 14 Oct 2026

Hidden in the Haystack: Smaller Needles are More Difficult for LLMs to Find

arXiv 2505.18148 ↗First posted 23 May 2025cs.CL cs.AI cs.LGcited by 7

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

  1. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  2. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  3. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  4. 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
  5. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  6. 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 573
  7. 2023Large Language Models Are Not Robust Multiple Choice Selectorscited by 486
  8. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 453
  9. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  10. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
  11. 2023LooGLE: Can Long-Context Language Models Understand Long Contexts?cited by 202
  12. 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 176
28 more
  1. 2022SCROLLS: Standardized CompaRison Over Long Language Sequencescited by 170
  2. 2024Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language Modelscited by 152
  3. 2025NoLiMa: Long-Context Evaluation Beyond Literal Matchingcited by 126
  4. 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 125
  5. 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 101
  6. 2024LongCite: Enabling LLMs to Generate Fine-grained Citations in Long-context QAcited by 81
  7. 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
  8. 2024Can Long-Context Language Models Subsume Retrieval, RAG, SQL, and More?cited by 56
  9. 2025MTRAG: A Multi-Turn Conversational Benchmark for Evaluating Retrieval-Augmented Generation Systemscited by 51
  10. 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 50
  11. 2025LongReason: A Synthetic Long-Context Reasoning Benchmark via Context Expansioncited by 50
  12. 2024Insights into LLM Long-Context Failures: When Transformers Know but Don't Tellcited by 36
  13. 2024ChemReasoner: Heuristic Search over a Large Language Model's Knowledge Space using Quantum-Chemical Feedbackcited by 33
  14. 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 31
  15. 2024PubTator 3.0: an AI-powered Literature Resource for Unlocking Biomedical Knowledgecited by 30
  16. 2025LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs -- No Silver Bullet for LC or RAG Routingcited by 29
  17. 2025CURIE: Evaluating LLMs On Multitask Scientific Long Context Understanding and Reasoningcited by 28
  18. 2021Simplified Data Wrangling with ir_datasetscited by 27
  19. 2023Primacy Effect of ChatGPTcited by 27
  20. 2024ToolBeHonest: A Multi-level Hallucination Diagnostic Benchmark for Tool-Augmented Large Language Modelscited by 25
  21. 2025U-NIAH: Unified RAG and LLM Evaluation for Long Context Needle-In-A-Haystackcited by 20
  22. 2024From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Datacited by 18
  23. 2025InfiniteICL: Breaking the Limit of Context Window Size via Long Short-term Memory Transformationcited by 17
  24. 2025More Documents, Same Length: Isolating the Challenge of Multiple Documents in RAGcited by 16
  25. 2024AnaloBench: Benchmarking the Identification of Abstract and Long-context Analogiescited by 13
  26. 2024Understanding Synthetic Context Extension via Retrieval Headscited by 10
  27. 2025arXiv2Table: Toward Realistic Benchmarking and Evaluation for LLM-Based Literature-Review Table Generationcited by 6
  28. 2025DocPuzzle: A Process-Aware Benchmark for Evaluating Realistic Long-Context Reasoning Capabilitiescited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 6.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Context-Length Robustness in Question Answering Models: A Comparative Empirical Study
  2. 2024Large Language Models Can Self-Improve in Long-context Reasoning
  3. 2025Systematic Evaluation of Optimization Techniques for Long-Context Language Models
  4. 2026Positional Failures in Long-Context LLMs: A Blind Spot in Reasoning Benchmarks
  5. 2025Haystack Engineering: Context Engineering for Heterogeneous and Agentic Long-Context Evaluation
  6. 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models
  7. 2024Leave No Document Behind: Benchmarking Long-Context LLMs with Extended Multi-Doc QA
  8. 2024ALR2: A Retrieve-then-Reason Framework for Long-context Question Answering