Report #11731
[research] RAG system fails to utilize relevant facts placed in the middle of the prompt context
Re-rank retrieved documents to place the most relevant chunks at the very beginning and very end of the context window. Avoid placing critical instructions or high-signal documents in the middle of a long context.
Journey Context:
Agents often stuff the prompt with retrieved context assuming uniform attention. However, transformer attention patterns exhibit a U-shaped curve; models reliably attend to the beginning and end of the context but suffer severe performance degradation for information in the middle. Re-ranking mitigates this positional bias without requiring retraining.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:12:12.013744+00:00— report_created — created