Skip to main content

Free AI lesson plan, lesson 2 of 10

How AI Works

Essential question

Why should students understand artificial intelligence and its ethical uses?

  • About 35 minutes
  • Short video or no-video activity
  • No AI background needed
  • Free

Download this lesson

Tap the files you want, then press Download.

The answer key needs a free teacher account. Create one.

Lesson objectives

By the end of this lesson, students will:

  • Understand how AI converts data into tokens through tokenization
  • Determine why AI companies have the motivation to collect more data through web scraping
  • Learn how data tokens form a comprehensive response through pattern-recognition
  • Assess the societal limitations of generative AI responses based on data limitations

Lesson flow

  1. Lecture8-10 minutes
  2. Whole Class Discussion10 minutes

Key vocabulary

Data
Information, such as text, images, or numbers, that an AI learns from.
Inputs
What you give an AI, like the question or text you type.
Outputs
What the AI gives back, like its written answer.
Token
A small piece of text, such as a word, part of a word, or a punctuation mark, that an AI works with.
Tokenization
Breaking text into tokens so a computer can process it.
Embedding
Turning tokens into lists of numbers so a machine can find patterns and compare meanings.
Predictions
The AI's guesses about which token is most likely to come next.
Web Scraping
Using automatic programs to copy large amounts of information from websites.
Large Language Model (LLM)
An AI trained on huge amounts of text to predict the next likely words.

Every term from all 10 lessons is in the AI glossary.

Student reading, from the activity pack

How Does AI Write an Answer?

When you type a question into a chatbot, it seems like the AI is thinking about your question. What is really happening is closer to your phone keyboard suggesting the next word. The chatbot is powered by a large language model (LLM), an AI trained on huge amounts of text so it can predict what words are likely to come next.

Everything starts with data, the information an AI learns from. The text you type is the input, and the answer the AI gives back is the output. A computer cannot read words the way you do, so first it uses tokenization: it breaks the input into small pieces called tokens. A token can be a whole word, part of a word, or a punctuation mark. For example, "unbelievable" might be split into "un", "believ", and "able".

Next, each token goes through embedding, which turns it into a list of numbers. Words that are used in similar ways get similar numbers, so "dog" and "puppy" end up close together. Now the model can do math with language. Using patterns it learned in training, it makes a prediction about which token should come next, adds it, and repeats, one token at a time, until the answer is finished. It is not looking facts up. It is choosing what usually comes next.

To learn those patterns, models need enormous amounts of text. A lot of it comes from web scraping: using automatic programs to copy information from websites, such as articles, forums, and posts. More data usually makes a model better at sounding natural, so AI companies have a strong reason to collect as much as they can. This raises questions. Did the people who wrote that text agree to have it used? Was private or copyrighted material included?

Because an LLM predicts likely words instead of checking truth, it can produce answers that sound confident and polished but are wrong. A confident tone is not proof. The model also only knows what was in its data. If most of the text came from one language, one country, or one point of view, the model may be weaker or unfair when it deals with other languages, cultures, or communities. It can also repeat the stereotypes and opinions found in human writing.

Knowing how AI writes helps you use it wisely: treat its answers as a starting point, double-check important facts, and notice whose voices might be missing from its data.

Classroom activity: Be the Language Model

Pairs or small groups, paper only. Tables and cards are in the activity pack.

  1. In groups of three or four, each person writes five short sentences that start with "My favorite food is" or "After school I usually". This is your group's training data.
  2. Tokenize: draw a slash between each word in every sentence. Count how many tokens your whole dataset has.
  3. Predict: for each starter phrase, tally which word came next most often in your data. That is your model's prediction. Fill in the table.
  4. Test it: another group gives your "model" a new starter phrase. Answer using only your data. Discuss: what happens when the data has no good match, and whose answers were missing?

Discussion scenarios

The Scraped Story

A student posts original short stories on a public writing website. Months later, she learns an AI company copied the site to train its model, and the chatbot can now write stories in a style a lot like hers.

  • Should companies need permission before scraping public posts? Why or why not?
  • Who benefits from this, and who might be harmed?

The Confident Report

Jordan asks a chatbot for facts about a small town in another country for a project. The answer is detailed and confident, but a classmate who grew up there says several details are wrong.

  • Using what you know about data and predictions, why might the chatbot get this wrong?
  • What should Jordan do before turning in the project?

Exit ticket questions

What students answer at the end of the lesson. Answer choices are on the worksheet, answers in the teacher guide.

  1. What is a large language model?
  2. How do AI models learn?
  3. For large language models, what is embedding?
  4. Why is AI capable of producing fake and incorrect responses?
  5. If a large language model is confident in its response, does that mean it is correct?
  6. Explain the ethical concerns of AI models being trained on human text and media? Think about human biases and opinions fed into AI training.

Want more?

Sign up to get more resources

A free teacher account unlocks every answer key, plus editable teacher guides, video lessons with built-in checkpoint questions, class rosters, assignments, and a gradebook that shows how every student is doing.

Take it further

  • Want The Ethics Lab at your school?

    We'll set up your classes on the platform, walk your teachers through it, and help you get district privacy approval. Free for every school.

    anik@ethicslabs.ai
  • Have a student start a chapter

    Students teach these lessons to their peers, every member who finishes earns a certificate, and anyone in a chapter can compete for $500 with an AI-driven community project.

    See student chapters
  • Want more info on the platform?

    Interactive video lessons with checkpoint questions, class progress tracking, and certificates students actually earn. See how it works for schools.

    See the platform

Questions about anything on this page? Email anik@ethicslabs.ai. A real person answers.