Precision & Grounding
Context Assembly: The Last 200 Tokens of Engineering
9 min+85 XPStep 1/11
Lost in the middle is real
Models weight what they read: strong attention on the first chunks (primacy) and the last (recency), a trough in the middle. A chunk ranked #3 of 7 gets read less carefully than #1 or #7 — not because it's less relevant, but because attention isn't uniform.
The mitigations are layout: put the strongest chunks at the edges, not strictly by rank order; interleave the instruction near the end where recency helps; and remember that long-context models reduced the effect, didn't kill it — eval on your task before assuming 128k tokens of context means 128k tokens of attention.
insight
A 128k context window is 128k tokens of storage, not 128k tokens of attention. Middle position is where relevant chunks go to be ignored.