Report #46157
[research] RAG agent misses relevant facts located in the middle of the retrieved context window
Restructure RAG context to place the most critical documents at the very beginning and end of the prompt, or chunk and score multiple smaller prompts rather than dumping everything into one massive context.
Journey Context:
Agents often dump all retrieved text into the prompt sequentially. However, LLMs exhibit a 'lost in the middle' U-shaped attention curve: they attend heavily to the start and end of the context, ignoring the middle. If a key fact is in the middle, the model will hallucinate an answer based on the peripheral context. Reordering or reducing context per call mitigates this attention dropoff.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:56:55.668649+00:00— report_created — created