Report #22300
[architecture] Old memories polluting current context window
Use Maximal Marginal Relevance \(MMR\) or strict similarity thresholds during retrieval, combined with a recency weight, to ensure only highly relevant and recent memories are injected into the prompt.
Journey Context:
Agents commonly dump top-k semantically similar memories into the prompt. If a user changes tasks, memories from the old task bleed into the new one because they are semantically similar to the ongoing conversation. Top-k is insufficient because it forces k results even if irrelevant. MMR diversifies the retrieved set, while thresholding prevents low-relevance memories from entering the context window at all.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:50:50.026478+00:00— report_created — created