Contradictory and Stale Memories
In this article
- Pick the active record from conflicting memory records with an ordered rule - explicit correction, supersedes link, observed time, write time, then ask.
- Explain why last write wins lets an old fact come back when a job re-extracts it.
- Keep the losing record as superseded, linked to the winner, so a later write of the old value is rejected.
- Say which part of the rule a managed memory service covers and which part you still build.
- Terms defined here: memory conflict, supersession.
Overview
A customer told your support assistant months ago, more or less, that email works for them. Today they type "Text me instead of email." Now the store holds two answers to one question: how should the assistant send updates?
Picking today's answer feels obvious, and it is right this time. The hard part is next week, when a background job re-reads an old chat, finds "email" again, and writes it as a fresh memory. Here you learn an ordered rule that picks the active record and says why it won, and a small piece of bookkeeping that keeps the losing record around so the old answer cannot quietly return.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Two records, one question
- Last write wins, and how it breaks
- When the fact was observed
- Merging and deleting
- Three kinds of conflict
- The ordered rule
- Running it on m1 and m2
- What Memory Bank does
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions