Skip to content

Context Rot: Lost in the Middle Explained

Stuffing a context window does not stuff it evenly. Models attend strongly to the start and end of their context and fade in the middle — the U-shaped recall curve. Put the critical facts at the edges, or retrieve instead of stuffing.

Animated diagrams · 2 flows

Compare all 2

Sort by any column to find the right fit. Click a name to open its details.

Lost in the MiddlePosition in context → recall qualityNoSame call, worse answersTransformer attentionImplicit — no configKnowing where to put instructions and facts
Where You Put It MattersSame fact, three positions, three outcomesNoIdentical calls, different answersPositional attentionTrivial to exploitPrompt layout and context curation