Report #95862
[architecture] Retrieved memories from previous sessions are polluting the current task, causing the agent to hallucinate or follow outdated instructions.
Implement a recency and relevance scoring decay \(e.g., exponential time decay\) and strictly isolate task-specific context from general long-term memory. Always prompt the LLM with a clear boundary between current task and retrieved memories.
Journey Context:
Pure cosine similarity retrieval ignores time. A memory from 6 months ago about a similar API might be retrieved and overwrite a new API spec. Without temporal decay or explicit metadata filtering \(e.g., project\_id\), the agent conflates past and present. You must multiply the similarity score by a time-decay function to ensure recent, relevant facts outrank ancient, slightly-more-similar facts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:29:18.730566+00:00— report_created — created