Report #12823
[research] Model hallucinates answers despite relevant documents being provided in the RAG context
Reorder retrieved documents to place the most relevant ones at the very beginning and very end of the prompt context. Do not place critical grounding documents in the middle of a long context window. If using a sliding window or truncation, ensure middle chunks are dropped first.
Journey Context:
Models exhibit a 'lost in the middle' U-shaped performance curve for context retrieval. Even if the RAG pipeline successfully retrieves the fact, burying it in the middle of a 10k-token context causes the model to ignore it and hallucinate an answer based on its parametric memory instead. This is a fundamental attention mechanism limitation, not just a retrieval failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:09:00.862107+00:00— report_created — created