RAG · Lesson 70 of 120
Why Evaluate RAG
Measure, don't guess.
We've tried many tricks. But did each one really help? Trying a few questions by hand isn't enough. Evaluation measures a RAG system on many questions, so we change it with confidence.

- Many tricks
- Did they help?
- Measure, don't guess
What we measure
We measure two halves. Retrieval, did we find the right chunks? And generation, is the answer correct, grounded, and on topic? A bad answer could come from either half, so we measure both.
| key | value |
|---|---|
| Retrieval | right chunks found? |
| Faithfulness | grounded in context? |
| Relevance | answers the question? |
| Correctness | matches the truth? |
The evaluation loop
Build a test set of questions with known answers. Run the system on every question. Score the results. Change one thing. And run the test set again.
- Test set
- Run all
- Score
- Change one thing
- Repeat

Summary
Evaluation measures retrieval and generation on many questions, so every change is checked. Next, building a test set.
Key takeaways- Retrieval
- Generation
- Measure every change
Next up: A Test Set — questions with answers