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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bianchi, Owen, Koretsky, Mathew J., Willey, Maya, Alvarado, Chelsea X., Nayak, Tanay, Asija, Adi, Kuznetsov, Nicole, Nalls, Mike A., Faghri, Faraz, Khashabi, Daniel
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915679939067904
author Bianchi, Owen
Koretsky, Mathew J.
Willey, Maya
Alvarado, Chelsea X.
Nayak, Tanay
Asija, Adi
Kuznetsov, Nicole
Nalls, Mike A.
Faghri, Faraz
Khashabi, Daniel
author_facet Bianchi, Owen
Koretsky, Mathew J.
Willey, Maya
Alvarado, Chelsea X.
Nayak, Tanay
Asija, Adi
Kuznetsov, Nicole
Nalls, Mike A.
Faghri, Faraz
Khashabi, Daniel
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2505_18148
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Hidden in the Haystack: Smaller Needles are More Difficult for LLMs to Find
Bianchi, Owen
Koretsky, Mathew J.
Willey, Maya
Alvarado, Chelsea X.
Nayak, Tanay
Asija, Adi
Kuznetsov, Nicole
Nalls, Mike A.
Faghri, Faraz
Khashabi, Daniel
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Hidden in the Haystack: Smaller Needles are More Difficult for LLMs to Find
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2505.18148