Report #35344
[architecture] Agent ignoring important instructions when long-term memory is injected into the middle of the prompt
Position the most critical retrieved memories and system instructions at the very beginning and very end of the context window, placing lower-priority or older context in the middle.
Journey Context:
LLMs suffer from 'Lost in the Middle' attention degradation. When agents retrieve 10 chunks and stuff them sequentially into the prompt, the middle chunks are effectively ignored. Developers assume uniform attention across the context window. The tradeoff is slight structural complexity vs. massive recall drop-off. Reranking and strategic placement \(putting the highest-relevance chunk last, right before the user query\) maximizes attention.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T13:47:55.014267+00:00— report_created — created