Report #49121
[architecture] Old memories polluting current context window
Implement a two-phase retrieval: first, retrieve candidate memories using semantic search; second, use an LLM call to filter/rerank these candidates strictly 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 'delete the file', semantic search might retrieve memories of 'creating the file' or 'reading the file' because they share embeddings. Injecting these distracts the LLM, causing it to hallucinate or act on outdated states. Reranking based on temporal recency and current intent alignment prevents the context window from becoming a garbage dump of loosely related historical facts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:56:12.438776+00:00— report_created — created