HackerPapers

arXiv:2502.05167cs.CL

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 almost-perfect 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/adobe-research/NoLiMa.

arXiv comments
Accepted at ICML 2025
Journal reference
DOI
Subjects
cs.CLComputation and Language

On Hacker News

Linked by 4 identifiable commenters in 9 comments across 9 threads, from Mar 2025 to Apr 2026. Found in 10 HN submissions from Feb 2025 to Apr 2026. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments9 threads

  1. Claude Code Routines 1 comment
    • super-edit: Sorry, this is not a usage related question, I have move it to: https://news.ycombinator.com/item?id=47772971 Here is the question for which I cannot find an answer, and cannot yet afford to answer myself: In Claude Code, I use Opus 4.6 1M, but stay under 250k via…

      consumer451View on HNParent context

    • It seems to be the hit rate of a very straightforward (literal matching) retrieval. Just checked the benchmark description (https://huggingface.co/datasets/openai/mrcr), here it is: "The task is as follows: The model is given a long, multi-turn, synthetically generated…

      ivzakView on HNParent context

    • Hello Simon, sorry for asking about this tangent here, but have you seen this paper? Is it as important as it appears to be? Should this metric be on all system cards? > We evaluate 12 popular LLMs that claim to support contexts of at least 128K tokens. While they perform well…

      consumer451View on HNParent context

    • Related paper: https://arxiv.org/abs/2502.05167 > We evaluate 12 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, 10 models…

      consumer451View on HNParent context

  2. Claude 4 1 comment
  3. GPT-4.1 in the API 1 comment
    • This is a paper which echoes your experience, in general. I really wish that when papers like this one were created, someone took the methodology and kept running with it for every model: > For instance, the NoLiMa benchmark revealed that models like GPT-4o experienced a…

      consumer451View on HNParent context

    • I only ran the benchmark on Quasar Alpha*; the rest of the scores come from the original paper [0] which was published before 3.7 was available. This is a pretty expensive benchmark to run if you're paying for API usage - I'd actually originally set out to run it on Llama 4 but…

      daemonologistView on HNParent context

    • I am very curious how 3.7 and o1 pro perform in this regard: > We evaluate 12 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…

      consumer451View on HNParent context

    • I just learned something about LLMs: start a new chat as often as possible. I knew that this was a best practice, but I didn't know how quickly the situation becomes dire. > We evaluate 12 popular LLMs that claim to support contexts of at least 128K tokens. While they perform…

      consumer451View on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.