TwiddleLab / Artificial Intelligence / AI and Us: Using AI Well
Safety and Alignment
What you will learn
- Alignment: getting an AI to do what people actually intend, not just what the rules literally say.
- A guardrail is a rule or check that stops harmful outputs. Word lists are easy to dodge: same request, new words.
- Red teaming: attacking your own system on purpose to find holes before others do.
- Real safety uses layers: training on examples of good behavior, trained checkers, testing before release, and people, and it's still not perfect.
How the lesson goes
A school chatbot must never help with cheating. Write the rule.
Your rule is a word filter: any request with one of your 3 words gets blocked. Fill the filter, then Check.
Test your rule on 10 real requests.
Five ask for cheating, five are honest. Press Run.
Now switch sides. Can you get cheating past your own filter?
Send rewritten requests at the filter. Get 3 through in 5 tries.
What you just did has names.
A guardrail: a rule or check that stops harmful answers. Your word filter was one.
Red teaming: attacking your own system on purpose. AI companies hire red teams before every big release.
Alignment: making the model want what we intend, not just obey the words of a rule. That's why models are also trained on many examples of good and bad answers, rated by people.
Teach by example: should the school bot help with each request?
Models learn behavior from examples labeled by people. Label these 8. Drag each into a lane.
Labels like yours, collected by the thousands, teach a model the meaning behind a rule. That catches rewrites a word list misses, though never all of them.
A trained checker scores each request. Where should the blocking line go?
Slide the line. Check when at least 4 of 5 cheating requests are blocked and at most 1 honest one.
Every safety check trades two mistakes: letting bad requests through, and blocking good ones. Stricter isn't automatically better.
How do AI labs test a model before release?
Put the five stages in order.
Labs publish safety reports for big models describing steps like these. Red teams and staged releases catch problems, but new ones still show up after launch, so watching never stops.
Code: the same idea protects apps. Someone stole your password. Which layer still stops them?
Tap it, then Check.
Defense in depth: when one layer fails, another still holds. AI safety stacks layers the same way.
Why can't a list of banned words keep a chatbot safe?
Rules about words can't capture intent. That's the alignment problem in small: we want the model to understand what we mean.
Replay everything: your filter alone, then layers that read meaning.
The 10 requests plus all 8 red-team rewrites. Press Replay.
Previous lesson: Jobs and the Future · Next lesson: Project: Write an AI Rulebook · Part of the course: AI and Us: Using AI Well
Lessons are interactive and need JavaScript. Turn it on to play them.