Summary

In this activity, students act as a large language model to generate a sentence based on a prompt. Students are introduced to the concept of a token in text generation. Then, the class is given a prompt: “Tell me a fun fact about potatoes,” along with the first token generated by the LLM: “Potato.” Choosing from a small bank of tokens, students vote on which token should be next generated; the most popular choice is added to the response. The process is repeated until a full sentence is generated. The activity is followed by a discussion about the accuracy of the generated text.

Topics

Generative AI: text generation

Audience

Introduction to AI, grades 5-12

Difficulty

The activity targets AI novices with no programming experience or knowledge of AI. 

The core activity takes no more than 15 minutes but can be extended.

Strengths

The assignment clearly conveys basic concepts of text generation in an embodied, highly participatory way. Students walk away understanding:

- The definition of “token” and the role tokens play in text generation.

- Text is generated based on probabilities formed by word associations.

- Generated text isn’t guaranteed to be accurate.


This lesson is reasonably accessible for teachers who are AI novices.

Weaknesses

Being human, students come into the activity with a “built-in” sense of word associations, which doesn’t accurately reflect the way LLMs are trained. Students may also not understand that LLMs process tokens mathematically. Students may overextend their experience and anthropomorphize LLMs. 


Students may develop an incorrect assumption that LLMs have small token banks. 

Dependencies

It is helpful if students have interacted casually with an LLM in their daily life or schoolwork.


This lesson is “unplugged.” It requires no computers or computational power. 

Variants

Facilitators may consider prompting students to feed the same prompt (“Tell me a fun fact about potatoes”) into a real LLM to compare the results. 


Facilitators may also choose to add an activity exploring transformers and attention mechanisms.

Act Out An LLM - Classroom slides.pdf

Act Out An LLM - Facilitator guide.pdf