Lesson 04.08 · Phase 04 · Memory & Context Engineering
Memory writes: what to keep
Let the model propose memories, and let code decide. Every write must quote what the user actually said, and pass gates for secrets, durability, specificity, consent and duplicates.
Learning objectives
- Explain why "store everything the model extracts" fills memory with guesses, moods, secrets and duplicates.
- Implement a write policy as ordered gates: grounded, not secret, durable, specific, consented, not a duplicate.
- Require every candidate memory to carry the user's exact quote, and reject candidates whose quote the user never wrote.
- Score a write policy against a human reviewer's labels, including the cases it gets wrong.
Lessons 6 and 7 built stores. Something has to decide what goes into them. The obvious design is to ask the model after each turn: "extract anything worth remembering about the user". It will happily oblige. From one short conversation it proposes:
Loading the full lesson…