30 June 2025 / Applied AI / 8 chapters

How memories get written

From Long-term AI memory: records, relationships and retrieval

If memory writes are fully automatic, casual remarks and model guesses turn into context that sticks around. I'd put a candidate stage between extraction and anything being used as durable memory.

After a task or conversation, an extractor can propose candidate records with source spans, types and confidence. Then deterministic checks throw out anything malformed, any unsupported types, anything missing a source and values outside the permitted scope. For records with bigger consequences, you might want a person or an authoritative system event to confirm them before they're promoted.

Different memory types should have different promotion rules. If a user says outright "please remember that I prefer email for this project", that can be accepted under their identity. A comment about someone else's health, access or performance shouldn't be stored as a preference just because it came up in the same conversation. A change of production owner should come from the approved operational source or review process.

Deduplication has to understand meaning, and similar wording isn't enough to go on. Two records can read almost the same and have different scopes. Going the other way, "Friday" and an ISO date can be the same value once you resolve "Friday" against the source's timestamp. Normalise values where the type allows it, then compare subject, property, scope and effective period.

When a candidate conflicts with a current record, don't overwrite in place. Create the proposed replacement, link it to the old record with supersedes and apply your authority rules. If neither source clearly wins, mark the property as disputed and return that status when it's retrieved.

Batch extraction has to respect the boundaries between users, projects and source permissions. A background job working across lots of transcripts mustn't create links across tenants, or use a broad embedding index to get around source access.

Store the extraction version and policy version with each record too. When the schema or model changes, you can find which memories were made under the old rules and reprocess selected sources, without pretending the earlier records never existed.

All articles