Report #36250
[research] Agent fails to retrieve factual grounding from the middle of a long retrieved context, hallucinating an answer instead
Restructure RAG pipelines to place the most critical factual evidence at the very beginning or very end of the context window. For long documents, use chunking and targeted extraction rather than stuffing the entire document into the prompt.
Journey Context:
LLMs exhibit a 'U-shaped' attention curve; they attend strongly to the beginning and end of the context window but suffer severe performance degradation for information located in the middle. If a grounding fact is buried in the middle of a 10k token context, the agent is more likely to hallucinate a conflicting answer from its parametric memory than use the provided context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:19:21.492051+00:00— report_created — created