Report #24442
[research] LLM fails to use relevant information located in the middle of a long retrieved context, hallucinating an answer from parametric memory instead
Re-rank retrieved documents to place the most relevant information at the very beginning and very end of the prompt context. Limit context window size to strictly necessary chunks.
Journey Context:
Agents often stuff as many retrieved documents as possible into the prompt, assuming the LLM reads them uniformly. However, LLMs exhibit distinct U-shaped attention curves over long contexts. If a crucial fact is buried in the middle, the model skips it and relies on its pre-trained weights, leading to hallucinations. Re-ranking mitigates this architectural attention bias.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:26:25.668564+00:00— report_created — created