A retrieval-augmented generation system does two jobs. It searches your documents for what looks relevant. Then a model writes an answer from what came back. When the answer is wrong, either job could be to blame. So test them apart.
Start with search. Hamel Husain and Shreya Shankar, who teach the best known evals course, call retrieval a search problem and say to grade it with standard search measures. The simplest is recall@k. For each test question, look at the top k results. Did the document with the answer show up? The share of questions where it did is your score.
You need a document attached to each test question for that. You can make those from your own content. Pick a fact from a document, write the question it answers, and you have a pair.
Anthropic's work on contextual retrieval shows the kind of gain to look for. It tracked how often the needed document was missing from the top 20 results. Its method adds a short note of context to each chunk of text before searching. Combined with a reranking step, it cut that miss rate by 67%.
Then grade the answer. The key check is faithfulness: does every claim in the answer come from the retrieved text? Ragas, an open source evaluation library, scores it as supported claims divided by all claims. An AI judge can do this check well. Calibrate that judge against a person first, as with any judge.
Debug in that order. A model can't answer from a document it never saw. Fix search before you touch the prompt.
The harness for both checks is in Evals for Engineers. Support teams running help center bots should read Evals for Support Teams. The basics are in Evals From Zero, and every guide is on the AI evals hub.