Report #68132
[research] RAG agent fails to find the answer even though the relevant document is present in the context
Reorder retrieved documents to place the most relevant chunks at the very beginning and very end of the context window. Avoid stuffing large, undifferentiated blocks of text into the middle.
Journey Context:
LLMs exhibit a U-shaped attention curve; they attend strongly to the start \(primacy\) and end \(recency\) of the context, but suffer severe degradation in the middle. Simply increasing context window size does not solve retrieval; it often dilutes attention. Re-ranking and strategic placement is essential for factual grounding.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:50:30.002417+00:00— report_created — created