Report #51352
[architecture] Retrieved memories from past sessions are overriding or polluting the agent's current context and instructions
Implement a composite retrieval score that multiplies semantic similarity by a recency decay factor and an importance weight. Do not rely on pure cosine similarity for memory retrieval.
Journey Context:
Pure vector similarity retrieval ignores time. A highly relevant memory from a year ago might be returned over a moderately relevant memory from 5 minutes ago, causing the agent to use stale facts \(e.g., an old API key or deprecated instruction\). The Generative Agents architecture solved this by scoring memories on a combination of recency \(exponential decay\), importance \(LLM-rated\), and relevance \(embedding similarity\). This prevents old, highly similar but obsolete vectors from poisoning the current working context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:40:55.373923+00:00— report_created — created