Jargonautica
Language Models Specifically

Lost in the Middle

The finding that models attend well to the start and the end of a long input and less well to everything in between. Put the crucial paragraph in the middle of a hundred pages and it may be effectively ignored, even though it is technically inside the context window. A large window is not the same as reliable use of that window, and this is the clearest evidence of it.

Technical view

Documented as a U-shaped performance curve on retrieval tasks as the position of the relevant passage varies, attributed to a combination of attention dilution over long sequences and position biases inherited from the training data distribution. The practical consequences are to put instructions and critical material at the beginning or the end, order retrieved documents accordingly, and prefer a few well-chosen chunks over many. Long-context benchmarks that only test finding a single planted fact overstate real performance, since real tasks require reasoning across several scattered passages.


Part of AI Terminology Index, section: Language Models Specifically.

How it connects

Lost in the Middle links to 9 other terms. The faint lines are links between those terms. See it in the full graph.

Context WindowContext WindowRetrieval Augmented GenerationRetrieval Augmented…ChunkingChunkingContext Length ExtensionContext Length Exte…Cache-augmented GenerationCache-augmented Gen…Context EngineeringContext EngineeringNeedle in a HaystackNeedle in a HaystackAttentionAttentionSummarisationSummarisationLost in the Middle