Home / Learn / A4

A4 AI in Practice

How do models predict, and who is responsible when they are wrong?

Lesson plans ready, Python tools in development

Stage
Coders, ages 11 to 14
Lessons
6 × 50 minutes (5 hours)
Ends with
A model with a test report and a short reasoned argument on an AI issue
Before you start
Python basics (variables, input, selection, loops)

Lesson plans ready, Python tools in development. Lessons 5 and 6 can be taught today. Lessons 1 to 4 use a small data library and a nearest-neighbour classifier that are still to be built; until then, teachers can use a spreadsheet or their own short Python scripts.

For children to do on their own. Every lesson has a step-by-step do-it-yourself version with a self-check. Open the kids’ version.

By the end, children can say

  • I can explain how a model uses features to make a prediction.
  • I can train a simple classifier on a dataset in Python.
  • I can test a model fairly and explain over-fitting.
  • I can find and describe bias in a dataset and its effect.
  • I can explain that a language model predicts likely next words and can produce confident wrong answers.
  • I can discuss an AI issue from several sides and write my own code of conduct.

About this course

Format. Python with small datasets, plus discussion and writing.

Tools. An in-browser Python editor, small built-in datasets (for example measurements of flowers or penguins) and a safe next-word demo. The dataset library and classifier are in development.

Key words. feature, label, model, training, test, accuracy, over-fitting, bias, language model, prompt, ethics.

Curriculum tags.

  • Computer science: algorithms, data, programming
  • Digital literacy: online safety, evaluating content, ethics

The current national curriculum does not mention AI by name, so each course is tagged to the strands it supports.

Lesson plans

Open a lesson to see the steps. Printing this page opens them all.

Lesson 1: How Models PredictI can explain how a model uses features to make a prediction.
  1. Retrieval (5 min). Revisit variables and lists in Python.
  2. Worked example (10 min). Predict if an animal is a cat or a dog from height and weight, using a hand-drawn dividing line.
  3. Practice (25 min). Plot a small dataset in Python and move the dividing line to see which points are classified wrongly.
  4. Reflect (10 min). Define feature, label and prediction.

Do-it-yourself version for children

Lesson 2: Build and Train a ClassifierI can train a simple classifier on a dataset in Python.
  1. Retrieval (5 min). Features and labels.
  2. Worked example (10 min). Run a provided nearest-neighbour classifier on a small dataset. (The dataset library and classifier are still to be built; see the status note above.)
  3. Practice (25 min). Change the dataset, try different features, and print predictions for new items.
  4. Reflect (10 min). What does the model do when it sees an item unlike any it was trained on?

The “Teach the machine” activity on the Try page uses this same nearest-neighbour idea, with 3 neighbours voting.

Do-it-yourself version for children

Lesson 3: Training, Testing and Over-fittingI can test a model fairly and explain over-fitting.
  1. Retrieval (5 min). Why do we hold back test data?
  2. Worked example (10 min). Show a model that scores 100% on training data and 60% on test data.
  3. Practice (25 min). Split data, compute accuracy on both sets, and try a simpler model to reduce over-fitting.
  4. Reflect (10 min). Explain over-fitting to a younger pupil in 3 sentences.

Do-it-yourself version for children

Lesson 4: Bias in Data and DecisionsI can find and describe bias in a dataset and its effect.
  1. Retrieval (5 min). The fairness idea from A2 and A3.
  2. Worked example (10 min). A pretend loan-approval or hiring dataset where one group is under-represented. Show different accuracy for different groups.
  3. Practice (25 min). Count examples per group, compute accuracy per group, and propose fixes (more data, different features, human review).
  4. Reflect (10 min). Write a short statement: “This model could be unfair to… because…”

Do-it-yourself version for children

Lesson 5: Language Models and Made-up AnswersI can explain that a language model predicts likely next words and can produce confident wrong answers.
  1. Retrieval (5 min). Recall training and test data from Lesson 3.
  2. Worked example (10 min). A tiny next-word predictor (see the code below).
  3. Practice (15 min). Predict the next word by hand, then check with the program. Add more text and watch predictions change.
  4. Investigate (12 min). Using teacher-provided example AI answers (printed or on screen, not live chat), mark claims as correct, unclear or invented and say how you would check each.
  5. Reflect (8 min). Write three rules for checking an AI answer before trusting it.
from collections import Counter

text = "the cat sat on the mat the cat ate the fish".split()
next_words = {}
for current, nxt in zip(text, text[1:]):
    next_words.setdefault(current, Counter())[nxt] += 1

print(next_words["the"].most_common(2))
# prints: [('cat', 2), ('mat', 1)]

This program only counts which word follows which. It has no idea whether anything is true, which is the point of the lesson.

Do-it-yourself version for children

Lesson 6: Ethics, Privacy, Copyright and My AI CodeI can discuss an AI issue from several sides and write my own code of conduct.
  1. Starter (8 min). Pick a case card (face recognition at a shop door, AI-written homework, a hiring tool, a voice clone) and say what could go wrong.
  2. Discuss (15 min). Structured debate: benefits, risks, who is affected, who is responsible. Include privacy, copyright and the right to opt out, and what guardrails (rules and filters that limit what an AI tool will do) can and cannot fix.
  3. Write (20 min). A one-page reasoned argument and a personal AI code of conduct (for example, “I will say when AI helped me”).
  4. Share (7 min). Read your code to a partner; badge.

Do-it-yourself version for children

For grown-ups

  • Ask: “Can an AI be unfair? How could that happen?”
  • Ask your teenager to explain why a language model can sound sure and still be wrong.
  • Talk about when you would not want an AI to make a decision on its own.

In every lesson: the “check it” habit

Who made this? What was it trained on? Where else can I check?