Report #93413
[architecture] Old or irrelevant retrieved memories polluting the context window, confusing the LLM and causing it to hallucinate by trying to reconcile unrelated facts
Implement a strict relevance threshold \(e.g., cosine similarity > 0.8\) for retrieval, and always map retrieved memories to the current intent before injecting them into the prompt.
Journey Context:
Just doing top-K retrieval blindly injects noise. If the agent asks 'What's the weather?', retrieving a memory about 'User likes pizza' because it's the 'closest' vector wastes tokens and derails the LLM's reasoning. LLMs try to be helpful and will force a connection between the prompt and the injected memory. A hard cutoff threshold and intent-mapping step prevents low-signal memories from polluting the active context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:22:56.144236+00:00— report_created — created