Guessing the Next Word
A language model scores likely next tokens from patterns in training data. Many guesses in a row become a full answer.
- Describe reply generation as repeated next-token choice
- Explain that probabilities pick among likely words
- Use the next-word lab to see top guesses change with context
Finish first
Topic contents
Lesson 1 of 3
Autocomplete at scale
Phone keyboards suggest the next word while you type. Language models do something similar, but with billions of patterns learned from text.
Given tokens so far, the model scores what token might come next. It picks one, appends it, and repeats until a stop condition.
Try the next-word lab. Change the sentence start and watch which words rise to the top of the list.
Next word
Edit the sentence so far and see ranked guesses for the next token. Context shifts the list.
Next word guess
Probabilities, not factsThe capital of France is ___
- Paris62%
- Lyon8%
- located6%
- famous4%
Guess
The model scores likely next words from patterns in its training data. It does not look up facts like a search engine.
Lesson 2 of 3
Not magic, just very fast pattern use
The model does not look up facts in a single table like a dictionary. It blends patterns: after Paris capital of people often write France.
That works well for common knowledge and grammar. It fails when patterns are wrong, rare or missing.
Temperature is a setting that controls randomness. Low temperature picks safe likely words. Higher temperature tries less common words for creative writing.
Lesson 3 of 3
You shape the guess
Clear prompts steer probabilities. If you ask for three bullet steps, likely continuations include list markers.
Asking the model to say I do not know when unsure can reduce confident nonsense on hard facts.
Next you will see where those patterns came from: training on huge text collections.
Practice
Work these out yourself
No answer key here on purpose: these are the questions worth thinking through before you move on. Open one and work it out.
0/3 attemptedAssessment
Check your understanding
Answer each question, then read the explanation. That is where the learning is.
Finished this topic?
0 of 3 lessons marked done. Marking the topic complete ticks the rest.
