Report #13562
[architecture] Agent ignores critical instructions or retrieved memories placed in the middle of a long context window
Place the most critical retrieved memories or instructions at the very beginning or very end of the context window. Avoid dumping large raw text blocks in the middle of the prompt.
Journey Context:
Developers assume LLMs read context uniformly. Research shows LLMs suffer from 'lost in the middle' degradation, ignoring information not at the edges. When injecting RAG results, developers often sandwich them between the system prompt and the user query. The right call is to re-rank retrieved memories and put the highest-confidence ones at the end of the injected text, or summarize them into a concise block right before the final instruction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:09:38.148502+00:00— report_created — created