Home โ€บ How AI Learns: Training Your Own Model
โš™๏ธ Module 02 ยท Advanced

How AI Learns: Training Your Own Model

What if you could teach a computer its personality? Today, you're not just a user of AI... you're a trainer. Let's build something amazing. ๐Ÿš€

๐Ÿ›ก๏ธ SAFETY CHECK: When you train an AI, you're responsible for the data you give it. Never use pictures of your face, friends, or home without a parent's permission, and never upload personal information like your name, address, or secrets. A smart builder is a safe builder!
๐Ÿง 

Teaching an AI a New Trick

Think of a big AI model like a super-smart puppy. It knows some basic commands, but what if you want to teach it a super-specific, awesome new trick, like how to skateboard? ๐Ÿ›น This is called training (or "fine-tuning" for pros), and it's like teaching a pet! You have to:

๐Ÿ“ธ

1. Show examples
(Show the puppy a skateboard)

๐Ÿ‘

2. Give feedback
(Give a treat when it tries)

๐Ÿ”

3. Repeat!
(Soon it's a skate pro!)

Today, you're the trainer!

๐Ÿค– BEGINNER CHALLENGE

Train an AI to be Your Cleanup Helper!

Let's use a real tool from Google called Teachable Machine. It lets you train an AI right in your browser, no code needed! Your mission: train it to recognize a "clean desk" vs. a "messy desk". Or try "LEGOs in the bin" vs "LEGOs on the floor"! It's a hilarious and super useful way to understand how training works.

  1. Click the link below to open Teachable Machine (it's totally free and requires no account!).
  2. Create two classes. Name one "Clean Desk" and the other "Messy Desk".
  3. Use your webcam to record at least 20 pictures for each class. Move things around!
  4. Click the "Train Model" button and watch the magic happen.
  5. Test your AI! Does it know when you need to tidy up?
Open Teachable Machine โ†’

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Parent Corner

This is a fantastic "Aha!" moment to share. Try the Teachable Machine project together! After training it on the desk, ask your child what else they could train it on. "Happy face vs. Sad face"? "A specific toy"? This connects the abstract idea of "AI training" to the real, physical world.

๐Ÿ“บ Watch this to see how Teachable Machine works!

๐Ÿšจ Welcome to Bias Busters HQ! ๐Ÿšจ

An AI is only as smart as the data it learns from. If the data is weird or incomplete, the AI gets weird too! Your first mission: help a very grumpy robot.

Help Train the Grumpy Robot!

This robot only knows about pizza. Drag the items to the correct training boxes to show it what pizza stuff is and what isn't!

โœ… Things I Like (Pizza Stuff)

โŒ Things I Don't Know (Not Pizza)

๐Ÿ• ๐Ÿง€ ๐Ÿš— โ˜€๏ธ ๐Ÿฅฆ

๐Ÿค– Bias Busters Mission: Fix the Grumpy Robot!

You've built a robot, but you only trained it on data about pizza. ๐Ÿ• Now it's very grumpy and has a biasโ€”it will ONLY talk about pizza. Which of these questions will it actually answer?

๐Ÿ˜ก

"I only talk about pizza. Don't bother me with anything else."

What's the weather like today?
What is your favorite topping?
Tell me about race cars.

๐Ÿ”ฎ Deep Dive: How an AI "Thinks"

It feels like magic, but what's really happening inside the AI's "brain"? It's not learning facts like you do in school. Instead, think of it like a giant game of "Guess the Next Word."

๐Ÿค– My 'brain' is just a super-guesser! I don't *know* things like you do. I just predict what word you want to see next based on a bazillion sentences I've read!

When you train it, you're adjusting millions of tiny digital knobs that help it make better guesses. But sometimes, it guesses wrong in a funny way, making up facts that sound real but aren't. That's called a "hallucination." That's why the #1 rule is to always Fact-Check First!

You just saw why the Grumpy Robot was brokenโ€”its training data was too small! Your next mission is to fix that. Let's build a better, funnier dataset.

โšก INTERMEDIATE CHALLENGE

Build a Dataset with Mad Libs!

An AI is only as good as its data. Your challenge is to create a mini-dataset to teach an AI a new personality. Instead of typing it all out, let's play a game!

1. First, pick a persona:
2. Now, fill in the blanks...
When asked for treasure, the persona says: "My treasure is buried in the !"
When asked about food, the persona says: "My favorite food is !"
When asked about their job, the persona says: "I spend all day !"

โœ… Dataset Created!

๐Ÿš€ ADVANCED CHALLENGE

Run Your First Fine-Tune Job

โœจ Pro-Tip: Why this format is an industry secret

Remember the 'prompt' and 'completion' pairs you made in the Mad Libs challenge? That simple `instruction`/`response` format is the fundamental structure used to fine-tune massive models like Llama or GPT. By creating that little text file, you were doing the exact same kind of work as AI engineers at the biggest tech companies in the world! You're not just playing a game; you're learning the secret recipe for custom AI.

Ready for a real fine-tuning mission? We've set up a project for you in a tool called Google Colab. Your goal: transform a generic AI into a Joke Bot. You'll use a real Python script to fine-tune a small model on a dataset of jokes and watch it learn to be funny. This isn't a simulationโ€”it's how real AI products get built.

This is a real tool used by AI engineers at places like Google and Tesla. Click the link, read the instructions inside the notebook, and run the code cells one by one to watch the magic happen.

Open the Fine-Tuning Colab Notebook โ†’

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Parent Corner

The Advanced Challenge uses a tool called Google Colab, which is a standard in the AI industry. It will require a Google account to use, so this is a great step to supervise and explore together. It looks like a complex code file, but it's designed to be run step-by-step by clicking the "play" button on each block of code.

๐Ÿ“š Learn More

๐Ÿ† YOUR FINAL QUEST

Build and Train Your Custom AI

You've created a personality and seen how the pros train their models. Now it's time to put it all together and build a real, custom AI. This is a real portfolio piece!

  1. Build a Real Dataset: Expand on your Mad Libs game. Create a text file with at least 10 unique `prompt`/`completion` pairs for your chosen persona. Make them funny and interesting!
  2. Fork & Modify the Colab: Make your own copy of the "Joke Bot" Colab notebook from the Advanced Challenge. Find the section with the training data and replace it with your new 10-pair dataset.
  3. Train & Share Your Custom AI: Run the notebook to fine-tune the model on *your* data. You have now built a unique, shareable AI with a custom personality. Congratulations, builder!