Training AI with Examples ๐
See how AI learns from labelled examples โ just like how you learned to read
Training AI with Examples ๐
Remember Learning to Read?
When you were tiny, someone showed you pictures and said words:
๐ธ "CAT" ๐ธ "DOG" ๐ธ "CAR"
๐ธ "CAT" ๐ธ "DOG" ๐ธ "CAR"
... (repeated many, many times) ...
โ You learned to recognise and read those words!
Training AI works EXACTLY the same way โ just with millions of examples instead of dozens!
The Training Process ๐๏ธ
Step 1: Show AI an example
[Photo of cat] + label: "cat" ๐ฑ
Step 2: AI makes a guess
"I think this is... a dog?" ๐ (Wrong!)
Step 3: Tell AI it's wrong
"No! This is a cat!"
Step 4: AI adjusts tiny numbers inside itself
Step 5: Try again with next photo
[Photo of cat] + label: "cat"
AI guesses: "cat?" ... "Yes!"
Step 6: Repeat 10,000,000 times
โ AI becomes GREAT at recognising cats!
๐คฏ How Much Training Does AI Need?
| AI System | Training Examples | |-----------|-----------------| | Basic cat recogniser | ~10,000 photos | | Face ID | Millions of face photos | | Self-driving car | Billions of driving miles | | ChatGPT | 570 GB of text (billions of sentences) |
๐ฎ Real Example: Google's Cat Detector
In 2012, Google built an AI and showed it 10 million YouTube thumbnails without telling it what was in them.
The AI independently discovered that cats were one of the most common things in images online!
Nobody told it what cats were. It figured it out from PATTERNS alone. Mind-blowing! ๐คฏ
The Training Ingredients
# What you need to train an AI:
training_data = [
{"input": cat_photo_1, "label": "cat"},
{"input": cat_photo_2, "label": "cat"},
{"input": dog_photo_1, "label": "dog"},
# ... millions more ...
]
# The AI adjusts itself until it gets most answers right
model.train(training_data)
# โ Now model.predict(new_photo) works! ๐Type it yourself
Don't just read it โ type the example from above into the box, press Run โถ, and watch what happens. Typing it yourself is how it really sticks! Stuck? Tap Show example.
Press โถ Run to see your code come to lifeโฆQuick check
How is training an AI similar to how you learned to recognise words as a child?