← Teacher guide

Build a text generator with dice

Map six equally likely die faces to endings and distinguish probabilities from observed rolls.

AI Foundations · How AI generates text · about 25 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Before class

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.

Running the lesson

  1. Engage: have students predict ten rolls before sampling.
  2. Explore: compare results with a partner; short runs differ.
  3. Explain: the optional line on always picking the top word links sampling to chatbots giving different answers.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

Students may think a streak changes the odds, or that ten rolls must give five mats.

When students get stuck

What you will seeA question to askThe fix
A student thinks ten rolls must produce exactly five mats.Does each roll know what the previous rolls were?Roll ten more on the board and compare the two sets of ten.

Answers to the checks

  1. Engage: is the most likely outcome certain?: If three faces on a die mean 'mat', two mean 'chair' and one means 'roof', what happens when you roll?
    Any of the three words can occur. Mat is most likely, but no outcome is guaranteed.
  2. Explore: build the lookup table: Which assignment matches the counts mat = 3, chair = 2, roof = 1?
    1–3 mat; 4–5 chair; 6 roof
  3. Explore: roll the die: Roll the virtual die at least ten times.
  4. Read the dice table: What is the chance of getting 'chair' on one roll?
    2/6
  5. Explain an unexpected sample: You and a friend each roll the board's die 10 times. Your friend gets roof 3 times. You get roof 0 times. What is true?
    Both results can happen with the same die and table
  6. Elaborate: change the model: A new collection has 2 mat, 3 chair and 1 roof. Which assignment matches it?
    1–2 mat; 3–5 chair; 6 roof
  7. Evaluate: explain an unexpected outcome: Your model produces 'roof' twice in a row. What is the chance of roof on the next roll?
    Still 1 in 6
  8. Learning with AI: plausible is not the same as correct: The generator writes 'The cat sat on the roof.' What would tell you whether a real cat sat on a roof?
    Someone who saw it, or a photo

Stretch and support

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.

Exit ticket

Can roof appear twice in a row without the model changing?

Yes. Each roll can select the roof face; two such rolls do not alter the mapping.

Where it leads

Unit 1, lesson 3 lets the computer repeat the same rolls thousands of times.