NeedleBench: Evaluating LLM Retrieval and Reasoning Across Varying Information Densities
Mo Li, Songyang Zhang, Taolin Zhang, Haodong Duan, Yunxin Liu, Kai Chen
TL;DR
NeedleBench provides a targeted, synthetic bilingual framework for evaluating LLM retrieval and reasoning across varying information densities and adaptive context lengths. By pairing information-sparse tasks with the information-dense Ancestral Trace Challenge (ATC), the benchmark isolates true long-context understanding from memorization. Experiments reveal robust long-context retrieval by modern models but persistent gaps in multi-point reasoning and long-chain inference, including a prevalent under-thinking phenomenon in dense contexts. The work highlights architectural and scaling factors that influence performance, language-dependent effects, and the need for reinforcement learning and expanded synthetic benchmarks to push forward long-context capabilities. All resources are publicly available via OpenCompass.
Abstract
The capability of large language models to handle long-context information is crucial across various real-world applications. Existing evaluation methods often rely either on real-world long texts, making it difficult to exclude the influence of models' inherent knowledge, or introduce irrelevant filler content to artificially achieve target lengths, reducing assessment effectiveness. To address these limitations, we introduce NeedleBench, a synthetic framework for assessing retrieval and reasoning performance in bilingual long-context tasks with adaptive context lengths. NeedleBench systematically embeds key data points at varying depths to rigorously test model capabilities. Tasks are categorized into two scenarios: information-sparse, featuring minimal relevant details within extensive irrelevant text to simulate simple retrieval tasks; and information-dense (the Ancestral Trace Challenge), where relevant information is continuously distributed throughout the context to simulate complex reasoning tasks. Our experiments reveal that although recent reasoning models like Deepseek-R1 and OpenAI's o3 excel in mathematical reasoning, they struggle with continuous retrieval and reasoning in information-dense scenarios, even at shorter context lengths. We also characterize a phenomenon termed 'under-thinking', where models prematurely conclude reasoning despite available information. NeedleBench thus provides critical insights and targeted tools essential for evaluating and improving LLMs' long-context capabilities. All resources are available at OpenCompass: https://github.com/open-compass/opencompass.
