Report #85760
[architecture] Old retrieved memories are polluting new agent responses with irrelevant or contradictory context
Implement a two-stage retrieval filter: first semantic similarity, then temporal recency weighting and contradiction detection \(e.g., using an LLM-as-a-judge step to resolve conflicting memories before injection\).
Journey Context:
Naive RAG retrieves based purely on vector similarity. If a user changes their preference \(e.g., 'I prefer dark mode now' vs 'I prefer light mode'\), both memories have high similarity to 'theme preference', leading the LLM to hallucinate or get confused. Alternatives: pure decay \(deletes too much\), pure overwrite \(hard to match exact entities\). The right call is recency-weighted retrieval combined with explicit contradiction resolution to ensure the agent acts on the latest truth without losing historical context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:32:06.216697+00:00— report_created — created