Match each long context benchmark to what it stresses
Drag each answer to line up with its matching prompt
Needle in a haystack
Mixed task suite spanning QA, summarization, code, and few-shot at long context
RULER
Single distinctive fact planted in homogeneous filler
BABILong
Token stressed tasks designed to exceed 100K including code debug and math reasoning
LongBench
Multi-key, multi-value, multi-query, and reasoning subtasks across long context
LV-Eval
Multi-hop reasoning chains scaled to hundreds of thousands of tokens
InfiniteBench
Bilingual long context with confusing facts and length levels up to 256K
Long-context benchmarks span a spectrum from simple lookup (needle-in-a-haystack) to multi-key, multi-hop, and mixed-task suites (RULER, BABILong, LongBench, LV-Eval, InfiniteBench), each stressing a different facet.
Imagine testing whether someone can find things in a huge library. The easiest test is to plant one bright red book among grey books and ask them to find it; almost anyone can do that. A harder test asks them to find three books and combine information from all of them. An even harder test asks them to follow a chain of references from one book to another to a third before answering. A really hard one asks them to do all of the above in a library where many books look similar and try to mislead them. Each long-context benchmark sits somewhere on this spectrum, and modern models can ace the easiest one while failing the harder ones badly.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Long-context evaluation matters because nominal capacity is not effective capacity. A model with a 1M-token advertised window may behave very differently at 4K, 32K, 128K, and 256K. The gap between best and worst depends on what skill the context use exercises. Each benchmark exists because an earlier benchmark stopped distinguishing models on a specific axis.
Knowing which benchmark probes which axis lets you pick the right tool for your decision rather than treating all six as interchangeable numbers.
The saturation problem and the response
Greg Kamradt's needle-in-a-haystack test, published in late 2023, set the long-context conversation in motion. Plant a distinctive fact (the default is 'The best thing to do in San Francisco is eat a sandwich and sit in Dolores Park on a sunny day.') somewhere in a long block of unrelated text (typically Paul Graham essays). Ask the model to retrieve it, and vary the position and the total length. The result was a heat map that visualized exactly where in the context window a model could and could not find the planted fact.
The test was very diagnostic in 2023. It caught the original lost-in-the-middle behavior cleanly. By mid-2024, vendors such as Anthropic (Claude 3) and Google (Gemini 1.5 Pro) were reporting recall above 99% on needle tests. The benchmark had saturated.
The response was a wave of new evals each restoring distinguishing power along a specific axis. RULER stresses multi-key retrieval and aggregation. BABILong stresses multi-hop reasoning over distance. LongBench stresses workload realism. LV-Eval stresses confusing-fact robustness. InfiniteBench stresses extreme lengths with mixed task types. Newer tests keep appearing; NoLiMa (2025), for example, uses needles that share few words with the question.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Greg Kamradt's needle tests on GPT-4-128K and Claude 2.1 (November 2023) produced the length by depth heat maps that made the test popular.
- The RULER paper tested 17 models that claimed 32K or more; only about half kept satisfactory performance at 32K.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy do small models score well on needle-in-a-haystack but poorly on RULER?
Needle-in-a-haystack rewards finding one salient fact that shares words with the question. RULER's multi-key, multi-value and aggregation tasks require tracking many similar items and combining partial results. That exposes models whose effective context is shorter than their claimed window, which RULER found to be common.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating a 99% needle-in-a-haystack score as proof of long-context skill. That benchmark measures one narrow thing; RULER and BABILong exist because that thing is not enough.
60 second bullets to scan on the way to the call.
What needle-in-a-haystack measures and why it saturated
The subtasks RULER decomposes long-context skill into
Primary sources. Browse if you want the original framing.
- RULER: What's the Real Context Size of Your Long-Context Language Models?
- BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack
- LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
- LV-Eval: A Balanced Long-Context Benchmark with 5 Length Levels Up to 256K
- ∞Bench: Extending Long Context Evaluation Beyond 100K Tokens
Same topic, related formats. Practice these next.