Lesson 20 / 29

Conversation Memory and Summarisation

Keep long conversations coherent without overflowing the window.

Remember what matters

Models are stateless between calls, so "memory" is something you build. Options: send the last N turns (simple, forgets early facts); keep a running summary of older turns plus the recent ones verbatim; store durable facts and preferences (name, language, project) in a small structured profile that you always include; or retrieve past messages relevant to the current question. Summaries can drop or distort details, so keep key facts separately, let users see and edit stored memory, and do not store sensitive data without a clear purpose and consent.

Let users see stored memory

If the assistant remembers anything between sessions, show it and allow edits or deletion.

Quick check: Why is conversation memory something you must build?

  • Models have no tokens
  • The model does not remember earlier calls by itself
  • Memory is illegal
  • APIs forbid history
Answer

The model does not remember earlier calls by itself — Each API call only sees what you include in it.