Report #90458
[research] RAG system misses relevant facts located in the middle of the retrieved context window
Re-rank retrieved documents so the most relevant are at the very beginning and very end of the context window. Limit context length to only top-N chunks rather than stuffing the window.
Journey Context:
Agents often stuff the context window with retrieved text assuming the LLM reads it uniformly. However, LLMs exhibit distinct U-shaped attention curves—they attend heavily to the beginning and end of the context, but suffer severe performance degradation for information in the middle. Stuffing more context actually hurts factuality.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:25:50.607715+00:00— report_created — created