What Is an LLM? Large Language Models Predict the Next Word
An LLM does just one thing: it guesses the word that comes next. Here you can try with your own hands the mechanism you saw in the video.
- POINT 1An LLM is a machine that guesses the next word.
- POINT 2What comes out is not one answer but a probability for every candidate.
- POINT 3Guess one word, add it, guess again. Repeating that makes a text.
TRY 1
You are the language model. Guess what comes next
Think of the word that continues the sentence and type it in. Then compare it with the probabilities a real AI gave. Where does your guess rank?
Once upon a time, there was a?
Tries0Same as AI's #10In AI's top 50
The height of a bar is the probability the AI gave to that word. Punctuation marks are left out of the candidates.
TRY 2
Grow the text one word at a time
An LLM guesses one word, adds it to the end of the sentence, and guesses again from the new sentence. Press the button and walk through it step by step. Pick a word other than the first choice and the text takes another road.
Once upon a time, there was a?
First, let it predict the next word.
TRY 3
Another sentence, another ranking
Even the same word, "refrigerator", gets a very different probability depending on the sentence in front of it. Switch between the two sentences and watch the bars change places.
Probability of "refrigerator": <0.1% after the first sentence, 89% after the second. An LLM looks at all the words before, then predicts the next one.
- little34%
- young24%
- small11%
- kingdom9.1%
- beautiful3.4%
- refrigerator<0.1%
CHECK
Quick check
Three questions about what you learned today.
Q1When an LLM writes text, what is it doing inside?
Q2What does an LLM produce in one prediction?
Q3How does an LLM make a long text?
NEXT #2
How LLMs Generate Text: Autoregressive, One Token at a Time
Next time we look more closely at "adding one word at a time". In fact the unit is not a word but a "token".
Every probability on this page was computed by a real language model (Gemma 3 4B). The results were computed in advance, so the words you type are never sent to a server.