Report #85583
[research] When using long-context RAG, the agent ignores relevant documents placed in the middle of the context window and hallucinates answers
Place the most critical retrieved context at the very beginning or end of the prompt. Alternatively, use short-context iterative retrieval \(multi-hop\) rather than stuffing everything into one massive prompt.
Journey Context:
The 'Lost in the Middle' phenomenon shows LLMs exhibit U-shaped recall performance over long contexts. If a key fact is buried in the middle, the model may fail to retrieve it and hallucinate a plausible alternative. Restructuring the prompt or moving to iterative RAG mitigates this positional bias.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:14:18.113329+00:00— report_created — created