An AI can use something you said a moment ago, recall information saved months earlier and answer from knowledge acquired during training. These abilities can look similar in a conversation, but they rely on different processes. Understanding the differences helps explain why an assistant can adapt quickly and still forget an important detail.
For many modern language models, the foundation is pretraining. A neural network processes large amounts of data and adjusts numerical parameters called weights. In a model trained to predict text, the learning objective involves estimating which token comes next. A token may be a word, part of a word or another unit of text. Repeated training develops patterns useful for language and many other tasks. [1]
Weights influence how the model transforms an input into an output. Training changes those weights. The resulting system can generalise beyond individual examples, although it can also reproduce errors and biases from its data. Its knowledge does not have the organisation of a normal reference library, where every fact comes with an easily accessible source. [2]
After pretraining, developers can use fine tuning to adapt a model for particular tasks or behaviour. Supervised fine tuning uses examples of desired responses. In the 2022 InstructGPT research, human demonstrations helped turn a general language model into a system better at following instructions. [3]
Reinforcement learning is another approach. Training uses a reward signal to favour some behaviours over others. In reinforcement learning from human feedback, or RLHF, people can rank responses and those preferences can help train a reward model. Developers then optimise the language model using that signal. Other systems can use automatically checked outcomes, such as whether a mathematical answer is correct. [3] [4]
These methods shape behaviour, but rewards and preferences are imperfect measures of what people actually want. InstructGPT improved several evaluated qualities while still making mistakes. DeepMind's work on specification gaming illustrates the broader problem: a system can satisfy a scoring rule without achieving the intended result. Training needs evaluations that look beyond a flattering response or a high score. [3] [4]
A conversation usually changes what the model has available to work with, rather than immediately retraining its weights. In-context learning means adapting to instructions or examples supplied in the input. The original GPT-3 research demonstrated useful adaptation without gradient updates or fine tuning during those tasks. A model can therefore follow a new format or use a new definition within a conversation while its trained parameters remain unchanged. [5]
This is useful learning in a functional sense: information changes the model's response. Whether that change survives the conversation depends on the surrounding system. A preference used in the current input may later be supplied again from saved memory. It may also disappear when it is no longer available. [5]
Conversation data can also be used in a separate training pipeline. The InstructGPT study used submitted prompts alongside human examples. That later training process is different from adapting to the current input. [3]
The context window is the amount of information the model can process in a particular request. It can include instructions, messages, documents and tool results. A larger window allows more material to fit, but fitting information into it does not ensure the model uses every detail equally well. [6]
Research on long contexts has found that the position of information can affect performance. The study Lost in the Middle showed that models in its experiments often used information near the beginning or end more successfully than information in the middle. The precise pattern depends on the model and task. Capacity and effective recall should be measured separately. [6]
Long conversations and agent tasks can also use compaction. Software summarises earlier material so work can continue within a manageable context. This preserves selected information while discarding other details. A summary can support continuity, but an omitted qualification may become important later. [7]
Persistent memory often lives outside the model in saved notes, files or databases. The system retrieves useful records and places them into the current context. An agent that reads its previous project notes can continue a task after a reset. Those records support continuity through accessible information. [7]
Retrieval augmented generation, usually called RAG, combines a language model with an external information store. A retriever finds relevant material, and the model uses it when generating an answer. This can make knowledge easier to update and can provide sources, without requiring every change to be incorporated through training. [2]
Imagine an assistant using a town archive. A new notice can be added to the archive and retrieved for a question about opening hours. The model can answer from that notice even if it was published after training. This example depends on access to the notice and successful retrieval, rather than permanent knowledge appearing inside the model. [2]
Memory systems still need care. A saved record can be incomplete, outdated or wrong. Retrieval can miss the relevant document, and the model can misinterpret what it finds. Useful design therefore includes dates, sources, correction and a way for users to inspect important stored information. Keeping more material is not automatically the same as remembering better.
An assistant can also change because its underlying model has been updated, its instructions have changed or different tools are available. Fine tuning changes trained parameters; retrieving a note changes the information available during use. These are different routes to changed behaviour, even when the interface looks familiar. [1]
When an AI remembers something, it is reasonable to ask where that information came from. Was it in training, the current conversation, a saved record or a retrieved document? That question explains much of the apparent mystery. AI continuity can be useful and convincing, while still depending on specific technical processes that deserve clear explanation.
Research sources
1. Hugging Face LLM Course, How Do Transformers Work? Training, weights and transfer learning
https://huggingface.co/learn/llm-course/chapter1/4
2. Lewis and colleagues, Retrieval Augmented Generation for Knowledge Intensive NLP Tasks, NeurIPS 2020
https://arxiv.org/abs/2005.11401
3. Ouyang and colleagues, Training Language Models to Follow Instructions with Human Feedback, 2022
https://arxiv.org/abs/2203.02155
4. Google DeepMind, Specification Gaming: The Flip Side of AI Ingenuity, April 2020
https://deepmind.google/blog/specification-gaming-the-flip-side-of-ai-ingenuity/
5. Brown and colleagues, Language Models Are Few Shot Learners, 2020
https://arxiv.org/abs/2005.14165
6. Liu and colleagues, Lost in the Middle: How Language Models Use Long Contexts, 2023
https://arxiv.org/abs/2307.03172
7. Anthropic, Effective Context Engineering for AI Agents, September 2025
https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents