Lune

ICML2025Top-tier venue

NoLiMa: Long-Context Evaluation Beyond Literal Matching

Ali Modarressi, Hanieh Deilamsalehy, Franck Dernoncourt, Trung Bui, Ryan A. Rossi, Seunghyun Yoon, Hinrich Schütze

Abstract

Recent large language models (LLMs) support long contexts ranging from 128K to 1M tokens. A popular method for evaluating these capabilities is the needle-in-a-haystack (NIAH) test, which involves retrieving a "needle" (relevant information) from a "haystack" (long irrelevant context). Extensions of this approach include increasing distractors, fact chaining, and in-context reasoning. However, in these benchmarks, models can exploit existing literal matches between the needle and haystack to simplify the task. To address this, we introduce NOLIMA, a benchmark extending NIAH with a carefully designed needle set, where questions and needles have minimal lexical overlap, requiring models to infer latent associations to locate the needle within the haystack. We evaluate 13 popular LLMs that claim to support contexts of at least 128K tokens. While they perform well in short contexts (<1K), performance degrades significantly as context length increases. At 32K, for instance, 11 models drop below 50% of their strong short-length baselines. Even GPT-4o, one of the top-performing exceptions, experiences a reduction from an almostperfect baseline of 99.3% to 69.7%. Our analysis suggests these declines stem from the increased difficulty the attention mechanism faces in longer contexts when literal matches are absent, making it harder to retrieve relevant information. Even models enhanced with reasoning capabilities or CoT prompting struggle to maintain performance in long contexts. We publicly release the dataset and evaluation code at https://github.com/adoberesearch/NoLiMa . 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • L-CUBE: Isolating Long-Context Capacity from Knowledge with Controllable Mutual Information Scaling cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • Sense and Sensitivity: Examining the Influence of Semantic Recall on Long Context Code Understanding cites Random-Access Infinite Context Length for Transformers
  • Sense and Sensitivity: Examining the Influence of Semantic Recall on Long Context Code Understanding cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • Many-Shot In-Context Learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Sense and Sensitivity: Examining the Influence of Semantic Recall on Long Context Code UnderstandingAdam Storek, Mukur Gupta, Samira Hajizadeh, Prashast Srivastava et al.ACL 2026 · 4 citations
  2. AC-LoRA: (Almost) Training-Free Access Control Aware Multi-Modal LLMsLara Magdalena Lazier, Aritra Dhar, Vasilije Stambolic, Lukas CavigelliNeurIPS 2025 · 3 citations
  3. CogniLoad: A Synthetic Natural Language Reasoning Benchmark With Tunable Length, Intrinsic Difficulty, and Distractor DensityDaniel Kaiser, Arnoldo Frigessi, Ali Ramezani-Kebrya, Benjamin RicaudICLR 2026 · 3 citations
  4. A Multi-Agent Framework for High-Interaction Terminal SimulationKai Wei, Yuwen Cui, Kehan Shen, Hua Wei et al.ACL 2026
  5. L-CUBE: Isolating Long-Context Capacity from Knowledge with Controllable Mutual Information ScalingZhuo Chen, Oriol Mayné i Comas, Zhuotao Jin, Di Luo et al.ICML 2026

Builds on10

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
  3. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
  4. Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet et al.NeurIPS 2024 · 271 citations
  5. Random-Access Infinite Context Length for TransformersAmirkeivan Mohtashami, Martin JaggiNeurIPS 2023 · 207 citations

Related papers

  1. Sequential-NIAH: A Needle-In-A-Haystack Benchmark for Extracting Sequential Needles from Long ContextsYifei Yu, Qian-Wen Zhang, Lingfeng Qiao, Di Yin et al.EMNLP 2025 · 2 citations
  2. NeedleChain: Measuring Intact Context Comprehension Capability of Large Language ModelsHyeonseok Moon, Heuiseok LimACL Findings 2026
  3. ToolHaystack: Stress-Testing Tool-Augmented Language Models in Realistic Long-Term InteractionsBeong-woo Kwak, Minju Kim, Dongha Lim, Hyungjoo Chae et al.EMNLP Findings 2025
  4. HELMET: How to Evaluate Long-context Models Effectively and ThoroughlyHoward Yen, Tianyu Gao, Minmin Hou, Ke Ding et al.ICLR 2025
  5. LongGenBench: Long-context Generation BenchmarkXiang Liu, Peijie Dong, Xuming Hu, Xiaowen ChuEMNLP Findings 2024 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines