Skip to main content
AI Foundations

⏱ About 10 min10 XP

Learning From Examples

Think about the first time you heard the word "cat." Nobody handed you a giant rulebook that said "four legs, pointy ears, says meow, has fur." Instead, someone pointed at a fluffy creature and said "cat!" Then you saw another one. And another. Pretty soon, your brain figured it out all on its own. In this lesson we are going to discover something amazing: machines can learn exactly the same way — by looking at lots and lots of examples.

How You Learned What Things Are

When you were very small, you learned by looking, listening, and touching the world around you. Did someone teach you dogs by giving you a list of rules? Probably not! You just saw many dogs — big ones, little ones, fluffy ones, spotted ones — and your brain quietly built up a picture of what "dog" means. That quiet building-up process in your brain is called learning from examples. Scientists have a fancier name for it: pattern recognition. A pattern is something that shows up again and again in a helpful way. When you see enough examples, your brain spots the pattern.

The Big Idea

You did not need a rulebook to learn what a cat is. You just needed enough examples. Machines can do the same thing — learn from examples, not from rulebooks.

Here is a story to make this real. Imagine your little cousin has never seen an apple before. You put three apples on the table — a red one, a green one, and a yellow one. You say "apple" each time. Then you put a banana on the table and ask "apple or not apple?" Your cousin looks carefully and says "not apple!" They learned — just from three examples. Now imagine doing that with a computer. You show it pictures of apples and pictures of bananas, and you tell it which is which. After seeing enough pictures, the computer can look at a new fruit and say "apple" or "not apple" all by itself. That is how many AI programs learn their jobs.

Flashcards — click each card to reveal the answer

The more examples you give, the better the learning. If you only showed your cousin ONE apple, they might think every round red thing is an apple — including a tomato! But if you showed them ten apples of different colors and sizes, they would get a much clearer picture. The same is true for machines. A small handful of examples gives a fuzzy picture. Lots and lots of good examples give a sharp, clear picture.

Look Around You

Think of three things you know how to recognize — your dog, your favorite cereal box, your teacher's laugh. You learned ALL of those from examples, not from a rulebook!

How did you first learn what a cat looks like?

What does the word 'label' mean when we talk about teaching a machine?

Your Own Example Collection

  1. Pick something simple you know how to recognize — your favorite stuffed animal, a spoon, or a sneaker.
  2. Find five different versions of it around your home. They can be different colors, shapes, or sizes.
  3. For each one, notice what stays the same (that is the pattern!) and what is different.
  4. Draw or write down the pattern: what makes ALL five of them the same thing?
  5. Share your pattern with someone at home. Could they use your pattern to find a new example?