Keeping agent memory current when facts change
Similarity search returns an old fact and its correction together, and recall@k cannot tell them apart. Storing supersession on the record and grading the final answer can.

Embedding similarity measures what a statement is about, not whether it is still true, so a fact and the two corrections that replaced it come back together, and recall@k, satisfied once the current one is anywhere in the top k, records a success.
Keeping an agent’s memory current is a question of state before it is one of retrieval. A changed fact should supersede a record instead of joining the corpus as one more document to rank, and the evaluation has to grade the final answer; LongMemEval, a conversational memory benchmark, tests knowledge updates as an ability of its own. Both requirements shaped a backend memory service I built around an embedded engine in the lineage of mem0, an open-source memory layer for agents. It extracts durable facts about the user and project after each conversation turn, stores them with embeddings, and injects the relevant ones into the agent’s context before the next prompt. The extraction and retrieval primitives are that engine’s; the service around it and the evaluation are mine.
Why recall@k misses stale facts
In a synthetic scenario from my benchmark suite, a user tells an assistant that deploys go straight to production. Three weeks later, they say deploys now go through staging with a one-hour soak; later still, deploys go out as a canary taking 5% of traffic for 30 minutes. In a new session, they ask how deploys work.
All three statements cluster in the same neighborhood of embedding space, so similarity search on its own behaves as designed and pulls contradictory deployment rules into the same prompt, leaving the model to reconcile them. Retrieval-only metrics miss this failure mode by construction. On a separate retrieval check of 15 queries over 24 memories, the service scored a recall@5 of 1.0, confirming that vector search surfaces the target record while saying nothing about whether obsolete versions arrived alongside it.
Consolidation, recency, and explicit supersession
Stale facts can be kept out of context in two places, by rewriting the store periodically and by biasing recall toward newer entries, and my memory service does both. A background consolidation pass has an LLM compare related memories and choose to add, update, delete, or do nothing, allowing a correction to replace the record it contradicts. At recall time, ranking blends similarity with recency and a per-category prior, and caps any category at four results so one active topic cannot crowd out the rest.
Neither mechanism settles currency at the data layer. Consolidation is an asynchronous LLM pass, and recency weighting only shifts scores, so a detailed older memory with tighter similarity can still outrank a terse correction or appear alongside it. Even with both in place, recall is still estimating which version is current from a blended score.
A second memory implementation in Ferrite, a separate project of mine, removes that guesswork by putting supersession directly into the data model. Stored records are the authoritative source of truth, while the HNSW vector index and BM25 keyword index are derived and rebuildable. When a fact changes, the new record can name the one it supersedes, dropping the older record from listings and recall deterministically instead of relying on recency weights to push it below the top-k cutoff.
Evaluating knowledge updates end to end
Because stale memories cause errors at answer synthesis rather than retrieval, evaluation has to exercise the full path. My evaluation harness ingests statements in order through the ingest API, queries later through the recall API, passes the question and recalled context to a small model to answer, and has a larger model judge the response. If an outdated deployment rule leaks into the prompt and corrupts the answer, the case fails even when the current rule lands at rank one.
These results come from local model-and-judge runs rather than leaderboard comparisons. On a custom set of 33 questions across ten categories, corrections and supersessions among them, the service scored 33 of 33, which mostly confirms that a system can pass the test suite written alongside it. LoCoMo, a conversational memory benchmark, gives a less charitable read. Across 1,540 LoCoMo questions, the service answered 980 correctly, about 64%, holding near 70% on single-hop and near 68% on temporal cases while dropping to around 45% on multi-hop ones, which require combining facts. On the 446 abstention questions in the same benchmark, where stored memories do not contain the answer, it abstained correctly on 385.
Chris Chabot, November 2026