In this lesson: how an AI can sort things nobody wrote a rule for, by finding the pattern in examples, and why you always test it on something new.
1. Two boxes, a secret rule
We gave an AI a small puzzle. "I sort snacks into two boxes, Zing and Plonk. I won't tell you my rule. Zing: crisps, an apple, crackers, popcorn. Plonk: a banana, yoghurt, a marshmallow, jelly. Which box does a carrot go in? Answer with one box name, then say what rule you think I use."
Before you read on: which box would you put the carrot in?
The secret rule was crunchy or soft. Nobody told the AI that. It answered Plonk for the carrot (DeepSeek, October 2026), and gave its reason: Zing seems to hold "savory/salty snacks", Plonk "sweet, soft, or dessert-like items".
So it got the carrot wrong. But look at what it did. Nobody wrote a rule for it. It was given 8 examples with their box names, worked out a pattern of its own, and used that pattern on a carrot it had never been shown. That is the big idea behind a lot of AI: it learns from examples, not from rules someone wrote. The catch, which section 5 comes back to, is that the pattern it finds may not be the one you meant.
No rule given: it found a pattern in 8 examples
2. Rules or examples
Imagine teaching a new classmate which snacks your group likes.
- Rules: "Likes anything crunchy, but not nuts, unless they're salted, except on Fridays…" You'll never finish the list.
- Examples: "These 4 we like, these 4 we don't." They spot the pattern themselves.
Examples win when the rule is hard to put into words. Try writing a rule for "a cat in a photo". Pointy ears? Plenty of dogs have pointy ears. It's much easier to show a thousand cat photos, each marked "cat" or "not a cat", and let the computer find the pattern.
Apps can work the same way. Picture a homework app that sorts photos of your worksheets into maths, English and science. Nobody would write it a rule for each subject. It would be shown many worksheet photos, each marked with its subject, and find the pattern itself: numbers and graphs, long paragraphs, diagrams of cells.
When a rule is hard to word, examples win
3. Three words you'll meet
- A label is the right answer you attach to an example, like "Zing" or "cat".
- Training is showing a computer many labelled examples so it can find the pattern.
- A classifier is an AI that sorts new things into groups, like your boxes.
To be honest about the puzzle: a chat model isn't really trained again inside one conversation, and the model itself doesn't change. It spotted the pattern in a single message. Real training does the same job with many more examples, and the pattern stays in the model afterwards. Today's chatbots were trained this way at huge scale: on billions of pages of text, where each next word is the label, then tuned on answers people rated.
Label, training, classifier
4. Why the tricky one matters
Then we asked about a ginger snap, a hard, crunchy, sweet biscuit. To the AI it half fits each box: crunchy like the crisps, sweet like the marshmallow. The AI still had to pick one, and said Plonk: "despite being hard and crunchy, a ginger snap is a sweet biscuit/dessert item". When we asked again, it once said Zing just as firmly.
All it knows about your rule is those 8 examples. Nothing in those 8 examples says why you made your rule, and it can't ask unless you let it. So a thing that half fits gets a guess.
Notice what it didn't say. It didn't say "not sure", or "this one could go either way". We asked for one box name, so it gave one. A sorter has to put every new thing somewhere, and it uses the same calm wording for a biscuit that half fits as for a bag of crisps that fits perfectly. How sure it sounds isn't a sign of how sure it should be. The tricky ones are exactly where you learn the most about it, so they are the ones to look at first.
A half fit gets a guess, said just as calmly
5. Test it on something new
Two different rules fit the same 8 examples, and only a new thing where they disagree shows which one the AI is using. The AI's main idea, Zing for salty snacks and Plonk for sweet ones, isn't the rule that was meant (crunchy or soft). As the AI read them, its main rule fits 7 of the 8 examples. The apple doesn't fit: it is sweet, yet it sits in Zing. So the AI bent its rule with an exception, putting only fruit that's "sweet/soft rather than crisp" in Plonk. That exception, and the "soft" in its reason, look like the crunchy rule creeping in. With only 8 examples, both rules can be made to fit the boxes, so the examples alone couldn't tell them apart.
The carrot is where the two rules disagree. Crunchy says Zing; "not salty" says Plonk. The AI's Plonk suggests it leaned on salty or sweet. Its reason doesn't fit the carrot well, though: a carrot isn't salty, but it isn't soft or a dessert either, and it is as crisp as the apple that went in Zing. When the reason it gives and the answers it gives don't line up, that is one more reason to test it, not just read its reason.
Had the carrot landed in Zing, it would have looked right, and you might never have checked. A right answer on one new thing proves little. To find out which pattern it really learned:
- Test on things it hasn't seen, and pick ones where the possible rules disagree, like the carrot. A salty, soft snack such as cheese would show the difference too.
- Ask for a reason, then check it against its answers. The reason is a clue, not proof: if it says "sweet things go in Plonk" but puts a sweet, crunchy biscuit in Zing, believe the answers: they show which rule it really uses.
- Don't believe "never wrong". A trained classifier guesses from a pattern, and a new thing can half fit, like the ginger snap.
You'll meet this in the projects: when the agent (the AI that builds things with you in a project) builds something from a few examples you give it, try a new one where it could go either way before you trust it. Without any code, feel it in Beat Machine: its Suggest button only remixes the patterns it was shown. Train a real one yourself in the ML Lab Mood Sorter, step Trick it: you teach a small model your labels, then find a sentence that fools it.
Two rules fit: test where they disagree