Training data, the raw material
An AI learns from examples. Full stop. It needs training data, a great deal of it. For a modern language model that is essentially text: websites, books, forum posts, Wikipedia, scientific papers, code repositories. For an image AI it's billions of images, usually with short captions ("a red apple on a table"). For a speech AI it's hour after hour of audio recordings.
The quantities are hard to imagine. A large language model is often trained on amounts of data equivalent to hundreds of billions to trillions of words, more text than a human could read in a thousand lifetimes. That's exactly why these models seem so well-read: they've essentially read the internet.
Picture training data as a student's school library, except this library is the size of an entire city. What's on those shelves shapes what the student later considers "normal" or "correct". If something is missing, she doesn't know it. If a lot of wrong information is in there, she absorbs that too.
The learning process: guessing millions of times and improving
When training starts, the neural network's weights are set randomly. The network, quite literally, knows nothing. If you showed it half a sentence at this stage, it would predict complete nonsense. And then the real trick begins, it sounds simple, but it's the heart of all modern AI:
The model gets an example
A piece of text from the training data. For instance: "The capital of France is ____". The last word is hidden.
The model guesses
With its current, still-random weights, it produces a prediction. At the start, probably nonsense like "banana" or "blue".
The error is measured
The system compares the prediction with the real answer ("Paris") and calculates how far off it was.
The weights are adjusted a tiny bit
Each of the billions of weights is nudged a tiny step in the direction that makes the error smaller. This step is called backpropagation.
Repeat, many billions of times
Steps 1 through 4 run again and again with ever-new pieces of text. After billions of repetitions, the model gets most examples pretty much right.
That's the entire trick. Each individual step is trivial, a tiny nudge in the right direction. But the sheer volume of repetitions with an almost unfathomable number of examples means that, in the end, a model emerges that "knows" a great deal.
Like cramming vocabulary, but millions of times over. Imagine going through a thousand new flashcards every day, correcting every mistake, for five years straight. That's how an AI learns. Just much faster, and with far more cards.
The AI doesn't learn what's true. It learns what fits.
The three phases: pre-training, fine-tuning, RLHF
With modern language models, training doesn't happen in one go, it runs in three phases. Each phase has a purpose, and you'll hear these names often.
1. Pre-training: the general education
In pre-training, the model reads enormous amounts of raw text, the internet, books, code, all sorts of things. Its only goal: predict the next word. Exactly what we described in the chapter "How does AI work?".
This is where the foundations form: grammar, vocabulary, world knowledge, a feel for language. But the model after pre-training is not yet a friendly chat partner. It's more like an extremely well-read but somewhat rambling book, it can imitate any style, knows thousands of facts, but it doesn't yet know that you've asked a specific question and want a specific answer.
Pre-training is the most expensive step. It takes weeks to months, costs many millions, and needs enormous amounts of computing power. That's why only a handful of companies do this from scratch at all.
2. Fine-tuning: the vocational training
In fine-tuning, the model gets significantly fewer, but much more targeted examples. Say, thousands of question-answer pairs that show how a helpful assistant should respond. The model gets "specialized", for friendly answers, for a particular domain, for a particular format.
Imagine someone who has read a huge number of books but never worked as a waiter. Fine-tuning is then the two-week induction at the restaurant: What do you say when someone walks in? How do you take an order? The base knowledge was already there, now the role gets added.
3. RLHF: the polish through human evaluation
Perhaps the most important step for models like ChatGPT carries an unwieldy name: RLHF, Reinforcement Learning from Human Feedback. In other words: reinforcement learning from human feedback. Sounds complicated, but at its core it's simple.
Humans are shown several AI answers to the same question and rate which one is better. "This answer is friendlier." "This one is more accurate." "This one is more helpful." From these thousands of ratings, the model learns which kind of answer people prefer, and adapts accordingly.
RLHF is the reason modern chat AIs come across as so polite, helpful and cautious. Without RLHF they would be unfiltered, sometimes impressive, sometimes blunt, sometimes completely off. With RLHF they become "assistants", but they also lose a bit of their raw spontaneity.
Garbage in, garbage out
There's a saying from computer science that fits AI especially well: Garbage in, garbage out. Junk in, junk out. No matter how elegant the architecture, how large the model, how clever the training algorithm, if the data is bad, the result will be bad too.
What does "bad data" mean? Several things:
- Wrong data: If the internet states a hundred times that Berlin is in Belgium, the model could learn exactly that.
- Skewed data: If 90% of the training texts come from one particular cultural background, the model will see the world from that perspective.
- Outdated data: If the training data ends in 2023, the model knows nothing about 2024.
- Filtered or slanted data: If someone deliberately feeds in only certain opinions, the model learns those as the default.
An early AI for candidate screening at a large tech company was trained on job applications from the past ten years. During that period, predominantly men had been hired. The AI learned from this: applicants with male patterns are successful. It began systematically rating applications from women lower. The system was shut down again, but it shows how quickly a bias in the data becomes a bias in the AI.
Bias, how prejudice gets into the AI
The word bias roughly means preconception or systematic error. AI bias arises almost always because the training data doesn't represent the world in a balanced way, and in practice that's nearly unavoidable. The internet is not representative. Books are not representative. Wikipedia is not representative. Every data source has its own skew.
Such skews migrate into the models. Image AIs trained mostly on Western photos generate mostly Western weddings when prompted with "wedding". Language models pick up clichés from the texts they've read. Translation AIs turn gender-neutral English words into stereotyped roles ("the doctor" becomes masculine, "the nurse" becomes feminine, in languages with grammatical gender).
Bias in AI is rarely malicious intent, it's usually a mirror of our world and our data. But: when AI is used in hiring processes, credit decisions, or policing and the justice system, these skews can affect real people. An AI is never "neutral" just because it's a machine. It's exactly as neutral as the data it was fed.
What does this mean for you as a user?
We can't influence an AI's training ourselves, that's done by the companies that build the models. But if you understand how training works, you can use AI more consciously:
Mind the cutoff date
Ask about your model's "knowledge cutoff". It doesn't know anything after that. Asking about current events is risky.
Check sources
The AI has read a lot, but it can't cite where it knows something from. For important facts: verify.
Keep bias in mind
On topics like gender, culture, or politics, read the answers critically. The AI can pick up clichés without noticing.
Niches are thin
For very specialized topics there's usually little training data available. The AI will still answer, so be cautious.
Learning is not understanding
One last important thought to close with. A neural network learns from data, but this "learning" is not the same as our human learning. The model doesn't build concepts in the philosophical sense. It finds statistical regularities and stores them in its weights.
That's impressive. It's enough for many practical tasks. But it's also why an AI can get things so wrong so quickly in unexpected situations: as soon as the question falls outside the patterns the training covered, the AI doesn't start reasoning, it keeps rolling the dice in probability space. In the next chapter we'll look concretely at how all of this becomes a "Large Language Model".
What you now know
- An AI learns from huge amounts of example data, through millions of guesses, error measurements, and tiny weight adjustments (backpropagation). Like cramming vocabulary, just on an unfathomably larger scale.
- Modern language models emerge in three phases: pre-training (general education from the internet), fine-tuning (specialization), and RLHF (polish through human evaluation).
- "Garbage in, garbage out" applies everywhere: bad or one-sided data produces bad or biased models. Bias in AI is almost always a mirror of the training data, not a neutral machine standpoint.