Why AI Misses What's in the Middle

Cascade Insights · AI explainer series

Why AI Misses What's in the Middle

Why a model misuses facts buried in long documents, shown on a clause you can drag

It found the clause. It still got the answer wrong. Ask a current model to a fact buried in a long document and it usually can, wherever the fact sits. Ask it to use that fact, to something from it, and position starts to matter a lot. Drag the fact through the document below and watch the two lines split apart.

New to the vocabulary? Tap any dotted term for a plain-language definition, or .

Pick the fact, then drag it through the document
Asked to find it Asked to use it Found it, still got it wrong START OF DOCUMENT END Drag the yellow fact along the document, or click it and use the arrow keys.
Teaching curves anchored to May 2026 measurements, not live results. See what the evidence says. 1 page ≈ 500
2 pages 20 200 · half a 200K window 400

You ask, ten times:

What actually changed since 2023The two halves of the problem, with numbers

The popular version of this idea dates from 2023, and it's stale in one direction and complacent in another. Models did not fix "lost in the middle." They fixed one half of it, and the failure moved into the half that matters more for real work.

Fixed

Finding a fact

~equalaccuracy at all 11 tested positions

Ask a current model to locate or quote a passage and position barely matters. On the best models hold above 90% out to a million tokens. The 2023 curve does not reproduce here.

Not fixed

Reasoning from it

100% → 68%same task, end vs. middle of a 64K context

Give the same models a task to work through rather than look up, and moving it to the middle costs 32 on the strongest 2026 model tested. Weaker ones in the same study fell much further. Measured May 2026 on 2026-generation models, not legacy ones.

Depends on the model

Holding many facts at once

96% / 43%a 2026 flagship vs. a 2026 small model, 8-needle recall at 512K–1M

Multi-fact recall at very long context still separates models sharply. In OpenAI's own 2026 launch results on MRCR v2 8-needle at 512K to 1M tokens, its flagship GPT-6 Astra scored 96% while its smaller GPT-5.6 Luna scored 43%. A million-token window on the spec sheet doesn't tell you which kind you have.

Improving fast

The generational jump is real

49% → 96%two months, same vendor, 8-needle at 512K–1M

OpenAI's GPT-5.5 scored 49% on this test in July 2026 launch results, and GPT-6 Astra scored 96% in September. Anything on this page could be out of date within two model releases. That's the argument for testing your own stack instead of trusting a curve.

The practical upshot of all of it: treat roughly 25–30% of the advertised as the part you can rely on for anything harder than a lookup.

Why the middle sagsPrimacy, recency and dilution

Two effects stack. The model strongly to what came first (the opening frames everything after it) and to what came last (the freshest thing before it answers). Neither reaches very far. The middle belongs to neither, so a fact there competes with everything around it and often loses. In long inputs the two are no longer equal. , which is why the curve above slides toward the end instead of forming a symmetric U. is a sequence index, not a location in meaning-space: two sentences can mean the same thing and still be treated differently because of where they fall.

Primacy

The opening gets over-weighted

The first tokens are the only thing every later token could attend to, so attention piles onto them as the input grows. This is built into , and recent theory shows the bias is present in an untrained network before any data arrives.

Recency · the strong one

The ending is closest to the answer

The last thing in the window is the shortest hop from the reply the model is about to write. This advantage is durable: it survives at lengths where the opening's advantage has already collapsed, which makes the end of your prompt the safest place to put anything that matters.

Dilution

Length spreads attention thin

Every extra passage is another candidate for attention, and a fact phrased differently from the question is easy to lose among . Studies that vary only length, with no position change at all, still find accuracy falling as inputs grow.

What the evidence says, and when

The famous U-shaped curve is from 2023 and it does not describe a 2026 model doing a lookup. It does still describe one doing a reasoning task. The same object as above, redrawn for four measured conditions. The first is the current one.

Pick a condition
START MIDDLE END

Where this bites a business

None of these failures announce themselves, and the modern versions are nastier than the old ones: the model can usually quote the thing it just failed to use. Spot-checking "did it find the clause?" will tell you everything is fine.

The mid-contract clause

You paste a 60-page agreement and ask when service ends if you give notice today. The 90-day clause sits on page 31. Ask the model to quote the notice period and it does, correctly. Ask it to compute the date and it answers off the standard 30-day boilerplate near the front, fluently and two months off.

Retrieval worked. The reasoning didn't.

Your found the right passage and put it in the prompt, ranked 12th of 25. Every retrieval metric is green, and the model will happily quote the passage back to you. It still compares against the wrong number. The bug is in where the passage landed, not whether it was found.

The buried instruction

A long says, on line 140 of 300, never to quote a price without the disclaimer. It works in testing. Then a long conversation buries it mid-context and the disclaimer quietly stops appearing. Asked directly, the model still recites the rule perfectly.

What to do about it

Put the task last, not first

The old advice was "top and bottom." The current evidence says the bottom wins: recency survives at lengths where primacy has already collapsed. Documents first, then the question and the instructions at the very end.

Re-order what retrieval returns

Do not stack retrieved passages in rank order. Put the best one last, the second-best first, and let the weaker ones fill the middle where being missed costs least.

Shorter is safer, and 25% is the budget

Cut or summarize before asking. Treat roughly as the reliable working range for anything harder than a lookup. Treat a 1M-token window as a ceiling.

Quote first, then reason

"First quote the relevant passage verbatim, then answer." This works because retrieval is the half that got fixed. Forcing the model to restate the fact at the end of its own output puts it in the strong position right before the reasoning happens.

Test reasoning, not recall

The trap in your own evals: checking whether the model can find the fact will pass. Ask it to compute or compare something from a fact you have deliberately buried mid-context. That's the case that fails, and the only one worth measuring.

Run this experiment on your own stack

Plant one known fact in a real document, move it through ten positions, ask the same reasoning question each time, and count. That is the exact method of the papers below and it takes an afternoon. Given how fast this is moving, your curve on your model beats anything published.

What this page gets wrong on purpose, and where it is thin. The curve is a teaching shape. It tracks the strongest 2026-generation models in the May 2026 study: roughly −32 percentage points end-to-middle at 64K-equivalent, and a drop in the low teens at 8K-equivalent, which sits inside the −6 to −40 range all nine models showed at that length. Everything between and beyond those two anchors is interpolation, and the percentages beside the marker are illustrative rather than measured. Read the curve as the optimistic case: weaker and older models in the same study fell much further, one going −12 points at 8K to −24 at 32K to −88 at 64K. Two honest gaps. First, the closed frontier models were not in that study: the 2026 position-controlled reasoning work covers 2026-generation open-weight models, so whether GPT-class, Claude-class or Gemini-class models show the same middle collapse on reasoning is, as far as published work goes, untested. Second, this field moves faster than the papers: OpenAI's own multi-fact score at 512K to 1M tokens roughly doubled between July and September 2026, so treat every number here as a snapshot dated October 2026 and worth re-checking against your own stack.
The recordSeven studies, 2023 to 2026, in order

In order, because the order is the point. Each entry says what was found and what the next study changed.

  1. JUL 2023 · TACL 2024

    Lost in the Middle (Liu et al., Stanford)

    Gave six models 20 short documents and one question. GPT-3.5-Turbo answered correctly about 84% of the time when the relevant document came first, about 80% when it came last, and about 56% when it sat in the middle, no better than its 56.1% with no documents at all. The U-shaped curve, and the name, come from here. Paper

  2. FEB 2025 · ICML 2025

    NoLiMa (Adobe Research)

    Removed the literal word overlap between question and answer that needle-in-a-haystack tests usually allow. Of 12 models advertising 128K+ windows, 10 fell below half of their short-context score by 32K tokens. GPT-4o went from 99.3% to 69.7%. Length alone, with nothing to match on, is enough to lose the fact. Paper

  3. FEB 2025 · ICML 2025

    On the Emergence of Position Bias in Transformers (MIT)

    A theoretical account tying position bias to causal masking: because each token can only attend backward, early tokens accumulate attention as depth grows. The bias is a property of the architecture, which training shapes but does not remove. Paper

  4. JUL 2025

    Context Rot (Chroma)

    Tested 18 models including Claude 4, GPT-4.1 and Gemini 2.5. On simple needle-in-a-haystack tasks across 11 positions, no notable position effect. What did degrade performance: longer inputs, low similarity between question and answer, and distractors, even a single one. Oddly, shuffled haystacks were easier than coherent ones. Report

  5. AUG 2025

    Positional Biases Shift as Inputs Approach Context Window Limits (Veseli et al.)

    Six open-weight models, 8K to 128K windows. The middle dip is strongest when the input fills up to about half the window (peaking near a quarter for reasoning and 38% for retrieval). Past half, the opening's advantage collapses while the ending's holds: the ranking becomes last > middle > first. This reconciles the 2023 result with long-context benchmarks that never saw a U. Paper

  6. MAR 2026

    Lost in the Middle at Birth

    An exact theory of the effect, checked on small models: the U-shape is present at random initialization, before training, and survives with positional encodings removed. Its source is causal masking plus residual connections. The middle is a structural dead zone that scale and training shallow out but do not erase. Paper

  7. MAY 2026 · the current picture

    Positional Failures in Long-Context LLMs

    The study this page is built on. Its point is a gap in how everyone evaluates: retrieval benchmarks control where the target sits, reasoning benchmarks never do, so the reasoning failure went unmeasured. Placing GSM8K and ARC problems at the start, middle and end of 8K, 32K and 64K contexts, all nine models tested dropped from end to middle. Among the 2026-generation models: MiMo-V2.5-Pro 100% → 68%, GLM-4.7-FlashX 90% → 56%. Older and smaller models collapsed entirely (Qwen 2.5-7B: 94% → 0%). The gap grows with length. Open-weight models only. Paper

Read as a sequence, the arc is: a retrieval problem found in 2023, largely engineered away by 2025, explained as architectural in 2025–26, and then found still fully intact in reasoning in 2026, because nobody had been controlling for position in the benchmarks where it mattered most.