Report #17861
[architecture] Long-term memory retrieval pollutes context window with stale or irrelevant facts
Use a two-stage retrieval pipeline: semantic search followed by a relevance classifier \(LLM or small model\) before injecting into the context window.
Journey Context:
Naively dumping top-k vector search results into the prompt often introduces conflicting or outdated information, degrading the LLM's reasoning. Agents need a 'working memory' filter. The tradeoff is added latency/cost for the filtering step, but it prevents context window overflow and hallucination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:41:44.445863+00:00— report_created — created