Report #35256
[research] Agent fails to use relevant factual information provided in the middle of a long retrieved context
Reorder retrieved documents to place the most relevant ones at the very beginning and very end of the context window. Limit context window size to strictly necessary chunks rather than dumping all retrieved text.
Journey Context:
LLMs exhibit a U-shaped attention pattern. They heavily attend to the start and end of the prompt context, but suffer from 'lost-in-the-middle' degradation. Simply dumping 20 retrieved documents into the context actually decreases factuality compared to using the top 3, because the model ignores the middle chunks and hallucinates answers from its parametric memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:38:56.885348+00:00— report_created — created