Have you ever pasted a 10-page contract or article into an AI, written "Output as 3 bullet points" at the very top, and then watched the AI produce 8 rambling paragraphs?
It's infuriating. You feel like the AI just ignored you. But the AI didn't ignore you—it suffered from Recency Bias.
The Transformer Attention Budget
Large language models predict tokens from left to right. As text grows longer, the model must distribute its mathematical attention across every single word. Empirical research (notably Liu et al.'s 'Lost in the Middle') proves that attention is not uniform:
Attention is strongest at the very beginning (Primacy) and the very end (Recency). Instructions buried in the middle or separated from the finish line by thousands of words suffer severe degradation.
The Golden Layout for Long Prompts
- Top: Role & overall objective.
- Middle: Raw documents, background facts, or data (inside boundary tags).
- Bottom (The Anchor): Exact formatting rules, schema, and direct output commands.