Report #30028
[architecture] Old memories polluting current context window and causing hallucinations
Implement a two-phase retrieval: semantic search followed by temporal decay scoring/reranking, and strictly limit injected memory tokens to a fraction of the context window.
Journey Context:
Agents often dump all semantically similar memories into the prompt. This pushes out relevant recent context and causes the LLM to hallucinate based on stale data. Relying solely on vector similarity ignores time. Reranking with an exponential decay function ensures recent, relevant facts take precedence over ancient, slightly-more-similar ones, preventing the model from acting on revoked or outdated states.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:47:26.632903+00:00— report_created — created