Memory
How an AI application remembers beyond one call: short-term memory in the context window, long-term memory in stores it saves to and searches.
Read first: Context engineering.
D1 · StoryFor young children and total beginners
The AI forgets everything when a chat ends. To remember you, the app writes notes in a notebook.
Next time, it reads the useful notes back to the AI before you start talking.
Like: A notebook the helper reads before each visit.
D2 · PictureFor curious beginners
The model's weights do not change while you chat, so all memory lives in the application.
Short-term memory is the conversation inside the context window. When it gets too long, older turns are dropped or summarised.
Long-term memory is a store outside the model: facts, preferences and past summaries saved to a file or database, then searched and loaded back into the context when relevant.
A memory loop across sessions
- Recall: search the store
- Load: into context
- Chat: short-term memory
- Summarise: what mattered
- Save: to long-term store
Like: A notebook the helper reads before each visit.
Where it breaks: A person decides what is worth writing down and notices when a note is out of date. An AI memory system can save wrong or stale facts, or even planted instructions, and then trust them later.
D5 · FrontierFor experts
Hard parts: deciding what to save and what to forget, keeping memories correct as facts change, and stopping injected text from becoming a lasting memory.
Summaries lose detail, and there is no agreed way yet to test whether long-term memory makes an assistant better or just more confident.