How we keep a model's hallucinations out of durable memory (a model-independent grounding check)
A problem I suspect a lot of you have hit: agent memory stores remember whatever the model decides to remember, hallucinations included. Once a made-up "fact" is in durable memory it gets retrieved and repeated for weeks.
Confidence scores don't save you. A mis-calibrated model will hand you a high-confidence claim that simply isn't in the source.
What we do: a claim never becomes durable memory on confidence alone. It has to pass a source-grounding check that's model-independent. At least one of the claim's cited evidence snippets has to actually be present in the source text it was extracted from (normalized substring match, with a token-overlap fallback for punctuation/format drift). If nothing the model cited is in the source, the claim stays a reviewable "signal" and never auto-promotes.
It's deliberately lenient. A false negative is just an extra human review; we never want a false positive (an auto-promoted hallucination). High-impact claim types (forecast, commitment, deal risk) also need independent corroboration or a human even when grounded.
The honest limitation we're still tuning: lexical grounding proves the quote exists, not that the inference is correct. A real quote can back a wrong inference. So it's a floor, not the whole trust model.
Disclosure: this is from an open-source project I work on (CRMy), Postgres-backed.
Curious how others here gate what gets written to long-term memory. Anyone doing semantic/NLI-based grounding instead of lexical, and is it worth the latency?