Lessons and outlineLesson 11 of 11
AI Concepts in PicturesLesson 11
Keeping AI Honest: Grounding, Evals and Guardrails
Hallucinations, tests, limits, red teaming and review, and the whole map once more.
AI makes up plausible text when it lacks facts. Ground answers in real sources. Use evals, guardrails and red teaming to test and limit the system. Tracing and human review catch problems. Review any synthetic test data.
- Hallucination
- A smooth, confident answer that is invented.
- Guardrail
- A check or limit around the model.
- Red teaming
- Attacking your own system on purpose to find weak spots.
Tick what you think is wrong, then check.
The product sheet says: Basic is ₹499 a month for 5 users. Plus is ₹999 a month for 20 users. There is no free trial. A help bot answers a customer.
Try the examples and see what a few simple rules catch, and what slips by.
- ✗No email addresses · Looks like an email address.
- ✓No card or ID numbers
- ✓No phone numbers
- ✓No attempts to override the rules
- ✓Under 500 characters
Blocked, or sent to a person for review.
Try example 5. Simple rules are easy to dodge with odd spelling, so real systems add more layers: model-based checks, least access and human review.
Layer 5 keeps AI honest and safe. AI will sometimes be wrong, odd or even harmful. You cannot remove that fully. You can make it rare, catch it early and limit the damage. This final lesson gathers the key ideas: hallucinations, grounding, evals, guardrails, red teaming and human review. Then it brings the whole map together.
Why AI makes things up
A model predicts plausible text. When it lacks the facts, it can still produce a smooth, confident answer. People call this a hallucination. It is not lying. It is the way the model works. It can invent a quote, a number or a source.
Defence one: grounding
Grounding means tying answers to real sources. Give the model the documents. Ask it to quote them. Show the source to the user. Tell it to say I do not know when the answer is not there.
Defence two: evals
An eval is a repeatable test. You keep a sheet of real questions with good answers. You run it after every change. It tells you if quality rose or fell. Without it, you are guessing.
Defence three: guardrails
Guardrails are checks and limits around the model.
- Input checks: block or flag harmful or private requests.
- Output checks: scan answers for banned content or missing sources.
- Permission limits: the AI can only use the tools it needs.
- Rate and spend limits: stop runaway cost.
Defence four: red teaming
Red teaming means attacking your own system on purpose. Try to trick it. A common trick is prompt injection: hidden text in a page or email that tells the AI to ignore its rules. Find the weak spots before real attackers do.
Defence five: see and review
- Tracing records each step, so you can see what happened.
- Human review checks high-risk answers before they reach people.
- Feedback buttons let users flag bad answers, and those become new test cases.
Using AI to make test data
You can ask an AI to write practice questions for your test sheet. This is called synthetic data. It helps cover more cases fast. A person should review it. Do not test only on synthetic data, because it may be too easy and too alike.
The whole map, once more
Look back at the six layers. The model is the brain. You teach it, give it senses, let it act, keep it honest and run it for real. Any product you meet is a stack of these. When you read about a new AI idea, ask which layer it improves. You now have a way to place every new word.
A worked example
A help bot answers questions about a loan product. To ground it, the team gives it the product sheet. A guardrail blocks any reply that mentions a rate not on the sheet. A test sheet of thirty questions runs after each change. A red-team session tries to trick the bot into promising a rate. Tracing records each chat. Anything about complaints goes to a person. No single step is perfect, yet together they make errors rare.
- ✓AI makes up plausible text when it lacks facts. This is a hallucination.
- ✓Ground answers in real sources and allow I do not know.
- ✓Evals, guardrails and red teaming test and limit the system.
- ✓Tracing and human review let you see and catch problems.
- ✓Synthetic test data helps, but a person must review it.
Build a safety checklist
- Pick an AI feature you might build or use.
- Write one grounding step, one guardrail, one test and one place for human review.
- Write ten real test questions, including two tricky ones.
- Write the first thing you would watch after launch.
Q1What is grounding?show answer
Tying answers to real sources, quoting them and saying I do not know when the source is missing.
Q2What is prompt injection?show answer
Hidden text in content that tells the AI to ignore its rules. Red teaming tries to find it.
Q3Why review synthetic test data?show answer
It can be too easy or too alike. A person checks that it matches real use.