Report #68557
[research] Failing to use provided retrieved context when relevant info is in the middle of a long prompt
Reorder retrieved documents to place the highest-relevance chunks at the very beginning and very end of the context window. Alternatively, force the model to quote the relevant context before generating the answer.
Journey Context:
LLMs exhibit a 'lost in the middle' U-shaped attention curve: they attend strongly to the beginning and end of the context, but ignore the middle. If a RAG system naively concatenates documents by retrieval score, crucial context might end up in the middle, causing the model to hallucinate an answer from its pre-trained weights instead of using the provided context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:33:38.038133+00:00— report_created — created