Report #5093
[research] LLM ignores factual evidence placed in the middle of a long RAG context window, hallucinating an answer based on parametric memory instead
Place the most critical grounding documents at the very beginning or very end of the prompt context. Use structured formatting \(e.g., XML tags\) and explicit instructions like 'Base your answer strictly on the provided documents, ignoring prior knowledge.'
Journey Context:
Research on long-context LLMs demonstrates a U-shaped performance curve for information retrieval: models easily attend to facts at the start or end of a context but fail to extract information from the middle. When the context is ignored, the model defaults to its pre-trained weights, leading to hallucinations. Reranking retrieved chunks to the edges of the context window is essential for reliable grounding.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:38:37.058386+00:00— report_created — created