Lesson 12 · Understand — Understand AI
Training: Practice Makes Better
Play first
Play a little and see what happens. Then read the key points to find out why.
Should You Train Your Own?
Most teams don’t need to train a model from scratch: try prompts and RAG first, then consider fine-tuning.
From everyday life
ISA asks you
Is there a skill you can do by following the steps, but can’t when the situation changes?
Ready? See what ISA thinks
That’s a lot like AI overfitting: acing the practice questions doesn’t mean you’ve really learned. Trying a new situation shows whether you learned the general idea.
Key points
- Go from easy to hard: try prompts first, then RAG, then fine-tuning, and only then training your own.
- Count the costs: data, computing power, people and maintenance.
- Build your own set of test questions and keep evaluating.
- Models go out of date: plan when to update and when to retire them.
How it works
- Need
- Try prompts
- RAG
- Fine-tune
- Keep evaluating
Quick quiz
Remember this
Prompts first, then RAG, then fine-tuning; your own test set is the most reliable.
Try thisNext time you learn a new skill (new software or a new recipe), try it once in a situation you haven’t practiced, to check whether you only know how to follow the steps.
AI Needs Practice Too
AI practices again and again, and gets better and better.
From everyday life
ISA asks you
Your first shot misses. What do you do?
Ready? See what ISA thinks
Change it a little and throw again. With lots of practice, it goes in.
Key points
- The first throw misses.
- Change it a little and throw again.
- After lots of practice, it goes in!
How it works
- Try
- Fix
- Try again
Find it (an adult reads aloud)
Remember this
Mistakes are okay. Fix it and try again.
Try this away from the screenWith a grown-up: Crumple paper into a ball and throw it into a basket. If it misses, see which way it went, change a little, and throw again.
Training and Testing
AI practices with lots of examples, then gets tested on questions it hasn’t seen.
From everyday life
ISA asks you
Your first shot misses. What do you do?
Ready? See what ISA thinks
Change it a little and throw again. With lots of practice, it goes in.
Key points
- Training: guess, check the answer, adjust, and repeat many times.
- Error: how far the guess is from the answer.
- Tests must use new questions to show what it really knows.
- Memorizing answers and failing on new questions is called “overfitting.”
How it works
- Guess
- Check
- Adjust
- Test
Quick quiz
Remember this
Training means guess, check, and adjust. Only new questions show what it can really do.
Try this away from the screenPlay paper-ball toss with your family. After each throw, write “too far left, too far right, too far, too short.” On which throw did you start getting better?
Training: Shrinking the Gap
Training keeps lowering the “loss” (the gap between prediction and answer); the goal is to do well on new data too.
From everyday life
ISA asks you
You get every practice question right but do badly on the test. What could be the reason?
Ready? See what ISA thinks
Maybe you just memorized the practice questions. That’s called overfitting.
Key points
- Loss: how far the prediction is from the answer. Smaller is better.
- Gradient descent: like walking downhill, taking a small step each time in the direction that lowers the loss.
- Overfitting: getting every practice question right but failing new ones, like memorizing answers.
- Fixes: more varied data, stopping early, a simpler model.
How it works
- Predict
- Calculate loss
- Adjust parameters
- Validate
Quick quiz
Remember this
Training lowers the loss; a good model must also handle new data (generalization).
Try thisFind a test where you just memorized the answers. Try a similar question with different numbers. Can you still solve it?
Training in Practice
Hyperparameters, data size and how you evaluate decide whether training succeeds.
From everyday life
ISA asks you
You get every practice question right but do badly on the test. What could be the reason?
Ready? See what ISA thinks
Maybe you just memorized the practice questions. That’s called overfitting.
Key points
- If the learning rate is too high, training oscillates; too low, and it learns slowly.
- Hyperparameters: values people set before training, like batch size and number of epochs.
- Use the validation set to choose a model; use the test set only at the very end.
- Pre-training plus fine-tuning: adjust a large model with a small amount of data.
How it works
- Set hyperparameters
- Train
- Validate
- Adjust
- Final test
Quick quiz
Remember this
Tune hyperparameters on the validation set; save the test set for the end.
Try thisPredict: if you practice the same set of problems for three days and then do a new set, how different will the two scores be? Try it and record the results.