Context

Lost in the middle

Also called: smart zone

Lost in the middle is the well-known tendency for models to attend best to the start and end of a long context and to miss information buried in the middle.

James Phoenix
Understanding Data Updated July 2, 2026

Lost in the middle describes a well-documented quirk: give a model a long context window and it pays closest attention to the beginning and the end, while information stuck in the middle is the most likely to be overlooked. Put the same fact at the top or the bottom and the model uses it. Bury it halfway down a huge prompt and it can behave as if the fact were never there.

Why it happens

It comes down to how attention is distributed. The model does not read like a person working top to bottom. It weighs every token against every other, and in practice the ends of a long sequence tend to win that competition. As the context grows, the middle gets thinner coverage, which is one concrete face of the broader problem of attention degradation: more text in, less reliable recall of any single piece.

What to do about it

You can design around it:

  • Put the important stuff at the edges. Lead with the key instruction or spec, and restate the critical constraint near the end, right before you ask for the work.
  • Do not pad. Every irrelevant page you add pushes real information toward the neglected middle.
  • Keep it short enough to matter. A tight context has no bad middle to get lost in.
Note
This is not a bug you can patch, it is a property of how these models use long contexts. Placement is a real lever: the same information can be used or ignored depending on where in the window it sits.

Related terms

Building with AI agents?

This dictionary is part of how I think about agentic engineering. If you want the same thinking applied to your codebase, that is what I do.

See how I can help