Report #9185
[architecture] Retrieved memories override current task instructions or context
Asymmetrically weight the context window. Place system instructions at the absolute beginning and end of the prompt \(sandwiching\). When injecting retrieved memories, explicitly tag them as 'Past Context' and instruct the model to treat 'Current Task' as the ground truth if conflicts arise.
Journey Context:
LLMs suffer from lost-in-the-middle and recency bias. If a RAG pipeline injects 10k tokens of old memories before the current user message, the model might hallucinate based on the old memories, ignoring the new instruction. The tradeoff is that you must provide context, but providing it disrupts the attention mechanism on the actual task. Sandwiching and explicit conflict-resolution instructions mitigate this attention dilution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:35:51.869876+00:00— report_created — created