LESSON 82 / 215·2 min readIntermediate

Context, short-term memory, and conversation memory

Should knowConcept lesson
01 Understand02 Recall03 Prepare

Words made simple

A few useful meanings before you read the explanation.

State
The data describing where a workflow is now, what it already knows, and what still needs to happen.
Persistence
Saving information so it remains available after a request ends or a process restarts.
Authorization
Checking what that identity is allowed to read or do. Being logged in does not grant access to every record.
More words from this lesson
Tenant
A customer or organization whose data must stay separate from other customers in a shared application.

🟠 SHOULD KNOW · Memory is an application data design, not proof that a model remembers accurately.

Overview

  • Context is what the model sees now.
  • Short-term memory is task/session information retained across nearby steps.
  • Conversation memory is selected dialogue history or a summary used to maintain continuity.

Why this matters

Users refer to earlier information and dislike repeating details every turn.

An everyday example

A support employee keeps notes during your call.

A technical example

Retain a verified claim ID, recent messages, and pending question in a session record.

How it works

  1. Persist scoped messages/events
  2. Select recent relevant items
  3. Refresh authoritative facts
  4. Construct bounded context
  5. Update approved session state.

Architecture and flow

Session store → history selection + verified facts → current model context.

The insurance assistant example

“What document did you say was missing?” uses previous dialogue but rechecks the claim's current document status.

When to use it

Multi-turn chat and active task assistance.

When to avoid it

Do not resend every conversation forever or treat old dialogue as current backend truth.

Interview answer

“I persist conversation state but send only relevant context, and I refresh business facts through authorized tools.”

Benefits, trade-offs, and production considerations

  • Scope conversations by tenant and user, handle deleted messages, and retain tool-call/result pairs correctly.
  • Unbounded history increases privacy exposure, cost, and confusion.
PAUSE & RECALL

Can you explain it without the notes?

Context, short-term memory, and conversation memory

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

Context is what the model sees now. Short-term memory is task/session information retained across nearby steps. Conversation memory is selected dialogue history or a summary used to maintain continuity.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Long-term, semantic, episodic, and user-profile memory

Adapted from 13_AI.MD · “Context, short-term memory, and conversation memory”. Examples are study fragments; framework behavior can depend on your version.