Skip to content
Talha Anwar

 ·  37 min read

Needle in a Haystack Test: Do 2026 LLMs Still Show Context Rot?

llm-evaluationresearch
On this page
  1. What is a needle in a haystack test for LLMs?
  2. At a glance
  3. What comes from the paper and what we added
  4. What the NoLiMa benchmark found
  5. Our needle in a haystack test: six 2026 models, reasoning on and off
  6. How to read the results
  7. Result 1: 2026 LLMs still lose accuracy at a 32K context length
  8. Result 2: the drop comes from missing shared words, not length
  9. Result 3: the drop does not come from the prompt's wording
  10. Result 4: reasoning wins back part of the drop, not all of it
  11. Result 5: a distractor hurts, even at 1K
  12. Result 6: models reason more at 32K, not less
  13. What this means for long-context LLM prompts
  14. Limits of this test
  15. Run it yourself

Needle in a haystack: the sentence "Actually, Mandy lives next to the Semper Opera House." is hidden in a long book text. The question "Which character lives next to the Semper Opera House?" is answered 100% of the time, while for "Which character has been to Dresden?" accuracy drops.

You paste a long report into a chat and ask a question in your own words. The answer is in the report, but the model replies that the report does not mention it. Ask the same question about a short excerpt that holds the answer, and the model gets it right. This post measures how often that happens with 2026 models, and why.

A needle in a haystack test hides one sentence, the needle, in a long text and asks the model a question about it. In most versions, the question uses the same words as the needle. If the needle says "Actually, Mandy lives next to the Semper Opera House", the question asks "Which character lives next to the Semper Opera House?" The model only has to search the text for those words, so 2026 models pass these versions easily. A 2025 paper, NoLiMa (short for "No Literal Matching"), removed that shortcut. It keeps the same needle but asks "Which character has been to Dresden?" The text never says that the Semper Opera House is in Dresden. The model has to know that from its own training and connect the question to the needle.

We asked NoLiMa's own questions to six 2026 models. At 32,000 tokens, 9 of 10 setups lost more than 15% of their short-input accuracy. Reasoning raised their 32,000-token accuracy by 14-36%, but never to the same level as at 1,000 tokens. When the question shared words with the hidden sentence, every setup scored 100% at 32,000 tokens. So the drop does not come from the length of the text alone. It comes from the length combined with a question that shares no words with the answer. This is part 4 of a series that re-tests published LLM evaluation results on 2026 models. This part made 7,500 calls, which cost $19.02.

The short version

  • A setup is one model with reasoning (writing out its thinking before it answers) on or off. We ran six 2026 models. Four ran with reasoning on and off, and two only with reasoning on, which makes 10 setups.
  • At 32,000 tokens, 9 of 10 setups scored below 85% of their score at 1,000 tokens. The exception was DeepSeek V4.1 Flash with reasoning on, at 86%.
  • When the question repeated the words of the hidden sentence, all 10 setups scored 100% at 32,000 tokens. Length alone cost nothing on this test.
  • Four models ran both with reasoning on and with reasoning off. At 32,000 tokens, switching reasoning on raised accuracy on all four, by 13.6 to 35.9%. For example, Claude Haiku 5.5 went from 41.9% with reasoning off to 77.8% with reasoning on. With reasoning on, every model still scored lower at 32,000 tokens than at 1,000.
  • A distractor, a sentence that shares a word with the question but does not answer it, lowered accuracy at 1,000 tokens on 8 of 10 setups.
  • Models wrote more reasoning at 32,000 tokens than at 1,000, not less. Wrong answers came with the longest reasoning: DeepSeek V4.1 Flash wrote a median of 11,238 output tokens on its wrong answers and 209 on its right ones.

What is a needle in a haystack test for LLMs?#

A needle in a haystack test checks whether a model can use a fact buried in a long input. The "needle" is one sentence, such as "Actually, Mandy lives next to the Semper Opera House". The "haystack" is a long text with nothing to do with the needle, often chapters of a book. The test puts the needle at a set depth in the haystack (20% of the way in, for example), asks a question about it, and checks the answer. Repeating this at several context lengths shows how accuracy changes as the input grows. Chroma calls a drop in accuracy as the input grows "context rot".

The model does not need to know who Mandy is. The name is made up and changes from test to test: Mandy, Yuki, Gary and seven others. To answer "Which character has been to Dresden?", the model needs two things:

  1. A fact it already knows: the Semper Opera House is in Dresden. The text never says this, so the model has to bring it from its training.
  2. The needle in the text: it has to find the one sentence about the Semper Opera House and copy the name from it.

So the model goes from Dresden to the Semper Opera House, finds "Actually, Mandy lives next to the Semper Opera House" in the text, and answers "Mandy". Any name would work, because the model only copies it from the text.

At a glance#

"1K" and "32K" mean a haystack of about 1,000 and 32,000 tokens.

A hop is one fact the model must know to link the question to the needle, because the text does not state it. "Which character has been to Dresden?" is one-hop: the model must know that the Semper Opera House is in Dresden. "Which character has been to the state of Saxony?" is two-hop: it must also know that Dresden is in Saxony.

Question What we measured
Do 2026 models still lose accuracy on NoLiMa at 32K? Yes. 9 of 10 setups scored below 85% of their 1K score. The drop ran from 13.2 to 47.9% on kept pairs (defined in How to read the results).
Is it the prompt telling the model to use the book text? No. With that sentence removed, or with a line that allows the model's own knowledge, 32K accuracy stayed within 6% of the original prompt on every setup we re-ran (Result 3).
Is it the length or the missing shared words? The missing shared words. Questions that repeat the needle's words scored 100% at 32K on all 10 setups.
Does reasoning fix it? It helps, but does not fix it. Reasoning on beat off by 13.6 to 35.9% at 32K, and every model still scored lower at 32K than at 1K.
Is one-hop solved? No. One-hop questions scored 43.8% to 94.8% at 32K, and two-hop questions 3.8% to 71.8%.
Does a distractor hurt? Yes, at 1K on 8 of 10 setups, by 5.2 to 31.0%.
Do models reason less on long inputs? No. Median output tokens rose at 32K on every reasoning setup.
Does our setup match the paper? Yes. The paper's Llama 3.3 70B scored 35.1% at 32K in our run, so it kept 39% of its 1K score. In the paper, it kept 44% of its base score.

What comes from the paper and what we added#

Part of this article From the paper Added by me
The 58 question and needle pairs, the prompt, the haystack text and the grading rule Yes
The control questions that repeat the needle's words, and the distractor sentences Yes
Six 2026 models, and reasoning on vs off for the same model Yes
A reasoning limit of 16,000 tokens (NoLiMa's was 1,536) Yes
The control at 1K and at 32K on the same models, to split the cost of length from the cost of missing shared words (Result 2) Yes
A repeat of the same calls to measure noise Yes
Two edits to the prompt, to test whether its wording causes the drop (Result 3) Yes
Reasoning tokens at 1K against 32K (Result 6) Yes

What the NoLiMa benchmark found#

The paper is NoLiMa: Long-Context Evaluation Beyond Literal Matching by Ali Modarressi, Hanieh Deilamsalehy, Franck Dernoncourt, Trung Bui, Ryan A. Rossi, Seunghyun Yoon and Hinrich Schütze. It was published at ICML 2025. We cite version 3 of the paper.

The authors wrote 58 pairs of a needle and a question. In each pair, the question and the needle share no words. To link them, the model has to supply one or two facts from its own knowledge. Each of those facts is called a hop.

  • One-hop: "Which character has been to Dresden?" needs one fact, that the Semper Opera House is in Dresden.
  • Two-hop: "Which character has been to the state of Saxony?" needs two facts, that the opera house is in Dresden and that Dresden is in Saxony.

A character name such as Mandy fills the needle, and the model has to reply with that name. They tested 13 models at lengths from 1,000 to 32,000 tokens.

The main results:

  • Accuracy dropped as the input grew. In the paper's words, "At 32K, for instance, 11 models drop below 50% of their strong short-length baselines." GPT-4o went from 99.3% to 69.7%.
  • Questions that repeat the needle's words were easy. On Llama 3.3 70B at 32K, those questions scored 98.5%, one-hop questions 56.2% and two-hop questions 25.9%.
  • A distractor hurt. A distractor is a sentence that shares a word with the question but does not answer it, such as "There was an article about Dresden in the daily newspaper." It lowered GPT-4o's short-input score from 99.3% to 93.8%.
  • Reasoning models did better, but not well. On the 10 hardest pairs at 32K, o1 scored 31.1% and o3 58.5%. The paper capped these models at 1,536 output tokens, reasoning included.

The code and data are on GitHub, under a license that does not allow commercial use. Our script downloads them, so they are not in our repository.

Why re-test it#

Later papers disagree with NoLiMa on two points.

  1. Length or missing shared words? NoLiMa blames the missing shared words. Context Length Alone Hurts LLM Performance Despite Perfect Retrieval (EMNLP Findings 2025) found that accuracy still fell by between 13.9% and 85% as the input grew, even when the model could repeat the evidence word for word. So that paper blames the length of the input itself. Neither paper tested both causes on the same models.
  2. Does reasoning fix it? NoLiMa compared different models (o1 against GPT-4o) with a low reasoning limit. No paper we found switched reasoning on and off for the same model on NoLiMa. A 2026 paper, The Bottleneck Is Retrieval, Not Reading, reported that GPT-5 and Gemini 3 Flash score 100% on one-hop questions up to 1 million characters, on a modified and easier version of NoLiMa with 16 tests per point.

Most 2026 models reason before they answer, and many let you switch reasoning off. So we ran each model on NoLiMa's own questions with reasoning on and off, and added the paper's control questions at both lengths.

Our needle in a haystack test: six 2026 models, reasoning on and off#

We used models from earlier parts of the series: Claude Haiku 5.5, GPT-6 Luna, DeepSeek V4.1 Flash and Gemini 3.5 Flash-Lite, which can switch reasoning off, and GLM-5.3 Flash, which cannot. We added Gemma 4 31B, an open model, with reasoning on.

Reasoning Models Number of setups
On Claude Haiku 5.5, GPT-6 Luna, DeepSeek V4.1 Flash, Gemini 3.5 Flash-Lite, GLM-5.3 Flash, Gemma 4 31B 6
Off Claude Haiku 5.5, GPT-6 Luna, DeepSeek V4.1 Flash, Gemini 3.5 Flash-Lite 4
Total 10

We set reasoning to "medium" for the on setups and to "none" for the off setups. Gemma 4 31B ran at "high". GLM-5.3 Flash reasons at its default setting. Gemini 3.5 Flash-Lite does not reason at its default setting, which we used for its off setup.

The four conditions#

How the test works: a book text of 1K or 32K tokens, with the needle at 20%, 50% or 80% depth, is asked four ways (main question with no shared words, main question asked again, control question with the same words, and distractor added), each with reasoning on and off. A reply is right if it names Mandy.

Condition What changes Calls at 1K Calls at 32K
Main The original NoLiMa test: its 58 pairs, at depths of 20%, 50% and 80% 174 174
Main, again The 58 pairs at 50% depth, asked again in separate calls. This measures noise. 58
Control 28 pairs where the question repeats the needle's words ("Which character lives next to the Semper Opera House?"), at depths of 20% and 80% 56 56
Distractor NoLiMa's distractor sentence is added to the haystack 174 58

The numbers are calls per setup. A depth is where the needle sits in the haystack: 20%, 50% or 80% of the way in. Each pair is asked once at each depth, so 58 pairs at 3 depths make 174 calls. At 32K, the repeat and the distractor ran at 50% depth only, so they have 58 calls. The control has 28 pairs at 2 depths, which makes 56.

We changed only what the table shows. Everything else comes unchanged from the NoLiMa paper:

  • Prompt and system prompt: NoLiMa's, shown in full in the box below.
  • Haystack: NoLiMa's shuffled book text, cut to 1K or 32K tokens. NoLiMa's own code places the needle.
  • Scoring: an answer is right if it contains the right character name.

Every setup got the same text and the same character name for the same test.

The prompt every call used

Every call used the same two messages. This covers all 10 setups, all four conditions, both lengths and the Llama check. Only the book text, the needle and the question changed. The one exception is the prompt check in Result 3, which changes the first sentence of the user prompt.

System prompt:

You are a helpful assistant

User prompt, with {haystack} and {question} filled in for each call:

You will answer a question based on the following book snippet:

{haystack}

Use the information provided in the book snippet to answer the question.
Your answer should be short and based on either explicitly stated facts
or strong, logical inferences.

Question: {question}

Return only the final answer with no additional explanation or reasoning.

The setups differed only in their request settings, such as reasoning on or off and the output limit.

The test in numbers

750 calls per setup, about 11.5 million input tokens.

Over 10 setups that is 7,500 calls, which cost $19.02 at list prices. Re-running Llama 3.3 70B, one of the paper's own models, to check that our setup reproduces the paper's drop cost another $0.58. All calls used temperature 1.0. Setups with reasoning on could write up to 16,000 output tokens, and setups with reasoning off up to 1,024. Lengths are counted with OpenAI's o200k tokenizer, so other models count somewhat more tokens for the same text.

Checking our setup against the paper#

We ran one of NoLiMa's own models, Llama 3.3 70B, on the main condition at 1K and 32K with NoLiMa's settings: temperature 0 and at most 192 output tokens. If our version of the test is right, it should show the paper's drop.

  • In the paper: Llama 3.3 70B scored 97.3% on short inputs and 42.7% at 32K, so it kept 44% of its short-input score.
  • In our run: 90.8% at 1K and 35.1% at 32K, so it kept 39% of its 1K score. One-hop questions fell from 97.9% to 47.9%, and two-hop questions from 82.1% to 19.2%.

The drop is as large as in the paper. Our scores are a few % lower on both lengths. We ran Llama through OpenRouter on DeepInfra in fp8, a compressed version of the weights, because the full-precision version was not available. The paper ran the full-precision weights.

How to read the results#

  • Accuracy: the share of calls whose answer contains the right name.
  • Kept pairs: some pairs need a fact the model does not know, such as which German state Dresden is in. A model that does not know the fact also fails at 1K, so that failure says nothing about long inputs. For each setup we drop the pairs it got wrong at 2 or more of the 3 depths at 1K. The ratios and differences in Results 1 and 3 use kept pairs.
  • Ratio: the 32K score divided by the 1K score, on kept pairs. 0.85 means the setup kept 85% of its 1K score.
  • 95% interval: the range in square brackets. We drew 58 pairs at random from the setup's pairs, with repeats allowed, and recomputed the difference. We did this 2,000 times. The interval holds the middle 95% of those differences.
  • Noise floor: the difference between "main, again" and "main" at 32K and 50% depth. The two conditions are identical, so any gap is chance. It ran from −6.9 to +3.4%, and none of the 10 intervals excludes zero.

Result 1: 2026 LLMs still lose accuracy at a 32K context length#

NoLiMa's test, run by us on 2026 models.

Accuracy at 1K and 32K tokens for each setup. Every setup drops at 32K: DeepSeek V4.1 Flash with reasoning on from 97.1% to 83.9%, and Claude Haiku 5.5 with reasoning off from 65.5% to 28.2%. The control question with the same words scored 100% at 32K on every 2026 setup.

Model Reasoning 1K 32K One-hop 32K Two-hop 32K Ratio
DeepSeek V4.1 Flash on 97.1 83.9 93.8 71.8 0.86
GPT-6 Luna on 97.7 79.3 94.8 60.3 0.82
GLM-5.3 Flash on 98.9 80.5 90.6 67.9 0.81
DeepSeek V4.1 Flash off 86.2 69.5 83.3 52.6 0.82
Claude Haiku 5.5 on 91.4 57.5 77.1 33.3 0.63
Gemma 4 31B on 96.6 59.8 79.2 35.9 0.62
GPT-6 Luna off 91.4 54.6 77.1 26.9 0.60
Gemini 3.5 Flash-Lite on 86.2 51.7 67.7 32.1 0.59
Gemini 3.5 Flash-Lite off 64.9 35.6 43.8 25.6 0.50
Claude Haiku 5.5 off 65.5 28.2 47.9 3.8 0.47
Llama 3.3 70B (paper's model) never 90.8 35.1 47.9 19.2 0.39

Accuracy is in %, on all 58 pairs of the main condition. The ratio uses kept pairs.

On 9 of 10 setups, accuracy at 32K fell below 85% of the 1K score. Only DeepSeek V4.1 Flash with reasoning on kept 86%. The drop on kept pairs ran from 13.2% (DeepSeek V4.1 Flash, reasoning on) to 47.9% (Claude Haiku 5.5, reasoning off), and all 10 intervals are below zero.

The 2026 models dropped less than the paper's 2025 models. In the paper, 11 of 13 models fell below half their base score at 32K. In our run, only Claude Haiku 5.5 with reasoning off fell below half (0.47), and Gemini 3.5 Flash-Lite with reasoning off sat at the line (0.50).

One-hop is not solved, and two-hop is much harder. At 32K, one-hop questions scored 43.8% to 94.8% and two-hop questions 3.8% to 71.8%. On every setup, two-hop scored lower than one-hop at 32K. GPT-6 Luna with reasoning on is a clear case: 94.8% on one-hop and 60.3% on two-hop.

Most wrong answers said the answer was not in the text. The needle was always there. We counted wrong 32K answers that contain phrases such as "not mentioned" or "does not". A typical reply from Gemini 3.5 Flash-Lite with reasoning on was "Not mentioned in the provided text." The share was highest on Gemini 3.5 Flash-Lite with reasoning on (81 of 84 wrong answers, 96%), Claude Haiku 5.5 with reasoning on (70 of 74, 95%) and Gemma 4 31B (56 of 70, 80%). GPT-6 Luna and DeepSeek V4.1 Flash with reasoning on more often named the wrong character. GPT-6 Luna with reasoning on said "not mentioned" on only 3 of its 36 wrong answers (8%), and DeepSeek V4.1 Flash with reasoning on on 9 of 28 (32%). This count uses a simple phrase match, so treat it as approximate.

The same model answered at 1K and said "not mentioned" at 32K. You might think "not mentioned" is a fair answer. The text never says that the Semper Opera House is in Dresden. A RAG system is usually told to answer only from the text it is given, so refusing could look like the right behavior. We do not think that explains it, for two reasons:

  • The prompt allows the link. It asks the model to use the book snippet, but its answer can rest on "either explicitly stated facts or strong, logical inferences". So the answer does not have to be written in the text word for word.
  • The same model made the link on the short text. Claude Haiku 5.5 with reasoning on got "Actually, Mandy lives next to the Semper Opera House" and "Which character has been to the state of Saxony?", with the needle 80% of the way in. At 1K, it answered "Mandy". At 32K, with the same needle, the same question and the same depth, it said the snippet did not mention Saxony.

This was common. Across all 10 setups, 1,524 main questions were answered right at 1K. For 521 of them (34%), the same question at the same depth was answered wrong at 32K. Like NoLiMa, we pick the character's name at random for each test, so the name usually differs between the 1K and 32K versions of a test. In the 223 cases where the name was the same, 51 (23%) were still answered wrong at 32K. To check whether the name matters, we re-ran Claude Haiku 5.5 with reasoning on at 32K, giving every test its 1K name. Its 32K accuracy went from 57.5% to 63.2% (100 and 110 of 174 right): 17 answers turned right and 7 turned wrong, a change that chance alone could produce at temperature 1.0. It still scored far below its 91.4% at 1K, so the name does not explain the drop. This re-run cost $0.85. We also tested the objection directly, by changing the prompt: see Result 3.

Claude Haiku 5.5 with reasoning on, needle 80% of the way into the book text. At both 1K and 32K tokens, the needle is "Actually, Mandy lives next to the Semper Opera House." and the question is "Which character has been to the state of Saxony?". At 1K the reply is "Mandy", which is right. At 32K the reply is "The snippet doesn't mention Saxony, so no character can be identified as having been there.", which is wrong.

Result 2: the drop comes from missing shared words, not length#

Our addition. NoLiMa ran its control questions on one model.

The control questions repeat the needle's words, for example "Which character lives next to the Semper Opera House?" Everything else matches the main questions: the same haystack, the same lengths and two of the same depths (20% and 80%). Only the wording of the question is different. This lets us split the drop in two:

  • The control's drop from 1K to 32K is what a longer text costs on its own.
  • Any extra drop on the main questions is what it costs when the question shares no words with the needle.

The results:

  • Control at 32K: 100% on all 10 setups. At 1K the control scored 96.4% to 100%, so the control lost nothing from 1K to 32K on any setup.
  • Main condition: lost 13.2 to 37.4% from 1K to 32K, on all 58 pairs.

On this test, at 32K, all of the drop came from the missing shared words. A long input alone did not stop any model from finding a needle whose words matched the question. A long input combined with a question that shares no words with the needle cost every setup at least 13%.

This does not rule out Context Length Alone Hurts LLM Performance Despite Perfect Retrieval, the paper that found length alone hurts, because that paper used different tasks. Our control asks only for a name next to a matching phrase. For finding one fact at 32K, length alone cost nothing on any of our 10 setups.

Result 3: the drop does not come from the prompt's wording#

Our addition.

The first sentence of NoLiMa's prompt is "Use the information provided in the book snippet to answer the question." A model could read it as "answer only from the text", which would make "not mentioned" a fair answer. To test this, we re-ran the main questions on the 5 setups that said "not mentioned" most often, with two new prompts:

  • Removed: NoLiMa's prompt without that sentence.
  • Modified: the same sentence, followed by "You can also use your own knowledge to connect the dots."
Setup 1K, original 32K, original 1K, removed 32K, removed 1K, modified 32K, modified
Claude Haiku 5.5, reasoning off 66.1% 28.2% 71.8% 27.0% 76.4% 31.6%
Claude Haiku 5.5, reasoning on 90.2% 61.5% 91.4% 57.5% 93.1% 64.9%
Gemini 3.5 Flash-Lite, reasoning off 64.9% 35.6% 67.8% 36.8% 75.3% 36.8%
Gemini 3.5 Flash-Lite, reasoning on 86.2% 51.7% 85.1% 52.9% 96.0% 52.9%
Gemma 4 31B, reasoning on 96.6% 59.8% 96.0% 54.0% 98.9% 58.0%

Each number is accuracy on all 58 pairs of the main condition. "Original" is NoLiMa's prompt, unchanged. For this check, Claude Haiku 5.5 ran on Runware, with a new run of the original prompt, so its numbers differ slightly from the other tables.

The modified prompt helped at 1K. Fewer 1K answers said "not mentioned", and 1K accuracy rose by up to 10%, most on Gemini 3.5 Flash-Lite and on Claude Haiku 5.5 with reasoning off.

At 32K, it did not help. Under both new prompts, 32K accuracy stayed within 6% of the original on every setup. Up to 48% of 32K replies still said "not mentioned". So NoLiMa's wording makes some models stricter on short text, but it does not cause the loss on long text.

The modified prompt turned refusals into guesses, not into right answers. Across the 5 setups, 344 replies at 32K said "not mentioned" with the original prompt. With the modified prompt, 239 of them still said it, 76 named the wrong character, and only 29 named the right one.

The modified prompt also changed how long the models reasoned. See Result 6.

Result 4: reasoning wins back part of the drop, not all of it#

Our addition. NoLiMa compared different models.

Four models ran with reasoning on and off on the same tests. For each of these models, we compared its reasoning-on setup with its reasoning-off setup at 32K, pair by pair. We used only the pairs that both setups kept, meaning pairs that both answered right at 2 or more of the 3 depths at 1K.

Reasoning on against off at 32K tokens. Reasoning raised accuracy by 13.6% on DeepSeek V4.1 Flash, 23.6% on GPT-6 Luna, 17.1% on Gemini 3.5 Flash-Lite and 35.9% on Claude Haiku 5.5, but each model with reasoning on stayed 8.6 to 33.3% below its own 1K score.

Model Reasoning off, 32K Gain from reasoning at 32K Reasoning on, 1K Reasoning on, 32K
Claude Haiku 5.5 41.9 +35.9 [+25.6, +46.2] 96.6 77.8
GPT-6 Luna 57.0 +23.6 [+16.4, +32.1] 98.8 80.6
Gemini 3.5 Flash-Lite 47.7 +17.1 [+9.0, +27.0] 98.2 64.9
DeepSeek V4.1 Flash 74.7 +13.6 [+4.9, +21.6] 96.9 88.3

All numbers are accuracy in %, on kept pairs. The square brackets show the 95% interval. The gain is averaged pair by pair, so it can differ slightly from subtracting the two columns.

Reasoning raised 32K accuracy on all four models, and every interval is above zero. The gain ran from 13.6% on DeepSeek V4.1 Flash to 35.9% on Claude Haiku 5.5.

Reasoning did not remove the drop. With reasoning on, every model still scored lower at 32K than at 1K on the same pairs:

  1. Gemini 3.5 Flash-Lite: 98.2% at 1K, 64.9% at 32K, a gap of 33.3%.
  2. Claude Haiku 5.5: 96.6% at 1K, 77.8% at 32K, a gap of 18.8%.
  3. GPT-6 Luna: 98.8% at 1K, 80.6% at 32K, a gap of 18.2%.
  4. DeepSeek V4.1 Flash: 96.9% at 1K, 88.3% at 32K, a gap of 8.6%.

NoLiMa capped reasoning at 1,536 tokens. Our cap was 16,000, and only 39 of 4,500 reasoning-on calls reached it (0.9%). So a low cap does not explain why reasoning falls short.

Result 5: a distractor hurts, even at 1K#

NoLiMa's test, run by us on 2026 models.

The distractor condition adds a sentence that shares a word with the question but does not answer it: "There was an article about Dresden in the daily newspaper." We compared it with the main condition, pair by pair.

Model Reasoning Accuracy change from the distractor, 1K Accuracy change from the distractor, 32K
DeepSeek V4.1 Flash on −1.1 [−3.4, +1.1] −22.4 [−36.2, −8.6] *
DeepSeek V4.1 Flash off −31.0 [−39.7, −23.0] * −34.5 [−46.6, −20.7] *
GPT-6 Luna on −9.2 [−14.9, −4.6] * −10.3 [−24.1, +3.4]
GPT-6 Luna off −29.3 [−37.9, −21.3] * −10.3 [−22.4, +1.8]
Claude Haiku 5.5 on −26.4 [−36.2, −17.8] * −1.7 [−13.8, +8.7]
Claude Haiku 5.5 off −15.5 [−22.4, −8.6] * −13.8 [−25.9, −1.7] *
Gemini 3.5 Flash-Lite on −9.8 [−17.8, −2.3] * −8.6 [−19.0, +1.7]
Gemini 3.5 Flash-Lite off −7.5 [−17.3, +2.9] +12.1 [+1.7, +22.4] *
GLM-5.3 Flash on −5.7 [−10.3, −1.7] * −8.6 [−22.4, +5.2]
Gemma 4 31B on −5.2 [−9.8, −1.1] * −10.3 [−22.4, +1.7]

Each number is the accuracy with the distractor minus the accuracy without it, in %. A negative number means the distractor made the model worse. The square brackets show the 95% interval, and * marks a change bigger than chance: its whole interval is above or below zero. At 32K the distractor ran at 50% depth only, so there are 58 calls instead of 174, and the intervals are wider.

At 1K, the distractor lowered accuracy on 8 of 10 setups. At 1K the whole input is about two pages, so the model is misled by one sentence, not by length. The cost ran from 5.2% (Gemma 4 31B) to 31.0% (DeepSeek V4.1 Flash, reasoning off).

Reasoning cut the distractor's cost on two models and raised it on one:

  1. DeepSeek V4.1 Flash: −31.0% with reasoning off, −1.1% with reasoning on.
  2. GPT-6 Luna: −29.3% off, −9.2% on.
  3. Claude Haiku 5.5: −15.5% off, −26.4% on.

At 32K, the distractor lowered accuracy on 3 of 10 setups beyond chance. On Gemini 3.5 Flash-Lite with reasoning off, the distractor raised accuracy by 12.1% at 32K. We have no explanation for that result, and its interval comes close to zero (+1.7).

Result 6: models reason more at 32K, not less#

Our addition.

A 2026 paper, Reasoning Shift, found that long irrelevant text makes models write up to 74% fewer reasoning tokens on math problems. We predicted the same on this retrieval task. The prediction was wrong.

We count output tokens, which include reasoning, because we could not get Claude Haiku 5.5's reasoning tokens separately.

Model (reasoning on) All answers, 1K All answers, 32K Right answers, 32K Wrong answers, 32K
GPT-6 Luna 44 156 108 582
DeepSeek V4.1 Flash 89 272 209 11,238
GLM-5.3 Flash 119 396 298 798
Claude Haiku 5.5 134 201 181 216
Gemma 4 31B 366 1,316 356 4,898
Gemini 3.5 Flash-Lite 556 1,072 728 1,321

Each number is the median output tokens per call on the main condition. The median is the middle value, so a few very long replies do not move it. The last two columns split the 32K calls by whether the model answered right or wrong.

All six reasoning setups wrote more at 32K than at 1K. The rise ran from 1.5 times (Claude Haiku 5.5) to 3.6 times (Gemma 4 31B).

Wrong answers came with the longest reasoning. On every setup, the median wrong answer at 32K used more tokens than the median right answer. The gap was largest on DeepSeek V4.1 Flash: 209 tokens on right answers and 11,238 on wrong ones, a factor of 54. 23 of DeepSeek's 750 reasoning-on calls hit the 16,000-token cap, all of them at 32K. A long reasoning trace on this test is a sign that the model did not find the needle, and more reasoning did not lead it there.

A long reasoning trace is a warning sign

At 32K, wrong answers used more tokens than right ones on all 6 reasoning setups. On 4 of them, most wrong answers said the text does not mention the answer, so the model wrote longer when it could not find the hidden sentence. We did not save the reasoning text, so we cannot show what the extra tokens were spent on.

Long reasoning also costs money. Gemini 3.5 Flash-Lite with reasoning on was the most expensive setup: $4.91 for 750 calls, about $0.025 per right answer at 32K. Its output costs $2.50 per million tokens, and its median 32K call wrote 1,072 tokens. GPT-6 Luna with reasoning on cost $1.22 for the same 750 calls, about $0.004 per right answer at 32K, and scored higher.

How often is a long reasoning trace wrong?#

Each reasoning setup gave 174 replies at 1K and 174 at 32K. For each setup and length, we ranked the replies from the fewest output tokens to the most and split the ranking into four groups of about 43: replies 1 to 43 are the shortest, replies 131 to 174 the longest. Then we counted the wrong answers in each group and added the 6 setups together.

Replies, ranked from shortest to longest Example: GPT-6 Luna's tokens at 32K Wrong at 1K Wrong at 32K
1 to 43 (shortest) 24 to 62 0% (0 of 258) 3% (8 of 258)
44 to 87 62 to 154 3% (7 of 264) 18% (48 of 264)
88 to 130 157 to 391 7% (17 of 258) 39% (100 of 258)
131 to 174 (longest) 409 to 1,566 12% (32 of 264) 64% (170 of 264)

Each setup is ranked on its own, because models reason at very different lengths. At 32K, GPT-6 Luna's 43 longest replies start at 409 tokens, but Gemma 4 31B's start at 4,680. One cutoff for all models would mostly separate the models, not the long replies from the short ones.

At 32K, 64% of each model's 43 longest replies were wrong, against 3% of its 43 shortest. The pattern held on every setup. Among the 43 longest replies at 32K, the share that was wrong:

  • 91% on Gemma 4 31B
  • 80% on Gemini 3.5 Flash-Lite
  • 64% on GPT-6 Luna
  • 61% on Claude Haiku 5.5
  • 57% on DeepSeek V4.1 Flash
  • 34% on GLM-5.3 Flash

This does not show that reasoning more causes wrong answers. More likely it runs the other way: when the model finds the needle, it answers quickly, and when it does not, it keeps searching and then gives up or guesses. Calls that hit the 16,000-token cap count as wrong, which raises the share wrong among the longest replies slightly.

Does the prompt change how long models reason?#

We also counted output tokens in the prompt check from Result 3. It covered 3 setups with reasoning on.

Model (reasoning on) Prompt All answers, 1K All answers, 32K Right answers, 32K Wrong answers, 32K
Claude Haiku 5.5 original 125 210 192 233
removed 135 236 214 265
modified 135 234 214 295
Gemini 3.5 Flash-Lite original 556 1,072 728 1,321
removed 488 988 706 1,350
modified 388 1,254 592 2,152
Gemma 4 31B original 366 1,316 356 4,898
removed 358 2,378 332 5,405
modified 329 1,123 284 5,890

Each number is the median output tokens per call on the main condition. "Removed" and "modified" are the two prompts from Result 3. Claude Haiku 5.5 ran on Runware for this check, so its original-prompt numbers differ slightly from the table above.

Wrong answers reasoned longest with the modified prompt. On all 3 setups, the median wrong answer at 32K used the most tokens with the modified prompt: 27% more than with the original prompt on Claude Haiku 5.5, 63% more on Gemini 3.5 Flash-Lite and 20% more on Gemma 4 31B. Removing the sentence added less, 2% to 14%.

Right answers did not get longer. With the modified prompt, right answers used about 20% fewer tokens on Gemini 3.5 Flash-Lite and Gemma 4 31B, and 11% more on Claude Haiku 5.5. Removing the sentence changed them by 11% or less.

This suggests that when the model finds the needle, permission to use its own knowledge lets it answer sooner. When it does not find the needle, it searches longer and then often guesses a wrong name, as Result 3 showed.

Median output tokens per call at 32K with reasoning on, for the original prompt, the prompt with the sentence removed, and the modified prompt. Wrong answers: Claude Haiku 5.5 233, 265 and 295 tokens; Gemini 3.5 Flash-Lite 1,321, 1,350 and 2,152; Gemma 4 31B 4,898, 5,405 and 5,890. Right answers: Claude Haiku 5.5 192, 214 and 214; Gemini 3.5 Flash-Lite 728, 706 and 592; Gemma 4 31B 356, 332 and 284.

What this means for long-context LLM prompts#

  1. Do not trust a needle in a haystack score from a test whose questions repeat the needle's words. On that kind of test, every setup here scored 100% at 32K. On NoLiMa's questions, the same setups scored 28.2% to 83.9%.
  2. Write the question in the words of the document when you can. If you know the document says "Semper Opera House", ask about the Semper Opera House, not about Dresden. In Result 2, the matching question lost nothing at 32K and the non-matching one lost 13 to 37%.
  3. Switch reasoning on for questions over long inputs. It raised 32K accuracy by 13.6 to 35.9% on every model that ran both ways, and it cut the distractor's cost on DeepSeek V4.1 Flash and GPT-6 Luna.
  4. Do not expect reasoning to close the gap. With reasoning on, the best model in this test, DeepSeek V4.1 Flash, still lost 8.6% from 1K to 32K, and Gemini 3.5 Flash-Lite lost 33.3.
  5. Treat a "not in the text" reply as a possible miss, not proof. Most wrong answers from Gemini 3.5 Flash-Lite, Claude Haiku 5.5 with reasoning on and Gemma 4 31B said the answer was not mentioned. The answer was always there.
  6. Watch for very long reasoning on a lookup question. On DeepSeek V4.1 Flash, a wrong answer used a median of 11,238 tokens and a right one 209. A cap on output tokens limits the cost of those misses.

Limits of this test#

The test uses one haystack and three depths. NoLiMa used five haystacks and 26 depths, so our 174 calls per length are fewer than NoLiMa's 7,540. One pair moves a setup's main accuracy by about 1.7%. We ran two context lengths, 1K and 32K, so this test says nothing about 128K or 1-million-token context windows. The paper's models answered at temperature 0, and ours at temperature 1.0, the same for reasoning on and off.

NoLiMa's ICML reviewers noted that its 58 pairs come from a small set of question templates. Chroma's Context Rot report says that 72.4% of NoLiMa's pairs need outside knowledge, such as where the Semper Opera House is. Our kept-pairs rule drops pairs a setup fails at 1K, which removes most failures from missing knowledge, but not all. NoLiMa's prompt wording also changes the 1K scores: with a line that allows the model's own knowledge, some setups scored up to 10% higher at 1K. The 32K drop stayed about the same.

The main test ran on 9 and 10 November 2026. Claude Haiku 5.5 ran via OpenCode. The other 2026 models ran through Runware, and Llama 3.3 70B through OpenRouter. We first ran Gemini 3.5 Flash-Lite on Google's free API tier. That run stopped at the free tier's quota, so we re-ran both Flash-Lite setups in full on Runware and use only the Runware results. The prompt check in Result 3 ran on 15 November 2026, all on Runware, and added 4,176 calls for $15.16. Each provider may change a model without notice.

Run it yourself#

The code and the raw output of every call are in the needle-in-a-haystack folder of the article-experiments repository. The script downloads NoLiMa's data, resumes a stopped run where it left off, and a second script prints the tables in this article.

pip install httpx tiktoken numpy
cd needle-in-a-haystack
export OPENCODE_KEY=... RUNWARE_API_KEY=... OPENROUTER_KEY=...
python python/run_niah.py --arm gpt-6-luna/think --limit 20     # small test
python python/run_niah.py --rebuild --max-spend 2                # Llama 3.3 70B check
python python/run_niah.py --arm gpt-6-luna/think --arm gpt-6-luna/off --max-spend 5
python python/analyze.py --rebuild
python python/analyze.py
python python/run_niah.py --arm gemma-4-31b/think --condition main --prompt own_knowledge --max-spend 2
python python/analyze_prompt.py                                  # the prompt check
python python/analyze_reasoning_length.py                        # wrong rate by reasoning length

Part 1 of this series, LLM-as-a-Judge Bias, tests whether five judges prefer markdown answers. Part 2, Are LLMs Deterministic?, counts how often the same judge changes its verdict on identical input. Part 3, Does "You Are an Expert" Make an LLM More Accurate?, tests role prompting.

Written by Talha Anwar, senior ai / full-stack engineer. me@talhaanwar.com

← All writing