Report #22608
[research] Failing to retrieve or utilize facts located in the middle of a long context window
Re-order retrieved documents to place the most relevant chunks at the very beginning and very end of the context window, or chunk and map-reduce rather than stuffing everything into one prompt.
Journey Context:
Agents often stuff the entire RAG context into the prompt assuming uniform attention. However, transformer attention patterns exhibit distinct U-shaped performance curves; they attend heavily to the start and end of sequences. If a critical fact is buried in the middle, the model will hallucinate an answer based on the peripheral context. Re-ordering is a simple, highly effective architectural fix.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:21:13.273681+00:00— report_created — created