ModelRefs / Lost in the Middle — AI Glossary

Lost in the Middle — AI Glossary

The finding that LLMs perform worse on information located in the middle of long contexts compared to the beginning or end. This is not a context-length limit.

Overview

Liu et al. (2023) showed retrieval accuracy follows a U-shaped curve across context position: models reliably use information at the start and end of context but miss information in the middle. Implications for RAG: place the most relevant chunks first or last. Recency bias (favoring the end) is particularly strong.

Reference details

Topicprompting
Last reviewed2026-06-24

Example: Position changes the answer

Place the answer-bearing passage first among twenty and the model finds it reliably. Move the same passage to position ten and accuracy drops measurably, with no change to the passage or the question. Retrieval accuracy follows a U across position — strong at both ends, weakest in the middle.

Commonly confused with

This is not a context-length limit. The model accepts the tokens and processes them; it attends to the middle less effectively. A page that fits comfortably inside the window can still be read poorly, which is why fitting is not the same as using.

When to use it

Reach for it when:

  • Ordering retrieved chunks — put the strongest first or last
  • Explaining why long-context recall tests disappoint in practice
  • Deciding between fewer, better passages and more, worse ones

Reach for something else when:

  • As an argument against long context generally — the effect varies by model
  • Assuming it is fixed; newer models differ and it is worth re-testing

Primary source

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Lost in the Middle — AI Glossary.

Frequently asked questions

What is Lost in the Middle?

The finding that LLMs perform worse on information located in the middle of long contexts compared to the beginning or end.

What concepts are related to Lost in the Middle?

Closely related concepts include context stuffing, long context, positional bias.