Report #52983
[research] LLM ignores factual grounding context provided in the middle of a long prompt
Place the most critical retrieved documents at the very beginning and very end of the context window. Avoid placing crucial facts in the middle of a 10k\+ token prompt.
Journey Context:
When using RAG, developers often concatenate top-k chunks sequentially. However, LLMs exhibit a 'lost in the middle' U-shaped attention curve: they attend heavily to the start and end of the context, but forget or ignore the middle. Re-ranking retrieved chunks to put the most relevant at the edges significantly improves factual grounding compared to naive similarity-based ordering.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:25:35.384876+00:00— report_created — created