Report #85348
[architecture] Agent giving undue weight to retrieved memories over current instructions
Position retrieved memories in the middle of the prompt, bookended by the core system instructions and the immediate user task, and explicitly instruct the model that retrieved context is supplementary.
Journey Context:
LLMs suffer from 'lost in the middle' and recency bias. If you put 10 retrieved memories at the end of the prompt, the agent might treat the last memory as the primary directive, ignoring the actual user request. If you put them first, they get forgotten. Structuring the prompt \(System -> Context -> User\) mitigates this. Tradeoff: consumes context tokens for structural markers, but maintains instruction adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:50:50.575356+00:00— report_created — created