short · 3 min
Lost in the middle
Models find a passage at the start or end of a long prompt more often than the same passage in the middle.
updated 27 Sept 2026
Here's a strange result from 2023. A model was given a question plus 20 passages, one of which held the answer. With the answer passage in the middle of the pile, it did worse than when it got no passages at all and answered from memory. We handed it the right document, and it would have been better off without it.
How does that happen? Let's walk through the test.
Moving one passage
Take a question from a standard question-answering set. Build a prompt with 20 Wikipedia passages. One has the answer. The other 19 were picked by a search system because they look related, but they don't answer it. Ask the question. Then move the answer passage from slot 1 to slot 2, slot 3, all the way to slot 20, asking again each time.
If the model read its whole input evenly, accuracy would stay flat. It didn't. It made a U: best with the answer first or last, worst in between.
(That's the shape, not the real numbers.) The real drop was large. For GPT-3.5-Turbo, accuracy fell by more than 20% as the answer moved away from the edges. With 20 or 30 passages, its worst case fell below the 56.1% it got with no passages at all. That's the strange result from the top.
It showed up with 10, 20 and 30 passages, on several models, and on a second, made-up task: find the value for one key in a long list of key-value pairs. People have a version of this too. Psychologists call it the serial-position effect: we remember the first and last items of a list best.
What didn't fix it
The obvious guess is a bigger window. The study compared models with their extended-window versions, and when the prompt fit in both, they scored nearly the same. A bigger window lets you send more. It doesn't make the model read it more evenly.
Maybe it's the assistant training? No: a base model that only predicts text showed the same U as its tuned version.
Repeating the question before and after the passages fixed the key-value task, but barely moved results on real questions.
And sending more passages stopped paying off. Going from 20 to 50 gained about 1 to 1.5%, even though the search had found more right answers in those 50. The model just wasn't using the extra text.
Is it still true?
That's the honest open question. Those were 2023 models. A 2025 test on newer models moved one fact through 11 positions in a long text and found no clear position effect on that task. But on a different task, spotting one odd word in a long list of repeated words, accuracy was best when the odd word came early, more so as the text grew. So position still matters on some tasks and not others, and nobody has run a careful version on 2026 models.
Position is also only one way a long prompt goes wrong. Length, look-alike passages and how closely the question matches the answer all hurt too (that's in context window). So when a long prompt fails, don't assume it's position.
Back to the model that did worse with the right document than without it. Two cheap moves follow. If your search ranks results, say with reranking, keep that order so the best chunk goes first. And send fewer, better chunks before you send more. When a whole document goes in instead, the long-context route, you don't get to choose where the key sentence lands. If you want to know whether your model has the U, move the answer passage through your own prompt and watch the score.
Further reading
- Lost in the Middle: How Language Models Use Long Contexts, Liu et al., TACL 2024. The original test and everything that didn't fix it. Short and easy to follow.
- Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma, 2025. The newer models, where the picture gets messier.