How can a computer recognise a pattern? For students, this question can open the door to understanding artificial intelligence. It turns an unfamiliar concept into something they can investigate through examples, experiments and discussion.
Teaching AI in the classroom can begin with a clear relationship: computers use data to identify patterns, and those patterns can help them classify new information. Exploring this process helps students ask what an AI system has learned and why its results might change.
Start with something students already understand
Students encounter classification whenever they sort objects into groups. They might organise building bricks by colour, separate animals by their characteristics or arrange shapes by the number of sides.
Ask students to explain their choices. Which features did they notice? What made an object belong in one group rather than another?
These conversations introduce the idea of categories. They also reveal that the same collection can be organised in different ways, depending on the features and purpose of the task.
Connect data, patterns and classification
When teaching AI in the classroom, it helps to explain three connected ideas.
Data is the information used by the system, such as images or measurements. Patterns are relationships or similarities it identifies within that information. Classification means assigning an input to a category.
For example, imagine training an image classifier to distinguish between two types of classroom objects. Students provide labelled examples, allowing the model to learn patterns associated with each category.
When shown a new image, the trained model uses those patterns to predict which category fits. Its prediction can be incorrect, making testing an essential part of the learning experience.
Ask what happens when the data changes
A useful classroom investigation starts with a question: could different data lead to different results?
Suppose every training image in one category has a bright background, while every image in the other has a dark background. The model might learn to rely on the background instead of the object.
Students can test this possibility by changing backgrounds and observing the predictions. They can then add more varied examples, retrain the model and compare its performance.
This distinction matters: changing the training data and retraining can change what a model learns. Changing only the image being tested can change its prediction without changing the model itself.
Make data quality part of the discussion
More examples alone do not guarantee better results. The relevance, variety and accuracy of the examples also matter.
Encourage students to consider whether their labels are consistent and whether their examples represent the situations the classifier will encounter. Have they tested unfamiliar examples, or only the ones used during training?
Teaching AI in the classroom becomes more meaningful when students explain unexpected results. An incorrect classification gives them a reason to examine the data, question their assumptions and decide what to investigate next.
Explore AI through LEGO® Education
LEGO® Education Computer Science & AI connects these ideas with hands-on classroom learning. Its AI & Data unit introduces classification as a way to investigate how computers learn from data.
In the Grades 3–5 programme, learning experiences include using pretrained classifiers, creating and training a custom classifier, and training classifiers for accuracy. These experiences provide practical opportunities to connect predictions with the examples used during training.
Teachers can extend the discussion by asking students to describe what they changed, what happened and what evidence supports their explanation.
Build understanding through questions
Teaching AI in the classroom gives students opportunities to investigate how AI systems work and assess their outputs thoughtfully.
Questions such as “Which examples are missing?”, “Why might this prediction be wrong?” and “How could we test our idea?” keep the focus on reasoning.
Through building, testing and analysing, students can explore a fundamental principle: the data we choose influences what AI systems learn. Understanding AI begins with curiosity and grows through evidence.

