Skip to content
AGENTIC_ENG
GARDEN // concept

Lost in the middle

LAST_MODIFIED:
2026.06.30
CATEGORY:
concept

“Lost in the middle” is the observed failure of language models to reliably use information placed in the middle of a long context. Recall is strongest for content at the very start and very end of the window and weakest in between.

Consequence

A larger window does not guarantee a fact buried mid-context is used. Quality can drop while the token count is still well under the hard limit — which is why context engineering matters more than raw window size.

What to do

  • Put the most important instructions and data near the top or bottom of the prompt.
  • Trim irrelevant middle content rather than trusting the model to ignore it.
  • Prefer ranked, deduplicated retrieval over dumping whole files.
contextretrievaltokens

Related_Nodes