Report #68379
[architecture] Appending new facts that contradict existing memories causing the LLM to hallucinate
Implement upsert logic: before saving a fact, search for existing highly similar facts and use an LLM to resolve contradictions, updating the old memory rather than appending.
Journey Context:
Naive RAG just appends new documents. If a user says 'I moved to New York' and memory has 'User lives in London', appending creates a conflict. The LLM might guess either city. Upserting requires a read-before-write cycle, adding latency and compute cost, but ensures a single source of truth and prevents context pollution from conflicting facts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:15:35.512719+00:00— report_created — created