LLMs Unplugged

How AI writes stories

Acknowledgement of Country

EddieBenColeThomasHannahMaiaSungyeonSafiyaSuiLorennUshiniRob

Today, you’re the class

we’ll run this exactly as we would with your students

then we’ll step out and talk about running it yourselves

What is AI?

Think → share

when you hear the words artificial intelligence, what comes to mind?

think on your own, then share with the person next to you

Let’s ask one to write us a story

we need three words or ideas — hands up!

That was a language model

What just happened?

no person on the other side wrote that story for us

the language model learned patterns from huge amounts of text, then copied those patterns to make something new

today we’ll build our own language models — without a computer

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

Generation

This is (another) language model

spring → watches
spring
.
red
blue
green
yellow
swoops
the
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
watches
.
red
blue
green
yellow

One row at a time

spring → watches
spring
.
red
blue
green
yellow
swoops
the
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
watches
.
red
blue
green
yellow

Your group holds the whole model

! → comes
dog → here
is → off
on → sits
spring → watches

Worked example

your story it
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story it
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story it
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
1 counters, one per mark
your story it
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
5 counters, one per mark
your story it
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
7 counters, one per mark
your story itsits
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
blue
your story itsitson
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
your story itsitsonthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
your story itsitsonthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story itsitsonthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
18 counters, one per mark
your story itsitsonthefence
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
red
your story itsitsonthefence.
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
your story itsitsonthefence.
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story itsitsonthefence.
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
15 counters, one per mark
your story itsitsonthefence.here
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
blue
your story itsitsonthefence.herecomes
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
your story itsitsonthefence.herecomesthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
your story itsitsonthefence.herecomesthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story itsitsonthefence.herecomesthe
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
18 counters, one per mark
your story itsitsonthefence.herecomesthemagpie
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
green
your story itsitsonthefence.herecomesthemagpie
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
empty
your story itsitsonthefence.herecomesthemagpie
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
6 counters, one per mark
your story itsitsonthefence.herecomesthemagpie.
The magpie: the nine rows this story uses
.
it
red
here
blue
down
green
back
yellow
comes
the
red
blue
green
yellow
fence
.
red
blue
green
yellow
here
comes
red
blue
green
yellow
it
is
red
sits
blue
watches
green
yellow
magpie
!
red
.
blue
green
yellow
on
the
red
blue
green
yellow
sits
on
red
blue
green
yellow
the
fence
red
postie
blue
magpie
green
dog
yellow
blue

“It sits on the fence. Here comes the magpie.”

the book said “Here comes the postie.” and “Back goes the magpie.”

Your turn

write down a starting word, then repeat:

  1. find the row for the current word
  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 (it’s the new current word), tip the cup back into the tub, and pass the job to whoever has its row
10:00

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?

But where do the tally marks come from?

Training

Itisspring.Itsitsonthefence.Itwatches.
itisspring.itsitsonthefence.itwatches.
itisspring.itsitsonthefence.itwatches.
it
is
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
blue
green
yellow
is
spring
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
on
the
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
on
the
red
blue
green
yellow
the
fence
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
on
the
red
blue
green
yellow
the
fence
red
blue
green
yellow
fence
.
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
on
the
red
blue
green
yellow
the
fence
red
blue
green
yellow
fence
.
red
blue
green
yellow
itisspring.itsitsonthefence.itwatches.
it
is
red
sits
blue
watches
green
yellow
is
spring
red
blue
green
yellow
spring
.
red
blue
green
yellow
.
it
red
blue
green
yellow
sits
on
red
blue
green
yellow
on
the
red
blue
green
yellow
the
fence
red
blue
green
yellow
fence
.
red
blue
green
yellow

Listen for the word “the”

the
fence
red
postie
blue
magpie
green
dog
yellow

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.

Check the sheet

the
fence
red
postie
blue
magpie
green
dog
yellow

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.

Running it in your class

everything to print is in the pack on the lesson page: no books to find

60 minutes: one of the pack’s pre-tallied picture books per group, counters, a cup and a tub per group, and a whiteboard for training “the” together

90 minutes: add blank sheets and one of the pack’s training texts per group, then the class story

Where it fits

AC9TDI8P02 (DT, years 7–8) — analyse data to find patterns: the tallies

AC9TDI8P01_E5 (DT, years 7–8) — training data shapes a model’s output: the book in every story

AC9TDI10P01_E6 (DT, years 9–10) — the zero problem: no crocodile on any sheet

AC9M5P02 (maths, year 5) — frequency and likelihood: the cup

“So is ChatGPT just counting?”

the same loop: look at the words so far, weigh the next ones, pick one at random

it looks at the whole conversation instead of one word, and learned from trillions of words across the web

and the model is one part of a bigger system: tools it can call, filters on what goes in and comes out, instructions you never see

About your stories

who wrote your story: you, the model, or the book’s author?

our models can’t say crocodile — what might a chatbot be missing?

does a chatbot know what it’s saying?

Questions?