Report #54485
[architecture] Old memories polluting current context window
Implement a multi-factor retrieval score combining semantic similarity, recency, and importance, and set a strict threshold for injection into the prompt.
Journey Context:
Agents often dump all retrieved memories into the context. This dilutes the signal, wastes tokens, and causes the LLM to hallucinate based on stale data. A pure vector search returns semantically similar but temporally irrelevant results. Tradeoff: aggressive filtering might miss rare but crucial long-term facts, but context pollution is usually a worse failure mode. Use a scoring function \(recency \* relevance \* importance\) to ensure only high-signal memories make it into the limited context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:56:57.484622+00:00— report_created — created