Report #2366
[architecture] Old retrieved memories polluting current context window
Implement a composite retrieval score combining semantic similarity, recency \(exponential decay\), and importance, rather than relying solely on vector cosine similarity.
Journey Context:
Agents commonly use top-k vector search to fetch memories. However, pure semantic search ignores time. A highly similar but 6-month-old memory will override a moderately similar memory from 5 minutes ago, causing the agent to suggest outdated code or resolved bugs. Exponential decay ensures recent context takes precedence, while importance prevents critical long-term facts from decaying too fast.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T11:32:28.852500+00:00— report_created — created