Report #50841
[architecture] Old memories injected into context window are polluting new answers and overriding current instructions
Implement a recency-weighted decay and relevance scoring before injection, and strictly isolate retrieved memories from system instructions.
Journey Context:
Agents often retrieve top-k memories via vector similarity, but high similarity doesn't mean currently relevant. E.g., a user's preference from 2 years ago might conflict with a current preference. Vector stores treat all embeddings as equally timeless. The fix is to attach metadata \(timestamps\) and apply a decay function or filter by recency window before injecting into the LLM context, and place retrieved memories below system instructions in the prompt hierarchy.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:49:05.642551+00:00— report_created — created