Table of Contents
Fetching ...

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.

NeedleBench: Evaluating LLM Retrieval and Reasoning Across Varying Information Densities

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.
Paper Structure (37 sections, 4 equations, 17 figures, 10 tables, 1 algorithm)

This paper contains 37 sections, 4 equations, 17 figures, 10 tables, 1 algorithm.

Figures (17)

  • Figure 1: NeedleBench Framework. Our benchmark consists of two main categories: Information-Sparse Tasks (left two columns), which include Single-Needle Retrieval, Multi-Needle Retrieval, and Multi-Needle Reasoning with irrelevant filler content; and Information-Dense Tasks (rightmost column), specifically the ATC, designed to eliminate irrelevant filler and require comprehensive understanding of all content.
  • Figure 2: Comparison of different model generations on the Single-Retrieval Task. Newer models such as Qwen-2.5 show clear improvements over earlier models like Zephyr-7B-Beta and Qwen-1.5.
  • Figure 3: Performance of Gemma-3 models with increasing parameter size on the 2-Needle Reasoning (EN, 128K) task. Larger models consistently achieve higher scores, highlighting the benefit of increased capacity for multi-point reasoning in long contexts.
  • Figure 4: Impact of language and model size on NeedleBench 128K performance. Left: Increasing model parameter size generally leads to better long-context reasoning. Right: Most models exhibit a clear performance gap between English and Chinese, with English scores typically higher.
  • Figure 5: Performance of Gemma-3-27B on Multi-Needle Reasoning as the number of needles increases. The color shift towards red in the heatmaps indicates a clear decline in performance as the task complexity grows, highlighting the increasing challenge of integrating more information points within long contexts.
  • ...and 12 more figures