Context and Conversation History in Models
A model has three memory mechanisms: internal knowledge, short-term memory (context), and long-term memory (external sources accessed via retrieval).
Why a Model Is Not Its Own Whole Memory
It is common to talk about a model as if everything it knows sits inside it. In practice, the source describes three distinct memory mechanisms that a model can rely on, and each one differs in where its information comes from, how long it lasts, and how quickly it can be used. Understanding these differences helps you reason about why a model answers well in one moment, forgets something in another, or can be corrected without retraining.
What do you think happens?
If a rule stored in an external document is edited, does the model have to be retrained before it can reflect the change?
Reveal answer
No. Information in long-term memory can be changed or removed at the level of the data source, without updating the model.
Long-term memory is separate from the model. Internal knowledge, by contrast, is baked into the model, so changing it requires changing the model itself. Keep this contrast in mind as you read the rest of the article.
The Three Memory Mechanisms at a Glance
A model has three memory mechanisms. The first is internal knowledge, which the model retains from the data it was trained on. The second is the model's context, which holds previous messages in a conversation so the model can use them when it generates later responses. The third is a set of external data sources that the model can reach through retrieval, such as a RAG system. Each mechanism holds different kinds of information, and each reaches the model by a different route.
Read the three columns as three different answers to the same question: where does the model get the information it is using right now? Internal knowledge is already present when a query begins. Context is assembled from the conversation in front of the model. Long-term memory is fetched on demand. The difference in route is what makes each mechanism behave the way it does.
Internal Knowledge: Built In at Training Time
Internal knowledge is the knowledge a model retains from the data it was trained on. It is part of the model rather than something the model has to go and find.
Two properties define internal knowledge. First, it does not change unless the model itself is updated. Second, the model can access it in every query, because it is already inside the model. This makes internal knowledge the most stable of the three mechanisms. It is also the least flexible: to change what is stored there, the model has to be changed. The source notes that information essential for all tasks belongs here, placed through training or finetuning.
Context as Short-Term Memory
The second mechanism is the model's context. Previous messages in a conversation can be placed into the context, which lets the model use them when it generates later responses. Because the context is what the model is working with right now, the source treats it as the model's short-term memory.
Short-term memory has two defining trade-offs. It is fast to access, which makes it convenient for the current task. But its capacity is limited, and it does not persist across tasks. Each query does not carry it forward on its own. For this reason, the source says context is often used to hold the information that matters most for the current task, and not everything the model might ever need.
Long-Term Memory and Retrieval
The third mechanism is made of external data sources that the model can access through retrieval. The source gives a RAG system as an example. These sources sit outside the model, so they can be persisted across tasks. This is why the source calls them the model's long-term memory.
The most useful contrast with internal knowledge is this: information in long-term memory can be deleted without updating the model. Internal knowledge is baked in, so removing it requires changing the model. Long-term memory is separate, so the information can be changed or removed at the level of the data source. The source offers a human parallel: your long-term memory is augmented with books, computers, and notes.
Retrieval is the route by which this information reaches the model. It is not already inside the model when a query begins. It is fetched when it is needed, and the fetched material is then available to the model while it answers. The diagram below traces that path.
Tracing One Fact Through a Conversation
The three mechanisms are easier to understand when you follow a single piece of information through an interaction. The scenario below is an original illustration, built to show how the mechanisms differ. Read it first and notice where each fact ends up before checking the explanation.
A support chat about a product manual
A user is chatting with a model that helps with a hypothetical appliance. Three kinds of information are needed: a general writing skill, a detail the user mentioned earlier in the chat, and a warranty rule stored in the company's document collection. Where does each one live, and how does it reach the model?
- 1Identify the general skill
Writing a polite, clear reply is a capability the model learned during training. It is part of internal knowledge, present in every query, and it does not need to be fetched.
- 2Identify the detail from earlier in the chat
Early in the conversation the user says they own model 200 with firmware version 3. That message is part of the conversation, so it is placed into the context. It is available to the model for the rest of this chat because the context holds the conversation so far.
- 3Identify the warranty rule
The warranty rule is not something the model learned in training, and it is not in the current chat. It is stored in an external document collection. When the user asks about warranty coverage, the system retrieves the relevant rule and places it into the context for that answer.
- 4Check what persists
If the chat ends, the firmware detail stays with that conversation and is not carried forward on its own. The warranty rule remains in the document collection, where it can be updated by editing the source without retraining the model.
Writing skill lives in internal knowledge and is always available. The firmware detail lives in short-term memory (context) for this task. The warranty rule lives in long-term memory and reaches the model through retrieval when it is needed.
Deciding Where Information Should Live
The source gives a clear rule for deciding where information should live: the choice depends on how frequently the information is used. Information that is essential for all tasks belongs in internal knowledge, built in through training or finetuning. Information that is rarely needed should reside in long-term memory. Short-term memory is reserved for immediate, context-specific information. Follow the decision path below to place a piece of information.
Trade-offs of Context Versus External Sources
Choosing between keeping information in context and storing it in an external source is a trade-off. Context is fast to use but limited in capacity and does not persist across tasks. External sources persist across tasks and can be changed without updating the model, but the information has to be fetched through retrieval when it is needed. The table below compares the two.
| Property | Context (short-term memory) | External source (long-term memory) |
|---|---|---|
| Access | Fast, because it is already in the context | Requires retrieval when needed |
| Capacity | Limited | Stored outside the model in the data source |
| Persistence | Does not persist across tasks | Persists across tasks |
| Updating | Changes with the conversation | Can be changed or deleted at the data source without updating the model |
| Best use | Information that matters most for the current task | Information that is rarely needed but must be available |
Trade-offs of storing information in context versus an external source
Mistakes When Reasoning About Model Memory
Common mistake Assuming everything the model knows is stored inside it
What it looks likeBelieving that a rule in a company document is part of the model, so the model would need retraining after the rule changes.
Why it failsThe source describes long-term memory as external data sources reached through retrieval. That information is not inside the model.
Do this insteadTreat external sources as a separate mechanism. Changing the source changes what can be retrieved, without updating the model.
Common mistake Assuming context persists across tasks
What it looks likeExpecting a detail from last week's chat to be available automatically in a new task.
Why it failsShort-term memory does not persist across tasks. Each query does not carry it forward on its own.
Do this insteadIf information must survive beyond the current task, place it in a durable source such as long-term memory.
Common mistake Putting everything into context because it is fast
What it looks likePasting a large reference collection into every conversation so it is always at hand.
Why it failsContext capacity is limited. The source reserves short-term memory for the information that matters most for the current task, not everything the model might need.
Do this insteadKeep context for immediate, task-specific information and rely on retrieval for material that is rarely needed.
Common mistake Confusing how often information is used with how important it is in general
Practice Placing Information
For each item, decide whether it belongs in internal knowledge, short-term memory (context), or long-term memory (external source): (a) grammar rules the model learned during training, (b) the name a user gave you two messages ago, (c) a rarely used policy document that must stay current, (d) a formatting convention needed in every answer. Explain your reasoning using how often each item is needed.
Hints
- Ask whether the item is needed for all tasks, is rarely needed, or is specific to the immediate task.
- Consider whether the item must persist across tasks and whether it changes often.
- Internal knowledge is changed only by updating the model, so ask whether the item should be built in at all.
Key Takeaways
- A model has three memory mechanisms: internal knowledge from training, short-term memory held in context, and long-term memory in external sources reached through retrieval.
- Internal knowledge does not change unless the model is updated and is available in every query. Context is fast but limited and does not persist across tasks. External sources persist and can be changed without updating the model.
- Place information according to how often it is needed: essential information for all tasks belongs in internal knowledge, rarely needed information belongs in long-term memory, and immediate task-specific information belongs in short-term memory.