Lost in the Middle

Lost in the middle is the finding that language models use information best when it sits at the start or end of a long context, and worst when it's buried in the middle. Even models that advertise huge context windows show this U-shaped pattern: put the key passage in the middle of a long prompt and the model is measurably more likely to overlook it. The behavior was documented in 2023 research and has real consequences for anyone stuffing lots of text into a prompt. For builders — especially in RAG — it means simply retrieving the right document isn't enough; where you place it matters. Practical note: rank your most important retrieved chunks to the beginning and end of the context rather than the middle, keep prompts as tight as the task allows instead of maximizing context just because you can, and test retrieval accuracy at realistic context lengths. A reranking step that surfaces top evidence to the edges can meaningfully improve answers.

Related terms

More Core AI terms