All lessons in AI Engineering: From Foundation Models to Evaluated Applications
State, Memory, and Persistence
Separate conversation state from durable memory and design isolation and retention rules.
60 minutes · Members lesson · preview
What you will learn
- Separate conversation context, task state, durable memory, and authoritative records.
- Design isolated persistent state with expiry and versioned updates.
- Recover a paused task without duplicating actions or treating stale facts as current.
Alice approves a support ticket, closes the browser, and returns later. The assistant should recover the pending task and determine whether the ticket was created. Replaying the conversation into a model and asking it to guess what happened is not a reliable recovery strategy. The application needs explicit state outside the model's current context.
T15 introduced bounded control loops. This core knowledge lesson specifies the information those loops retain, where it lives, and when it becomes invalid. T17 uses this state design for resumable orchestration and human review. Required practice P08 implements and tests restart behavior; this lesson establishes what the implementation must preserve.
The examples use synthetic users, records, and retention periods. The periods are engineering choices for the exercise, not universal privacy or compliance requirements.