CSE Roadmap

Core tier · about 8 hours · 6 parts

Part 1 of 6 · 3 min read

Overview

In this module you will

  • Tell short-term memory from long-term memory, and say where each one lives (the window, a database) and when it is lost.
  • Name three kinds of long-term memory (semantic, episodic, procedural), give an example of each, and say which update rule each needs: replace, append, or version.
  • Build a memory store on a real database (SQLite) with those three kinds, history for facts, versions for procedures, and a quarantine table.
  • Write the write path: extract candidate memories from a turn, decide who is allowed to change memory, and keep a record of what was refused.
  • Show, with a test, why untrusted text must not write memory: a web page that rewrites where reports go is a bug that survives every future session.
  • Forget properly: a hard delete that removes every version, scrubs copies in summaries, and is checked at the level of the file's bytes.
  • Compare five ways of carrying the past into a new session on the same questions, with token counts.
  • Find the weakest link: the step that turns a conversation into memory, and what is lost when it misses a paraphrase.
  • Test a memory store: 131 tests, and 28 planted defects to find out which mistakes the tests would miss.
  • Answer "how would you give an agent memory across sessions?" with a design, not a product name.

A model remembers nothing between calls (module 1). Whatever an agent appears to remember is something its code stored and then put back in the window.

Module 1 settled what goes in the window now. This module is about what is available to choose from when the session is new: what to remember, in what shape, and who may write it. Getting it wrong has three costs that you can measure. Remember too little and the agent asks the same questions every day. Remember in the wrong shape and old values sit next to new ones. Remember from the wrong source and an attacker's sentence becomes a permanent "fact".

About the examples, and what is real

Everything runs offline in code/mini-memory. Real: the memory store is a genuine SQLite database (a file on disk in the forgetting experiment); the write gate, the hard delete and the scrub of copies are real code, and the delete is checked by reading the raw bytes of the database file; the five recall policies, the scoring, the 131 tests and the 28 planted defects are real and deterministic.

Imitated: the 12 sessions are generated by a seeded script (a user states facts, corrects some, makes decisions, and a web page carries a planted instruction); the extractor that decides what to remember is a short list of patterns standing in for a model, chosen to be predictable and to miss paraphrases on purpose; the session summary is the first user line plus the "Decision:" lines, standing in for a model-written summary; relevance is word overlap (module 4 replaces it with search by meaning); tokens are counted by the rough rule from module 1. No real model is called. The numbers show how the designs compare in this made-up setting, not how a real model behaves. Hard exercises say "I did not run this, so your numbers are the ground truth".