Where models learn: pretraining and data
A model’s knowledge and mistakes begin long before you type a question. What does it learn from, and when does that learning stop?
Learning happens before the question.
In the last lesson, a model chose the next token from a probability distribution. Those probabilities come from pretraining: a long training run in which the model reads a very large amount of text and repeatedly practices predicting what comes next. Each prediction is scored, and the model’s numerical weights are adjusted to do slightly better.
A tempting picture is that the model stores documents and looks up the answer when you ask. That is not how a standard language model answers. At answer time it runs its fixed weights over your input. What a base model “knows” from pretraining was folded into those weights earlier.

Same prompt, different data diets.
Below, a toy model learns what follows “The capital of Australia is”. Train it on casual posts, then on reference pages, and watch the same prompt give different answers. Then change the ticked documents without pressing Train and see what the model does about it.
Tick the documents the toy model trains on, or start from a preset. Ticking changes the data, not the model, until you press Train.
Trained model, asked:
The capital of Australia is …
Trained on 7 of 11 documents (7 match this prompt).
Everything here is invented: eleven short documents, a count-based “model”, and percentages that are just shares of matching documents. Real pretraining uses vast amounts of text and a neural network that adjusts numerical weights, not a tally of words, and real data mixtures are not this clean. The fact that Canberra is Australia’s capital is real; the made-up posts exist only to show how a skewed diet can skew an answer.
What training leaves behind.
Follow the Australia example through the three stages. The toy used counts to keep the idea visible; a real model compresses patterns into weights, but the stages are the same.
- 1. DataDocuments say “Canberra” or “Sydney” after the same words, in different proportions.
- 2. TrainingThe model is adjusted until its next-token probabilities fit those patterns. In the toy, that was pressing Train.
- 3. AnsweringThe finished model turns your prompt into probabilities. The documents are not consulted, which is why un-trained changes did nothing.
The pretraining objective is predicting text, not checking facts. When the data is mostly right, predictions tend to be right too, but nothing in the objective guarantees truth.
What data shapes, and what it cannot fix.
Training data influences coverage (topics seen often are usually handled better than rare ones), style, and errors. A widely repeated mistake can be learned along with facts. Topics that are thin or missing leave the model guessing from nearby patterns.
Training also stops. Information published afterwards is not in the weights. An application can supply it in the request (a later lesson covers context windows) or retrieve it from outside, but that is the app adding information, not the model having learned it. Later lessons cover how base models become assistants, why models make things up, and knowledge cutoffs.
Check your understanding.
Take this with you.
Pretraining turns a large body of text into weights. Whatever the data over- or under-represents, the model can echo, and it does not look anything up at answer time. If an answer is wrong or stale, ask what the training data contained and what the app supplied.