Report #30962
[architecture] Old memories polluting current context window
Implement a two-stage retrieval: semantic similarity \+ temporal decay scoring \(recency bias\), and always re-rank retrieved memories against the current user intent before injecting into the prompt.
Journey Context:
Agents often dump raw vector search results into the context. If a user asks 'how do I fix the login bug', a vector DB might return a 6-month-old login bug that was already fixed. This wastes context tokens and confuses the LLM. Alternatives: just relying on top-k \(fails over time\). Tradeoff: adding recency decay requires storing timestamps and computing scores, slightly increasing retrieval latency, but prevents stale context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:21:29.921607+00:00— report_created — created