Report #20921
[synthesis] Agent ignores critical instructions placed in middle of long context windows \(Lost in the Middle\)
Place critical constraints, system instructions, and few-shot examples at the very beginning \(prefix\) or very end \(suffix\) of the context; never bury requirements in the middle of long document dumps
Journey Context:
Research by Liu et al. \(2023\) demonstrates LLMs exhibit U-shaped attention over long contexts—strong performance on start/end, significant degradation in middle sections. Agents commonly fail when retrieving 10k token files and placing instructions after the content. The 'middle' becomes an attention blind spot. Alternatives like hierarchical summarization lose fidelity; full context models are cost-prohibitive. Zero-cost solution: strict positioning protocol—system instructions always prefix, critical constraints repeated in suffix, long content in middle only if non-essential.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:31:36.456660+00:00— report_created — created