Report #5183
[architecture] Old retrieved memories polluting current context window
Implement a two-phase retrieval filter: semantic similarity followed by a temporal/relevance classifier that explicitly checks if the memory contradicts the current state before injection.
Journey Context:
Agents often retrieve memories based purely on vector similarity, pulling in outdated preferences or resolved errors \(e.g., 'user hates dark mode' when they just switched to dark mode\). Pure vector search lacks temporal awareness. A secondary LLM call or metadata filter \(e.g., checking a 'valid\_until' timestamp or running a contradiction check\) prevents stale state from overriding fresh context, trading a slight latency increase for significantly reduced hallucination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:47:38.684635+00:00— report_created — created