Report #11301
[architecture] Old memories polluting current context window
Implement a composite retrieval score combining semantic similarity, recency \(exponential decay\), and importance \(1-10 score assigned at write-time\), rather than relying purely on vector similarity.
Journey Context:
Naive RAG retrieves memories based solely on embedding cosine similarity. This causes old, trivial facts to be retrieved if they happen to match the query keywords, pushing out relevant recent context and causing the agent to hallucinate or revert to outdated states. The Generative Agents architecture solved this by defining memory retrieval as a function of Recency, Importance, and Relevance, ensuring only highly relevant AND fresh AND significant memories occupy the limited context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:05:34.760868+00:00— report_created — created