Turn word frequencies into dice outcomes, then sample words without always picking the most common one.
Last lesson, we counted six endings: mat, mat, mat, chair, chair, roof. Now we will use a six-sided die to choose one of those endings.
This is a toy probabilistic text generator, not a miniature LLM. You can do it with paper and a physical die.
Make your prediction first. Help opens once you've locked it in.
Use the interactive board to roll a virtual die and record your outcomes. You can also use a physical die and compare the results.
Copy this table into your book:
| Die result | Next word |
|---|---|
| 1, 2, 3 | mat |
| 4, 5 | chair |
| 6 | roof |
Roll a die ten times, recording each result and the chosen word. Use the board's virtual die if you do not have a physical die: it shows each roll, such as Rolled 4 → chair, and your last ten rolls. Keep the lookup table unchanged.
Compare with a partner. Did you get identical results? Does a short run always match the expected 3:2:1 ratio?
Roll the virtual die at least ten times.
Use the board. This ticks when you get there.
Count how many faces select chair out of six.
Consider why ten rolls might contain no roof outcomes.
Connect probabilities with the different results of repeated rolls.
Choosing an outcome according to its assigned probability is called sampling. A model can use sampling instead of always selecting the single most frequent word.
A generator that always picks the top word would write "mat" every single time. Rolling lets it write "chair" or "roof" sometimes. This is one reason a chatbot can give different answers to the same question.
Our model only chooses one word after one fixed phrase. A larger word-transition model would use the newly chosen word to look up another set of possible next words. That is still far simpler than a modern LLM.
Make a new lookup table and roll five times. Explain what changed: the die, the sampling procedure or the model's examples?
Write one sentence distinguishing probability from what actually happened in your rolls.
A writing assistant produces “The cat sat on the roof.” The sentence is plausible, but that does not tell us whether a real cat sat there. Compare two prepared AI responses to a learner asking, “Is this sentence true?”
Which response better distinguishes generation from verification? What evidence would you need to establish whether the event happened?
Next: let a computer repeat this same sampling procedure, and decide what understanding you must keep.
Lesson done. You've finished every step you need.
Map six equally likely die faces to endings and distinguish probabilities from observed rolls. About 25 minutes.
Open the teacher guide: answers, solutions, slides and a worksheet.
Use the board as a transparent fixed-context model, not a miniature modern LLM. No AI account is required. The Explain it to me clip is an optional scaffold after prediction. The board shows each roll ("Rolled 4 → chair") and the last ten, so students can match its die to their own table. Model the difference between what a text generator produces and what evidence supports. The dice model illustrates sampling, not how a modern assistant checks facts. Students need not calculate formal probabilities to make this distinction.
Students may think a streak changes the odds, or that ten rolls must give five mats.
Stretch: Explain where the toy model differs from a modern AI assistant.
Support: Use the prepared examples, read the explanation aloud and repeat a small trial.
Unit 1, lesson 3 lets the computer repeat the same rolls thousands of times.