The short version

  • A learning program learns from examples, not from rules. People collect examples and label each one: this fish goes in the sun tank, that one in the moon tank. The program looks for a pattern that fits the labels, then uses it on new things.
  • People choose what it learns from. They choose the examples, the groups and the label on each one. A wrong label teaches a wrong pattern.
  • Training examples teach it. Test examples check it. Some labeledlabelled examples are kept back while it learns. Tried on those, it shows how well its pattern works on things it has never seen.
  • Varied examples matter. More examples help, if they cover the kinds of things it will meet. When most examples are of one kind, it makes more mistakes on the others.
  • It still guesses. Show it something unlike every example, and it gives an answer anyway, with no way to tell that the answer is wrong.
  • Children understand it by doing it. In one study, children needed both to label examples and to test the result before they understood how machine learning works.

From “How AI learns from examples”, sheetbrook.com/ai/understand/learning-from-examples/. Last checked December 4, 20264 December 2026.

Examples instead of rules

There are two ways to make a computer sort things. A person can write every rule, or people can give it examples and let a learning program find the rule. The AILit framework of the OECD and the European Commission (2026) puts the difference in one line: some AI systems “can be programmed with specific rules to accomplish tasks, while others can learn patterns from data”. What AI is and isn’t sets the two side by side. This page is about the second kind, machine learning.

AI4K12’s draft guidelines describe what it does: machine learning “allows a computer to acquire behaviors without people explicitly programming those behaviors”. Nobody writes the rule. The program finds a pattern that fits the examples, and the same draft says the result “can be applied to new data to solve problems or make decisions”.

Examples, labels and features

Three words do most of the work.

  • An example is one thing the program is shown: a picture, a sound, a sentence, a row of numbers.
  • A label is the group a person says the example belongs to: “poisonous” or “not poisonous”, the sun tank or the moon tank.
  • A feature is something about the example that can be seen or measured: stripes, spots, size, colorcolour.

AI4K12’s draft makes this a goal for children in its K–⁠2 band: “Identify patterns in labeled data and determine the features that predict labels.” Its example has children study cartoon fish labeledlabelled “poisonous” or “not poisonous” and work out the rule, and it notes that “the features are intuitive, even though the classification rule should not be”. Children see the stripes and spots at once; which of them decides the group is what they have to work out.

People make every one of these choices. The same draft says it plainly: “People choose the features.” People also choose the examples and put the labels on them, and a wrong label teaches a wrong pattern: the 2026 CSTA standards expect fourth graders to observe that “Labeling mistakes lead to incorrect predictions.” The standards give the reason this matters: once children learn that AI systems are “created by humans, trained on human-collected data, and shaped by human decisions”, they recognizerecognise mistakes as “predictable consequences of gaps in training data”.

Training examples and test examples

A rule can fit every example it came from and still be wrong about something new. The way to find out is to try it on labeledlabelled examples it did not learn from.

AI Unplugged’s Good-Monkey-Bad-Monkey game (Lindner and Seegerer, FAU Erlangen-Nürnberg) shows how. Zookeepers must work out which new monkeys bite. In its elementary version, 20 picture cards are split into training cards, pinned up as biting or not biting, and test cards kept hidden. Pairs write a rule from the training cards, swap rules with another team, and use them on the hidden monkeys, and the class sees which rule did best. The game’s two messages: “AI classifies data based on patterns”, and “Classification models are not perfect”. Its advanced version adds a monkey whose mouth is a shape no training card showed, so the class sees the rules fail on something unlike every example.

AI4K12’s draft asks the same of grades 3–⁠5: “Train a classification model using machine learning, and then examine the accuracy of the model on new inputs.” If the results on new inputs are poor, it says, “additional training may be required to improve the accuracy”. After training, new examples come without labels, “so the model receives no feedback about the correctness of its class predictions”.

In Teach the sorting machine the class does this with fish: eight example cards in two tanks, five new fish to test the rule on, then fish F, which has neither stripes nor spots.

Why varied examples matter

A learning program can only find the patterns its examples show. AI4K12’s draft says it for K–⁠2: “How well a computer learns to classify depends on the data used to train it.” Its example asks what happens when every food a computer is shown as healthy is green: “what will the computer conclude about green gummy bears?”

More examples help. The 2026 CSTA standards expect fourth graders to observe that “More data improves accuracy”, and the third-grade standard asks children to “Investigate how a machine learning model can change when new data is added to a training set.” But the new examples have to be different, not more of the same. AI4K12’s draft for grades 3–⁠5: “To recognize dogs in images one must have not only many types of dogs, but also many different viewing angles and contexts.”

When the examples are lopsided, the mistakes fall on whatever is missing. CSTA’s second-grade standard asks children to notice “that models can make more mistakes for some kinds of examples than others, especially when the training examples were mostly of one kind”, and that “limited or unbalanced examples can lead to unfair or uneven results”. Why AI gets things wrong follows that through.

What children believe, and what helps

Children rarely think about the examples at all. Among 195 Finnish fifth and sixth graders, references to data in training AI were “practically nonexistent” (Mertala, Fagerlund and Calderon, 2022). One of the three mistaken ideas found among the same children was AI as a machine with its knowledge built in (Mertala and Fagerlund, 2024). What children think AI is has the others.

Doing it helps more than being told. One study found that children needed both to label examples and to test the result before they understood how machine learning works (Hitron and others, 2019). Children aged 7 to 12 who trained their own programs over four weeks “shifted their attribution of agency from the devices to the people who program them” (Druga and Ko, 2021).

How far to go at each age

AI4K12’s draft has children in K–⁠2 study labeledlabelled pictures and say the rule aloud. It marks labelinglabelling data in a tool, decision-tree learning games, learning by trial and error and tiny neural networks “N/A” until grades 3–⁠5, where children also draw the rule as a decision tree instead of only saying it.

The 2026 CSTA standards set similar limits. Kindergartners work with “one or two clear, observable attributes at a time”; second graders “are not expected to independently train machine learning models”; only the fifth-grade standard asks children to “Train a machine learning model to make a classification or prediction”.

So the lessons for younger children here do it all on paper. In Teach the sorting machine children study fish a keeper has labeledlabelled, say the rule and test it on new fish. In Only green examples, a machine taught with lopsided cards gets new ones wrong, and children add examples to fix it.

Say it to children

Short sentences a class can repeat:

  • “People taught it with examples.”
  • “Each example has a label. The label says which group it goes in.”
  • “We look for what is the same in each group. That is the pattern.”
  • “We keep some cards hidden. They test our rule.”
  • “If all the examples are one kind, it gets the other kinds wrong.”
  • “More kinds of examples help it.”
  • “It can be wrong, so we check.”

Three questions to ask about any machine that learned from examples:

  • Who chose the examples?
  • What is missing from them?
  • What happens with a new one?

They aim at the idea children most often miss, that a machine’s answers come from its examples (Mertala, Fagerlund and Calderon, 2022).

Teach it

  1. Grades K–⁠2Years 1–⁠3 · 20 minutes Teach the sorting machine Study labeledlabelled cards, say the rule, test it on new cards.
  2. Grades K–⁠2Years 1–⁠3 · 20 minutes Only green examples Find why a machine taught with lopsided cards gets new ones wrong, then add examples to fix it.

Sources

  1. OECD and European Commission: The AILit framework, approved April 8, 20268 April 2026, 2026.
  2. AI4K12: Big Idea 3, Learning: progression chart, working draft, version 0.1, November 19, 202019 November 2020.
  3. CSTA: 2026 CSTA PK–⁠12 Computer Science Standards, 2026.
  4. CSTA: The chart of the 2026 standards tagged [AI].
  5. Lindner and Seegerer, FAU Erlangen-Nürnberg: AI Unplugged, English brochure (CC BY-NC 3.0).
  6. Mertala, Fagerlund and Calderon: Computers and Education: Artificial Intelligence: the same 195 children, 2022.
  7. Mertala and Fagerlund: International Journal of Child-Computer Interaction: 195 Finnish 5th and 6th graders, 2024.
  8. Hitron and others: CHI: children labelinglabelling data and testing a model, 2019.
  9. Druga and Ko: IDC: 52 children aged 7 to 12 who trained and coded programs, 2021.

Last checked: . The facts on this page come from these sources as they read that day.