THE EVAL SUITE
You built a RAG chatbot for an airline. It answers questions about baggage, refunds and pets. How do you know it works? These are the notes for the whole answer — every metric, where it is measured, and what it is actually asking.
Why evals exist
Without evals, every change you make to a RAG system ends the same way: “Yeah… it feels better.” That is not a claim anyone can check, including you.
Evals exist so you can change your system without guessing. Change the model. Change the prompt. Change the chunk size. Then get an answer to three questions that have numbers attached:
The golden set
Before any metric means anything, you need a fixed set of questions with known correct answers. In the episode it is fifty questions about SkyHigh’s policies, each one paired with the answer a human agrees is right, and each one tagged with the document chunks that should come back for it.
Two rules make the set worth having:
- You never edit it to make a score look better. The moment you do, it stops being a ruler and starts being a mirror.
- You run the same set every time. Comparing v6 to v7 only means something if both ran the identical questions.
Test the pieces, one at a time
A RAG system has two moving parts: a retriever that searches your documents, and a generator that writes an answer from what it found. Test them separately first, because a failure at this level tells you exactly who to blame.
The retriever — did it find the right pages?
You already know which chunks should come back for each golden question, so this is arithmetic. No LLM, no judgement, no cost.
The generator — did it write a good answer from them?
Now hand the model a known-good set of chunks and judge only the writing. If the retrieval was perfect and the answer is still wrong, the generator is the problem.
Using an LLM as a judge
Recall and precision are counting. Faithfulness and relevance are not — there is no string to compare. So you give a second model the question, the chunks, the answer and a rubric, and ask it to score.
What makes a judge trustworthy
- A strict rubric, not a vibe. “Rate 1–5” gives you noise. Spell out what each score means and what disqualifies an answer.
- Show it the evidence. The judge sees the retrieved chunks, so “is this claim supported?” is a question it can actually answer.
- Spot-check it against humans. The judge is a measuring instrument. Instruments get calibrated.
Test them working together
Both components can pass on their own and the system can still fail, because in Level 1 you fed the generator perfect chunks. Now let the real retriever feed the real generator and measure the thing the passenger actually gets.
Same fifty questions. Three relationships between three objects — the RAG triad:
Judge the finished product
The passenger does not care about recall. They care about one thing: “Did the chatbot give me a useful answer?” Level 3 stops measuring machinery and starts measuring the product.
So now you have an eval suite
The order is not arbitrary — each level explains failures in the next one.
Run the whole thing and you get one report. When a number moves, the level it moved at tells you where to look.
Regression testing
You are going to change things — chunk size, the prompt, the model — to push scores up. The problem is that a change that helps one number usually hurts another, and you will not notice unless you re-run everything.
So: change one thing, re-run the whole suite on the same set, and log the result against a version number.
Worked example — v6 → v7
You cut the chunk size from 500 tokens to 200 to make retrieval sharper. Here is what the suite says happened:
This is the whole workflow: change → re-run → compare → decide. The decision is still yours. The suite just makes sure you are making it with evidence rather than a feeling.
Online evaluation
Everything above happens before the chatbot meets a passenger. Once it is live, the rules change: real people ask questions you never thought of, so there is no answer key for most of what comes in.
Someone asks whether they can bring a peacock. Someone asks whether the airline pays for a hotel after a storm cancellation. Neither is in your fifty.
What still works without an answer key
Two of the metrics never needed one. Both compare things you already have in hand:
Correctness is the one you lose. You cannot automatically know whether an answer is right without knowing what right was.
So you watch behaviour instead
What you lose in ground truth you make up in volume. Real traffic tells you where the chatbot is failing, if you count the right things:
Sample it
Running an LLM judge on every conversation is not sustainable. Judge a small percentage properly instead — the sample gets you the same signal at a fraction of the bill.
The loop
Here is the part that makes all of it compound: your live application generates new test cases for you.
A passenger asks whether the airline will pay for their hotel. The chatbot says no. The passenger thumbs it down. That is not just a bad conversation — it is a new test case. You find the correct answer, add the pair to your golden set, and the next time you change anything, that failure is one of the things you test against.
Cheat sheet
Eight numbers, three levels, and what each one is actually asking.
And underneath, three questions
If you can only remember one thing from the episode, remember that all eight metrics collapse into these: