Exploring How LLMs Use Probability to Generate Text: Interactive Activities for Middle School StudentsK12
Large Language Models (LLMs) generate text by sampling from probability distributions, a process that underpins both their creative potential and their tendency to produce inaccurate responses, such as “hallucinations.” This probabilistic foundation is largely invisible to end users, who often interpret LLM outputs as deterministic. This hidden process highlights a critical challenge for AI literacy: supporting students in understanding uncertainty in LLMs as a representative case of generative AI systems. This work introduces a set of unplugged activities and an interactive tool that connect LLM text generation to probability concepts. By adjusting sampling parameters (temperature, top-p), students can observe how probability distributions shape the text a model generates. Our approach links curriculum-based probability standards to real-world AI, providing educators with accessible resources to foster both conceptual understanding and critical awareness of generative AI.