Lesson 04.07 · Phase 04 · Memory & Context Engineering
Semantic & procedural memory
Facts need a key, a source and a rule for change. Procedures need a one-line description that is always visible, and a body that loads only when it is needed.
Learning objectives
- Implement a fact store keyed by (subject, attribute), with a source and a time on every fact, and explicit rules for when a new value replaces an old one.
- Explain why a fact store looks facts up by key, while episodic memory searches by similarity.
- Implement procedural memory with progressive disclosure: an index of one-line descriptions always in the prompt, full bodies loaded only for the task at hand.
- Measure the token cost of loading every procedure versus disclosing them on demand.
Lesson 6 stored episodes and searched them by similarity. That works for "has something like this happened before?". It works badly for two other kinds of memory every agent needs.
Loading the full lesson…