Short-term versus long-term
Short-term memory is the running conversation placed back into each request, limited by the context window. Long-term memory is stored outside the model, in a database or vector store, and fetched when relevant: a customer's preferred pickup address, an earlier complaint, a decision made last week.
Common designs
- Rolling summary: older turns are condensed into a short note.
- Fact store: durable details, such as name and preferences, saved as separate records.
- Retrieval memory: past conversations are searched by meaning and relevant bits are pulled in.
Risks to manage
Wrong memories persist, so let users view and delete what is stored. Keep each customer's memory strictly separate from others. Decide how long to keep it, and do not save sensitive data the assistant does not need. Memory that is never pruned also bloats prompts and raises cost.
Questions, answered
No. Unless the developers build memory in, each session starts blank.
In your own database, keyed to the customer account, with access controls and a retention rule.