## Definition The **lost-in-the-middle effect** is the empirical observation that LLMs perform significantly worse when relevant information sits in the middle of their context, compared to the beginning or end. First documented by Liu et al. (2024) — see [[Lost in the Middle (Liu et al.)]]. ## Empirical Magnitude A 30%+ accuracy drop on multi-document QA when the answer document moves from position 1 to position 10 in a 20-document context. Plotting accuracy against position produces a **U-shaped curve**. ## Mechanism Tokens at the edges of the context window receive disproportionately strong attention; tokens in the middle receive less, regardless of importance. Mirrors the *serial-position effect* in human memory (primacy + recency). ## Operational Implications - Put **intent and the most important context near the end** of long prompts. - Anchor durable conventions in **files**, not in chat — files re-enter the prompt explicitly when needed. - Prefer [[Hierarchical Retrieval]] over blanket loading: load less, but load the right things. - Watch for invisible drift when [[Context Compaction]] runs — the compaction itself may bury content in the middle. ## Related - [[Context Window]] - [[Context Compaction]] - [[Hierarchical Retrieval]] - [[Architecture Decision Record]]