Report #7727
[research] Agent ignores relevant facts located in the middle of a long retrieved context window, hallucinating an answer instead
Re-rank retrieved documents to place the most relevant information at the very beginning and very end of the context window, or chunk and iteratively process the context.
Journey Context:
LLMs exhibit a strong U-shaped attention pattern: they attend closely to the beginning \(primacy\) and end \(recency\) of the prompt, but ignore the middle. If a RAG system naively concatenates 10 documents, the ones in the middle are effectively invisible, leading the model to hallucinate based on its parametric memory instead. Re-ranking is a practical mitigation without retraining the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:37:26.125837+00:00— report_created — created