← 🧠 How AI Works

How AI Works · Topic 5 of 9

Training and testing

An AI model is trained on one set of examples and then tested on new examples it has never seen. Testing shows whether it really learned the pattern or just remembered the answers.

📌 Key points

  1. Training is when the AI learns from a set of examples called the training data.
  2. During training, the AI makes guesses, checks them against the labels and adjusts itself to make fewer mistakes.
  3. Testing is when we check the AI on new examples it did not see during training: the test data.
  4. We test on new examples because an AI could just remember the training examples, like a student who memorises answers without understanding.
  5. Accuracy tells us how often the AI is right. If it gets 90 out of 100 test examples right, its accuracy is 90%.
  6. More data and better data usually make an AI more accurate, especially if the data includes lots of different cases.
  7. If the AI does badly in testing, people improve the data or the training and try again.

📖 Key words

Training
When an AI learns from examples.
Training data
The examples the AI learns from.
Testing
Checking how well the AI works.
Test data
New examples, kept separate from the training data, used to check the AI.
Accuracy
How often the AI gives the right answer, often written as a percentage.

✏️ Worked example

A team trains an AI to recognise birds using 1,000 photos. It gets every training photo right. Is it ready to use?

  1. Getting the training photos right is not enough. It might simply have remembered those 1,000 photos.
  2. The team tests it on 200 new bird photos it has never seen.
  3. It gets 150 of the 200 right. Accuracy = 150 ÷ 200 = 75%.
  4. It makes many mistakes on birds in snow, because the training photos had no snow. The team adds more varied photos and trains it again.
  5. Answer: not yet. It must be tested on new examples, and the results show what data to add.
💡 Remember

Think of training as practising homework questions and testing as a test with new questions. You only know someone has really learned when they can answer questions they have not seen before.

Test yourself8 questions from a bank of 20. A new mix every time.
Start the quiz →

It’s bedtime! 😴

It’s late, and even Numo is getting sleepy. The best thing you can do for your learning now is… go to sleep!

✨ Sleep helps you

  • 🧠 remember what you learned today: your brain saves it while you sleep
  • 🌱 grow and stay healthy
  • ⚡ wake up with energy, ready to learn and play
  • 😊 feel happy and calm

🦉 Going to bed late can make you

  • 😩 tired and sleepy at school tomorrow
  • 🤯 find it harder to focus and to remember
  • 😠 grumpy and easily upset
  • 🤧 catch colds more easily

Children your age need 9 to 12 hours of sleep every night. Numo will be right here tomorrow!