Why AI Needs Evaluation
Evaluation is measuring how well an AI application does its job, on many realistic cases, in a way you can repeat. A demo shows the app working once, on questions its builder chose; evaluation shows how often it works, on questions real people ask, and whether a change made it better or worse.
AI apps need this more than ordinary software because their output varies: a prompt tweak that fixes one answer can quietly break ten others.
Demo vs Evaluation
| Demo | Evaluation | |
|---|---|---|
| Questions | A few, chosen by the builder | Many, from real use, including hard ones |
| Result | "It works" | A score, plus a list of failures |
| Repeatable | No | Yes, after every change |
| Finds problems | Rarely | That's its purpose |
What to Measure
| Metric | Description |
|---|---|
| Correctness | It is used to check the answer is right |
| Groundedness | It is used to check the answer is supported by the sources, not invented |
| Relevance | It is used to check the answer addresses the question asked |
| Safety | It is used to check the app declines what it should and leaks nothing private |
| Latency | It is used to measure how long people wait |
| Cost | It is used to measure what each answer costs |
Three Ways to Measure
| Method | Description | Best for |
|---|---|---|
| Code checks | It is used to test answers automatically with rules, such as "contains $45" | Facts, formats, declines |
| Model-graded checks | It is used to have a model grade answers against a rubric | Open-ended answers rules can't judge |
| Human review | It is used to have people rate answers | Quality, tone, and checking the other two |
Common Mistakes
Testing only questions you wrote. Add real questions from users, especially ones that failed.
One overall number. Break results down by category so a failing group can't hide.
Evaluating once. Every change can break something; evaluate every time.
Interview Corner
Why isn't a successful demo enough for an AI application?
A demo shows a few chosen cases once; AI output varies across inputs and changes. Only a repeatable evaluation on many realistic cases shows how often the app works and whether changes help.
Which metrics matter for evaluating a RAG assistant?
Correctness, groundedness, relevance, safety (including correct refusals), latency and cost, broken down by type of question.
Practice
Exercise: list your cases. For an AI feature you'd like to build, write ten test questions: six typical, two tricky, and two it should refuse. For each, write what a correct answer must contain or do.
Check your understanding:
- What does an evaluation show that a demo doesn't?
- What is groundedness?
- When should the evaluation run?
Key Takeaways
Quick reference
| Need | Method |
|---|---|
| Exact facts | Code checks |
| Open-ended quality | Model-graded checks |
| Ground truth | Human review |
| Catch regressions | Rerun after every change |
Was this tutorial helpful?