Context Length Alone Hurts LLM Performance Despite Perfect Retrieval

Yufeng Du, Minyang Tian, S. Ronanki, Subendhu Rongali, S. Bodapati, A.G. Galstyan, Azton Wells, Roy Schwartz, E. Huerta, Hao Peng

arXiv:2510.05381 · 2026-07-27 공개 · arXiv · PDF

long-context retrieval-augmented question-answering model-agnostic llm-performance ruler-benchmark coding-tasks prompting-strategy

Abstract

Large language models (LLMs) often fail to scale their performance on long-context tasks performance in line with the context lengths they support. This gap is commonly attributed to retrieval failures -- the models'inability to identify relevant information in the long inputs. Accordingly, recent efforts often focus on evaluating and improving LLMs'retrieval performance: if retrieval is perfect, a model should, in principle, perform just as well on a long input as it does on a short one -- or should it? This paper presents findings that the answer to this question may be negative. Our systematic experiments across 5 open- and closed-source LLMs on math, question answering, and coding tasks reveal that, even when models can perfectly retrieve all relevant information, their performance still degrades substantially (13.9%--85%) as input length increases but remains well within the models'claimed lengths. This failure occurs even when the irrelevant tokens are replaced with minimally distracting whitespace, and, more surprisingly, when they are all masked and the models are forced to attend only to the relevant tokens. A similar performance drop is observed when all relevant evidence is placed immediately before the question. Our findings reveal a previously-unrealized limitation: the sheer length of the input alone can hurt LLM performance, independent of retrieval quality and without any distraction. They motivate our simple, model-agnostic mitigation strategy that transforms a long-context task into a short-context one by prompting the model to recite the retrieved evidence before attempting to solve the problem. On RULER, we observe a consistent improvement of GPT-4o up to 4% on an already strong baseline.

한국어 요약

한 줄 요약

긴 입력 길이 자체가 LLM의 성능을 저하시키며, 이는 단순한 검색 실패와 무관하다.

핵심 기여도

핵심 아이디어

기존 연구는 LLM이 긴 문맥 작업에서 실패하는 원인을 주로 "검색 실패"로 보았으나, 본 연구는 **입력 길이 자체가 성능 저하를 유발할 수 있음을 밝힘**.
LLM이 모든 관련 정보를 완벽히 검색(100% 정확도)해도, 입력 길이가 늘어날수록 정확도가 감소하는 현상이 관찰됨.
이를 증명하기 위해, 불필요한 토큰을 **공백** 또는 **마스킹**하여 모델이 관련 정보에만 집중하도록 했음에도 불구하고, 성능 저하가 지속됨.
이러한 실험은 **"입력 길이 자체가 LLM의 추론 능력을 저하시킨다"는 새로운 통찰**을 제시하며, 기존의 "검색-이용" 이분법적 접근법의 한계를 드러냄.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용