3. Where do the right answers come from?
First, two words from before.
In lesson 1, X is a…
In lesson 2, the number of mistakes for one X is the…
Who wrote the right answers?
The examples from lesson 1:
| temperature | right answer |
|---|---|
| 15° | not hot |
| 22° | not hot |
| 28° | hot |
| 33° | hot |
Who decided that 22° is “not hot”?
Right answers written by people are labels. Writing them is labeling.
You’ve done it too. Clicking “Spam” on an email labels it: this email → spam. Mail services train their spam filters on millions of such clicks.
Labeling takes people’s time. An LLM learns from trillions of words, and nobody labels those. So where do its right answers come from?
The answer is in the text
Finish this:
Happy birthday to ___
That’s the trick. Cut any text after some word: the word right after the cut is the right answer. Nobody has to write it down.
Move the slider. Each position gives one example. The words before the box are the input, and the boxed word is the answer. Earlier answers stay blue.
How many examples does “The cat sat on the mat” give?
Who labeled these examples?
Type a sentence with at least two words and click Show examples. Hello, world! counts as two words. Then move the slider to the end.
A program that guesses the next word
An LLM is a program like the one in lesson 1. Its input is text, and it answers with the next word. It has parameters too, only billions of them.
When ChatGPT answers you, it does this over and over: guess a word, add it to the text, guess the next one.
Start with a dumb program. Whatever the text, it says “the”.
Move the slider to the end. How many mistakes does the program make?
What just happened
- Right answers written by people are labels. In lesson 1 a person decided that 22° is not hot.
- In text, the next word is the right answer. So any text becomes training data, with no labeling.
- An LLM is a program with parameters that guesses the next word. Its loss is, roughly, how often it guesses wrong. Training changes the parameters to make the loss smaller, just like picking
Xin lesson 2.