A notes file keeps conclusions, such as "the student struggles with off-by-one errors," and drops the events behind them. Episodic memory keeps those events: each episode is one small, structured record of what happened, when, in what context, and how it turned out. Continuing the tutoring agent from Lecture 9.1, this lecture centers on what an episode stores (time, session, topic, event, and outcome) and why each field matters for retrieval. It separates episodic memory (events) from semantic memory (facts distilled from many events), and both from semantic search. Episodes are stored in an append-only log on disk, written through a tool that the system prompt cues. The second half of the lecture covers which episodes to bring into the context. Recency answers "What happened last session?" and needs nothing more than the end of the log. Relevance answers "Has the student hit this problem before?" and uses embeddings and a vector database such as ChromaDB or FAISS, which makes it RAG over the agent's own past. The Generative Agents paper blends recency, importance, and relevance into one score. A common split has the harness load recent episodes at startup while the model searches for relevant ones through a tool.
Generative Agents: Interactive Simulacra of Human Behavior — Park et al., UIST 2023. Introduces the memory stream, a log of an agent's experiences, and retrieves from it by combining recency, importance, and relevance. Also introduces reflection.