← Back to course
1/6
Week 04 · How Generative Models Write

Monday

Writing one word at a time
// One word at a time, smooth but not always true
⏱ about 20 min

Monday: Writing One Word at a Time

Librarian Joss lays a new page from the SH-1 packet on the table. It is a practice quiz SH-1 wrote, and every line reads smoothly.

"It writes like a person!" Comet says. "Let's show the panel today."

Wren taps his clipboard. "What does the evidence say? How does it write anything at all?"

Comet pulls out the original Tiny Text tally table. "Maybe the way Tiny Text would. One word at a time."

Nova hovers over the table and projects a die beside it. "Would you like a hint?" she asks. "Turn each tally into die faces, then roll."

Comet rolls and writes: the library opens at eight. "It works!"

She rolls again and writes: the gym opens at eight.

Wren checks the cards. "T6 says the gym opens at seven."

This week's driving question

Why does a model that predicts the next word sometimes say false things confidently?

This week you will run Tiny Text with a die, sort what it writes, and rate SH-1's first risk.

Real AI check
Nova is a character in our story. Real AI is a tool people build. It does not think or feel like a person, and it can be wrong.

Generative models follow patterns

Generative AI makes new "synthetic" content, such as text, images, audio and video. That content imitates the data the model learned from.

Generative models make outputs that follow the statistical patterns of their training data.

Large language models predict the next word, or token, in a sentence.

Tiny Text is far simpler than any real language model. It shares one idea with them: it picks the next word from patterns in its training data.

From tallies to die rules

Last week the crew trained Tiny Text on six cards. Each tally became die faces: the more often a word came next, the more faces it gets.

This week the crew runs the original six TT-1 cards, from before last week's fix for the library's new hours. So the cards still say the library opens at eight.

CardTraining sentence
T1the library opens at eight
T2the library has quiet rooms
T3the lab opens at nine
T4the lab has new desks
T5the library opens at eight
T6the gym opens at seven
After this wordRoll the dieNext word
the1, 2 or 3library
the4 or 5lab
the6gym
library1, 2, 3 or 4opens
library5 or 6has
lab1, 2 or 3opens
lab4, 5 or 6has
gymno rollopens
opensno rollat
at1 or 2eight
at3nine
at4seven
at5 or 6roll again
has1, 2 or 3quiet (then rooms)
has4, 5 or 6new (then desks)

A sentence always starts with "the". It ends after eight, nine, seven, rooms or desks. Tiny Text is a made-up example the crew runs on paper.

READ THE DIE RULES
  • Read the question.
  • Tap your answer.
You are after "the" and roll a 4. Which word comes next?
You are after "library" and roll a 5. Which word comes next?
You are after "at" and roll a 6. What do you do?
Why does "library" get three of the six faces after "the"?

A worked run

Comet starts with "the" and rolls a 2, so the next word is library. Then she rolls a 1, so library is followed by opens.

Opens always goes to at, so she does not roll. Then she rolls a 2 after at, which gives eight.

Her sentence is "the library opens at eight." It matches cards T1 and T5.

RUN IT YOURSELF ON PAPER
  • Read the question.
  • Tap your answer.
Start with "the". Your rolls are 4, then 2, then 3. What sentence do you get?
Start with "the". Your rolls are 1, then 6, then 2. What sentence do you get?
Comet's second sentence was "the gym opens at eight." How many rolls did it take?
StatementTrue or false?
Generative models make outputs that follow patterns in their training data.?
Large language models predict the next word or token.?
Generative AI can make text, images, audio and video.?
Tiny Text works exactly like a real language model.?
WHY THIS EXERCISETiny Text is a tiny model that shares one big idea with real ones, not every detail.
Content that generative AI makes is called ____ content.
A language model predicts the next word or ____.
GENERATE ONE TINY TEXT SENTENCE
  • ?Roll again only when the rule asks for a roll.
  • ?Stop when you reach eight, nine, seven, rooms or desks.
  • ?Write that word, then look up the rule for it.
  • ?Write the word "the".
  • ?Roll the die and find the next word in the rules.
WHY THIS EXERCISEA model writes one word at a time, each one picked from what came before.

Great start, reviewer. Tomorrow you will list every sentence Tiny Text could ever write and sort them.