# LLMs Unplugged — How AI writes stories (ledger, 45 min)

> A 45-minute school workshop (ages 10-16) using paper ledger sheets and a cup of coloured counters to discover how AI writes stories

# LLMs Unplugged

## How AI writes stories

> **notes:** Open warm: today we'll find out how AI writes stories, and write some ourselves with paper and a cup of counters. No computers. Get them into groups of 4-5 now --- they stay in those groups all session.

---

## Acknowledgement of Country

> **notes:** Acknowledge the Traditional Custodians of the land you're meeting on, and pay respects to Elders past and present. Keep it brief and sincere; say it in your own words.

---

> **notes:** Quick intros --- who's in the room and why you're here. A sentence each; don't let it run.

---

## Some words we'll use

artificial intelligence (AI) — technology that mimics some human abilities, like writing stories or answering questions
language model — a system that predicts what word comes next, using patterns it learned from text
training — building a language model by finding patterns in text (its training data)
generation — using a language model to write new text, one word at a time

> **notes:** Four words we'll lean on all workshop --- reveal them one at a time and tie each back to what they've already seen: AI wrote our story; a language model predicted the next word; we'll train ours by spotting patterns in the kids' book (our training data), then use it to generate a story of our own.

---

# Generation

> **notes:** Hand out the sheets now, one per person. Keep the counters back until the activity slide --- nobody is told what the colours mean yet, and a cup on the table is a cup on the floor.

---

## This is a language model

> **notes:** Take your time here. This is one sheet of it. Left column: words from the book. Along each row: the words that followed, and a mark for every time the book did it. That's the whole thing --- no rules, no grammar, just a count of what came next. Let them look at it before you touch a single row.

---

## One row at a time

> **notes:** Read the row aloud as a sentence: after the word "the", this book said "magpie" six times, and "fence", "postie" and "dog" four times each. The magpie groups can find this exact row; every other group finds the row for a word they like in their own book and reads it the same way. Two or three groups read theirs out.

---

## Your group holds the whole model

> **notes:** Every sheet holds a run of words in alphabetical order, and the header says which. To find a word, read the headers. These are the magpie headers; every book deals differently, so each group practises on its own. Two lookups each: "who has it?" (the magpie: sheet 3), "who has fence?" (sheet 2). The header is the whole trick --- nobody has to search, they just read ranges.

---

## The colours

> **notes:** Now the colours. Every word in a row sits in a coloured box, and the counters come in those same four colours: a red counter means the word in the red box. Hold up a red counter: on the row for "the", red means "fence". On the row for "swoops", red means "the" --- the colour names the place in the row, not the word. That's why one set of counters works for every row, and for every book in the room. Four colours, always in the same order: red, blue, green, yellow.

---

# Worked example

---

> **notes:** Walk through the next slides slowly --- the mechanics are simple but the hand-over ("who has the next row?") is where groups stall. Give every group four jobs: a reader (finds the row), a filler, a drawer, and a writer. If you have a real cup and a visualiser, do the draws for real and use the slides as the backup.
>
> The sheet on screen is nine rows of the magpie's ledger --- the ones this story is going to visit, gathered onto one page; in the room they are spread across the five sheets. A story can start with any word you like. We'll start with "it": write it down, and whoever has the row for "it" finds it. Three words ever came after "it" in this book, and the cup is empty.

---

> **notes:** First word in the row: "is", one tally mark, red box. One red counter into the cup.

---

> **notes:** Next word: "sits", four marks, blue box. Four blue counters.

---

> **notes:** Last word: "watches", two marks, green box. Two green counters, and the row is in the cup.

---

> **notes:** Seven counters for seven marks. The cup now holds the row's counts --- the more marks, the more counters, the more likely. Ask before you draw: which colour do you think will come out?

---

> **notes:** Blue: the likeliest one, four chances in seven. Write "sits" down, tip the cup back into the tub, and pass to whoever has the row for "sits".

---

> **notes:** No cup needed: after "sits" this book only ever said "on". A one-word row needs no draw at all. Groups will hit a few of these, and they speed things up.

---

> **notes:** And after "on", only ever "the". Another one-word row, straight onto the page.

---

> **notes:** The biggest row yet: all four boxes have marks. One counter for every mark, each in its box's colour.

---

> **notes:** Eighteen counters across all four colours --- four red for "fence", four blue for "postie", six green for "magpie", four yellow for "dog".

---

> **notes:** Red comes out, and this row is worth pausing on --- we come back to it in a minute.

---

> **notes:** After "fence" this book only ever said ".", and a full stop is a word like any other. The full stop goes on the page, and whoever has the row for "." takes over.

---

> **notes:** The row for "." says how this book starts its sentences: four words ever started one.

---

> **notes:** Fifteen counters: six red for "it", and three each of blue for "here", green for "down" and yellow for "back". Mostly red.

---

> **notes:** Blue has three of the fifteen and comes out anyway. Unlikely isn't impossible --- that's the cup doing its job.

---

> **notes:** After "here" this book only ever said "comes".

---

> **notes:** And after "comes", only ever "the". Two more one-word rows, straight onto the page.

---

> **notes:** Back on the row for "the". Same row, so the same counters go in.

---

> **notes:** The same eighteen counters as before.

---

> **notes:** This time green comes out: "magpie", not "fence". Same row, same cup, different word. Hold onto this one: it is the answer to "why didn't two groups with the same book write the same story?"

---

> **notes:** Two words ever came after "magpie".

---

> **notes:** Six counters: three red for "!", three blue for the full stop.

---

> **notes:** Blue, and the sentence ends. Eleven words in, and we have a sentence this book never said: it says "Here comes the postie." and it says "Back goes the magpie.", and the model has glued the two together, because it only ever knows what comes next, one word at a time. Stop at a full stop or a question mark you like, or keep going.

---

_"It sits on the fence. Here comes the magpie."_

the book said _"Here comes the postie."_ and _"Back goes the magpie."_

> **notes:** Read it aloud with feeling, then the book's two lines underneath it. Which bits sound like the book? Which bits are new? A hint of the original, not a copy. Nobody wrote this sentence --- the counting did.

---

## Your turn

write down a starting word, then repeat:

1. **find the row** for the last word you wrote
2. **fill the cup**: one counter for every tally mark, each in its word's colour
3. **draw one** without looking --- its colour tells you the next word
4. **write it down**, tip the cup back into the tub, and pass the job to whoever
   has that word's row

> **notes:** This is the whole loop on one slide --- leave it up while they work. Hand out the cups and tubs now. Four jobs per group: a reader who finds the row, a filler, a drawer, and a writer. Any word will do to start, and when they hit a "." or "?" they like, they can keep going or start again from any word.
>
> Circulate. Common stalls: forgetting to tip the cup back into the tub between draws (the counters from the last row are still in there); a row with no marks at all (the word only ever ended the text --- start again from any word); arguing about which box a colour is (read the name printed in the box's corner).

---

# Shareback

---

## No two stories the same

two groups with the **same book**: why aren't your stories the same?

could any group's model write a story about a **crocodile**?

> **notes:** Pick four or five groups, not all of them. Three probes. First: the stories sound like their books, because the model only has the words, and the pairs, that its book had. Second: two groups with the same sheets gave two different stories --- the cup is random, and a model that's asked twice gives two answers (the wrap-up comes back to this). Third: no crocodile anywhere on any sheet, so no model in the room can say it. Then the hinge: so where did these marks come from? Someone counted. Next section: you're the ones counting.

---

# Where did the marks come from?

> **notes:** The sheets were finished when they arrived. Now the reveal: somebody made every mark by reading the text. We'll build the start of one sheet together, pair by pair, then make one row all at once.

---

> **notes:** This is the start of The magpie, as the book writes it.

---

> **notes:** Before anything gets counted, the text is split into words: every word made lowercase (except "I"), and every full stop split off as a word of its own. That's how the computer read the books too, and why the sheets are all in lowercase.

---

> **notes:** Now read it two words at a time: "it", then "is". It's the first time we've seen "it", so it gets a new row; "is" goes in the row's first box, with one mark beside it.

---

> **notes:** Move along by one: "is", then "spring". The second word of the last pair is the first word of this one, so the text is read once and every pair in it gets counted. A new row for "is", "spring" in its first box, one mark.

---

> **notes:** "spring", then ".". A full stop is a word like any other, so it goes in the box like any other.

---

> **notes:** ".", then "it". Now the full stop gets a row of its own --- and that row is how this book starts its sentences.

---

> **notes:** "it", then "sits". The row for "it" already has "is" in its red box. "sits" is new after "it", so it takes the next empty box: blue. That's where a row's colours come from --- each new follower gets the next box, in the order the text meets them.

---

> **notes:** From here, let the room call each pair before you click. "sits", then "on": a new row.

---

> **notes:** "on", then "the".

---

> **notes:** "the", then "fence".

---

> **notes:** "fence", then ".". The row for "fence" gets the full stop.

---

> **notes:** ".", then "it" --- and we've seen this pair before. No new box: a second mark beside "it" in the row for ".". That's how a count builds: the common pairs collect marks, the rare ones don't.

---

> **notes:** "it", then "watches": the third word ever to follow "it", so it takes the third box, green. Every row on every group's sheets was made exactly this way, pair by pair, through the whole book.

---

## Listen for the word “the”

> It is spring. It sits on **the** fence. It watches. Here comes **the** postie. Down swoops **the** magpie! Off runs **the** postie. Back goes **the** magpie. It sits on **the** fence. Here comes **the** dog. Down swoops **the** magpie! Off runs **the** dog. Back goes **the** magpie. It sits on **the** fence. Here comes **the** postie and **the** dog. Down swoops **the** magpie! Off run **the** dog and **the** postie. Back goes **the** magpie. It sits on **the** fence. It watches.

> **notes:** Tell the room: every time you hear "the", shout the word that comes next. Read The magpie aloud, slowly, leaning on every "the" (18 of them). The room shouts the next word; a helper tallies it on the whiteboard in four boxes --- fence, postie, magpie, dog, in that order. About 90 seconds. The whole book is on the slide, every "the" in bold.

---

## Check the sheet

> It is spring. It sits on **the** fence. It watches. Here comes **the** postie. Down swoops **the** magpie! Off runs **the** postie. Back goes **the** magpie. It sits on **the** fence. Here comes **the** dog. Down swoops **the** magpie! Off runs **the** dog. Back goes **the** magpie. It sits on **the** fence. Here comes **the** postie and **the** dog. Down swoops **the** magpie! Off run **the** dog and **the** postie. Back goes **the** magpie. It sits on **the** fence. It watches.

> **notes:** Compare the whiteboard with the row: fence 4, postie 4, magpie 6, dog 4 --- the same marks as the magpie group's sheet. Every row on every group's sheets was made exactly this way; the only difference is that a computer read the books, and keeps the counts as numbers rather than tally marks. Real AI does the same thing with a huge amount of text.

---

## About your stories

if you started with the same starting word, would you generate the same story again?

what would help our paper language models write better stories?

what is different about the way you write a story and the way a language model does?

> **notes:** First: no---re-run a generation, or the Part 1 chatbot story, to show the randomness gives a different answer every time. Second opens the door to "more data, bigger model, longer memory" without naming those terms. Third is the one to leave time for: a person writes with something to say, the whole story in their head, and a reader in mind; the model only ever picks the next word from the one before it. Take answers rather than supplying that one.

---

# Questions?
