Talking with AI, Part 1: What Does Training an LLM Mean?
What training changes in a model, and how pre-training, fine-tuning, RAG and information supplied in context differ.
Part 1 of 11 in Talking with AI: From LLM Training to AGI
A conversation between Dr. Suttisak Denduangchai and ChatGPT-5.6 Reasoning Instant, translated from the original Thai chat. ChatGPT’s explanations and examples are preserved, with headings, tables and mathematical notation adjusted for reading on the web.
Me: What does training an LLM mean?
ChatGPT-5.6 Reasoning Instant:
Training an LLM (Large Language Model) means enabling a model to learn patterns of language, knowledge, and problem-solving from enormous amounts of data, by adjusting the numbers inside it called weights/parameters so it can predict what should come next more accurately.
Put as simply as possible:
An LLM is a next-token prediction engine trained so well that its resulting behaviour looks like reading, writing, explaining, programming, and reasoning.
1. What does it do when training begins?
Suppose the data contains this sentence:
The cat sat on the ___
We might want the model to predict:
mat
But while it is still unskilled, it might predict:
car 30%
table 20%
mat 5% ← the actual answer
banana 2%
...
The system calculates how wrong the model was. This is called Loss.
It then uses backpropagation + an optimizer to calculate how the neural network’s parameters should move.
Training data
↓
Tokenizer
↓
Tokens
↓
Transformer
↓
Predict next token
↓
Compare with actual token
↓
Loss
↓
Backpropagation
↓
Update weights
↺
Repeat at enormous scale
That is the real heart of training.
2. Modern LLMs are not trained only once
Models such as GPT, Claude, Gemini, and Llama broadly pass through several stages.
First stage: Pre-training 🏋️
The model is given huge amounts of data, such as:
Books
Web pages
Wikipedia
Academic papers
Code
Documentation
Forums
...
so it can learn to predict tokens.
For example:
The capital of Thailand is → Bangkok
public static void Main( → string[] args
Newton's second law is → F = ma
After doing this at immense scale, the model does not merely memorize sentences; its parameters begin to encode patterns and relationships.
For example:
Paris → France
Tokyo → Japan
C# → .NET
Python → pip
dog → animal
salmon → fish
including much more complex patterns.
3. Post-training 🎓
A pre-trained model alone may be good at language, but it is not necessarily a good assistant.
For example, we ask:
Explain Docker for me.
The model might continue text in the style of a book, or generate odd text, because its original goal is to predict tokens, not to help humans.
So there are additional steps, such as Supervised Fine-Tuning (SFT).
It is given examples roughly like this:
USER:
Explain Docker simply.
ASSISTANT:
Docker lets you package an application...
The model learns how it should respond when it receives this kind of instruction.
4. Preference / Reinforcement Learning
The next stage teaches it which answers are better.
For example, the model produces 3 answers:
A: Very long but wrong
B: Correct, concise, and easy to understand
C: Partly correct
and preference data says:
B > C > A
Techniques such as RLHF, RLAIF, reward models, or various preference-optimization approaches then push the model’s behaviour in the desired direction.
So the assistant we use is not merely:
Pretrained LLM
but roughly:
Raw data
↓
Pre-training
↓
Base model
↓
Instruction / supervised training
↓
Preference + reinforcement/post-training
↓
Safety & behavior training
↓
Assistant model
The real details differ across companies and model generations.
5. Very important: Training ≠ putting data into a database
People often misunderstand this.
Suppose we train on this sentence:
Suttisak likes The Sims.
That does not mean the model contains a table like this:
SELECT fact
FROM knowledge
WHERE person = 'Suttisak';
There is no database like that.
What changes are the vast numbers of weights in the neural network.
Roughly:
Before training
weight_123 = 0.03721
After training
weight_123 = 0.03724
Vast numbers of other parameters change at the same time.
Knowledge is therefore distributed across the parameters, rather than stored as clear records.
That is one reason an LLM can know a great deal yet sometimes hallucinate: it is not opening a database and retrieving the correct fact every time.
6. How does Fine-tuning differ from Training?
Fine-tuning is in fact a kind of training, but its starting point differs.
Pre-training
Random / initial weights
↓
Huge amounts of data
↓
General-purpose LLM
Compared with:
Fine-tuning
Existing LLM
↓
Much smaller amounts of specialized data
↓
Specialized model
For example, you might take a general model and fine-tune it on specialized report examples so that its response style and terminology fit the work more closely.
But if the goal is to make it know the latest information in an organization’s documents, fine-tuning is often not the best answer.
That is where RAG comes in instead:
Question
↓
Search documents
↓
Retrieve relevant passages
↓
Give them to LLM
↓
Generate answer
RAG does not change the weights at all.
This is the major difference:
Method: Pre-training
- Changes weights?: ✅
- Suitable for: Building an LLM
Method: Fine-tuning
- Changes weights?: ✅
- Suitable for: Changing behaviour/expertise
Method: RAG
- Changes weights?: ❌
- Suitable for: Providing information from external documents
Method: Prompting
- Changes weights?: ❌
- Suitable for: Telling it what to do
Method: Context window
- Changes weights?: ❌
- Suitable for: Providing temporary information in a conversation
To truly understand LLMs, the interesting next question is: “Why does simply forcing a model to predict the next token turn it into a model that can write C#, translate languages, and solve math problems?” That is the most wondrous and strange part of LLMs 🧠⚙️
Next: How Can Predicting the Next Token Lead to Coding? →
Read the series
- Part 1: What Does Training an LLM Mean? (this episode)
- Part 2: How Can Predicting the Next Token Lead to Coding?
- Part 3: Context, Attention and Memory During a Conversation
- Part 4: Why More Thinking Can Improve an Answer
- Part 5: GPUs, VRAM and the Infrastructure Behind LLM Training
- Part 6: From a Base Model to an Assistant
- Part 7: Does an LLM Memorize, Learn or Guess?
- Part 8: Following a Token Through a Transformer
- Part 9: From an LLM to an AI System and Agent
- Part 10: More Compute for Training or for Answering?
- Part 11: From More Capable LLMs to the Question of AGI