B2 · How Artificial Intelligence Works: Data and Learning

Project: Build and Test Your First AI Model

This project brings together the whole learning process: choosing a task, choosing labelled examples, training a model, testing it on new examples, recording its accuracy, finding its mistakes and improving it, with no programming.

20 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

You've learned every step. Can you build, test and improve a model on your own?

This project brings together the whole learning process: choosing a task, choosing labelled examples, training a model, testing it on new examples, recording its accuracy, finding its mistakes and improving it, with no programming.

In simple words

You will use the cat-and-dog trainer from start to finish. Pick a small set of examples, test the model, write down the score, find out why it went wrong, add better examples and test again. Keep a record of every test, just as real AI teams do.

Why it matters

Doing the whole cycle yourself makes every idea in this module real: data, labels, features, training, testing, accuracy, mistakes and bias. It is the same cycle used to build models for hospitals, banks and phones.

Key terms

Project plan
A written outline of what you will build, with what data, and how you will judge it.
Balanced examples
A training set with a similar number and variety of examples for each class.
Test record
A table noting each test: what was changed, and what the result was.
Fair test
A test in which only one thing is changed at a time, so its effect can be seen.
Limitation
Something the model cannot do or does poorly, stated honestly.

Explained in detail

What a real project looks like

Professional AI projects, however large, follow the same steps as the one on this page. A team defines a narrow task. It gathers labelled examples. It trains a model, tests it on examples kept aside, studies the mistakes, improves the data and tests again. It writes down what it did. The only differences are scale and care. By carrying out this small project properly, you practise the habits that matter in every project.

Step 1: choose a narrow question

A good first project answers one clear question with two or three possible answers: is this animal a cat or a dog? Beginners often aim too wide, with something like "recognise any animal". A wide task needs enormous amounts of data and makes it hard to see what went wrong. A narrow one lets you understand every result. Write your question in one sentence before you do anything else.

Step 2: choose examples with care

Your model will know only what your examples show it. Choose a similar number for each class, so that it does not simply favour the larger one. Within each class, choose variety: big and small, light and dark, common and unusual. Include the cases you expect to be confusing, such as a small fluffy dog that looks rather like a cat. A few well-chosen examples teach more than many that all look alike.

Step 3: test fairly and keep a record

Test only on animals the model did not train on, and test on all of them, not just the ones you expect it to get right. Then keep a test record. Scientists change one thing at a time so that they know what caused a difference. If you add small dogs and remove two cats in the same step, and the score changes, you cannot tell which change mattered.

TestWhat I changedCorrect out of 9What I noticed
1First set: cats and big dogs only6The three small dogs were called cats
2Added the small dogs to the examples9Small dogs now correct; nothing else got worse

Step 4: report honestly

A finished project needs a short, honest report. State the task, the examples you used, the final score and how many test examples that score is based on. Then state the limitations. Nine out of nine sounds perfect, but it is nine animals of two kinds, seen through two measurements. The model has never met a rabbit, a puppy or a hairless cat. Saying so does not weaken your project. Professional teams are judged by how clearly they describe what their model cannot do.

Going further

  • Ask a friend to choose the training examples without seeing the test animals. Do they reach the same score?
  • Train with as few examples as you can and still reach the top score. Which examples turned out to be essential?
  • Try a free no-code tool in which you train a model on your own photos or sounds in the browser, and repeat the same four steps.

How it works

Project checklist

  1. Plan: write the task in one sentence and name the two features.
  2. Collect: choose six training examples, three of each kind.
  3. Train and test: test on all nine new animals and record the accuracy.
  4. Investigate: list the animals it got wrong. What do they have in common?
  5. Improve: add examples that cover those cases, then test again.
  6. Report: write two sentences on what changed and why.

Try it yourself

Guided project in the browser

Work through the checklist above. Every test you run is recorded below the buttons.

Your test record

Copy this table on paper and fill it in as you work.

  1. Test 1: examples used, accuracy, animals it got wrong.
  2. Change made: which examples you added and why.
  3. Test 2: accuracy, animals it still got wrong.
  4. Conclusion: one sentence on what the model needed.

Common mistakes

  • Adding examples without first studying the mistakes.
  • Changing many things at once, so you can't tell what helped.
  • Forgetting to record each test.

Check yourself

Question 1

1. What should you do first when a model makes mistakes?

Question 2

2. Why change one thing at a time?

Question 3

3. Your accuracy went from 67% to 100% after adding small dogs. What does this show?

Summary

  • A full project: plan, collect, train, test, investigate, improve and report.
  • Records of each test show what helped.
  • Better, more varied examples are usually the best fix.

Finished reading?