How to Verify AI Answers
How do you know when an AI answer is right? Advitha gets three answers in one evening in San Francisco: a recipe idea, a statistic for her school essay, and a Python function for a class project. They don't all deserve the same trust, or the same checking. A wrong recipe ruins dinner; a wrong statistic costs grades; wrong code can break a whole project.
This lesson gives you four checking habits, and a simple rule for how much to check.
Four Habits
| Habit | How to do it |
|---|---|
| 1. Ask for sources, then open them | Ask "What are your sources?", then open each one and find the claim in it |
| 2. Cross-check numbers | Recalculate key numbers yourself, or with a calculator or a spreadsheet |
| 3. Test code | Run it, with a few tests including an edge case, before you rely on it |
| 4. Compare a second, independent source | An official website, a textbook, a trusted publication or an expert |
Testing Code: A Quick Example
Suppose an assistant writes a function to average a list of scores. Before using it, test it, including the edge case of an empty list:
def average(scores):
return sum(scores) / len(scores)
print(average([80, 90, 100]))
try:
print(average([]))
except ZeroDivisionError as error:
print("Bug found:", error)90.0
Bug found: division by zeroThe normal case works, but an empty list crashes it. Two lines of testing found a bug that a quick read would miss. Ask the AI to fix it, then test again.
Match the Checking to the Stakes
| Stakes | Examples | How much to check |
|---|---|---|
| Low | A birthday message, a recipe idea, brainstorming | A quick read |
| Medium | School work, a work email, a summary you'll share | Check facts, numbers and names |
| High | Health, money, legal matters, safety, decisions about people | Check with an expert or official source; AI is only a starting point |
Common Mistakes
Checking only that a source exists. It must also say what the AI claims.
Asking the same AI "Are you sure?" as your only check. Use an independent source.
Skipping edge cases when testing code. Empty inputs, zeros and unusual values find most bugs.
Interview Corner
How do you verify an AI-generated answer?
Open its sources and confirm they say what it claims, recheck numbers, test any code, and compare with an independent source, with more checking for higher-stakes decisions.
How would you check AI-generated code before using it?
Read it, run it, and test it with normal and edge-case inputs, such as empty lists or zero, and review it for security issues. Never deploy code you haven't tested.
Practice
Exercise: check for one task. For one AI-assisted task from your school or work, write down: what you will never paste (from "Privacy: What Not to Share with AI"), the stakes (low, medium or high), and exactly how you will check the answer. Then do the task and the checks, and note anything you caught.
Check your understanding:
- Name the four habits.
- What did the empty-list test reveal?
- How should checking change for high-stakes answers?
Key Takeaways
Quick reference
| Habit | One-line test |
|---|---|
| Sources | Did I open it, and does it say this? |
| Numbers | Did I recalculate the key ones? |
| Code | Did I run it, with an edge case? |
| Second source | Does an independent source agree? |
Was this tutorial helpful?