01Chapter 1: What a RAG system does and where quality can be measuredThis chapter assumes you know the basic parts of a retrieval-augmented generation (RAG) pipeline: chunking, embedding, vector search, and prompting an LLM. It also assumes you can read short Python snippets and know precision and recall from classification. No metrics are computed here. This chapter3 min read
02Chapter 2: Retrieval failures versus generation failuresThis chapter assumes you know how a RAG pipeline works: chunking, embedding, vector search, and prompting an LLM with the retrieved text. It also assumes you can read Python and know precision and recall from classification.3 min read
03Chapter 3: Building an evaluation set with relevance labelsThis chapter assumes you know how a RAG pipeline works (chunking, embedding, vector search, prompting an LLM), can read Python, and know precision and recall from classification. Every retrieval metric in the next chapters needs a set of questions with known right answers. Here you build that set.3 min read
04Chapter 4: Precision@k, recall@k, and hit rateThis chapter assumes you can read Python, know precision and recall from classification, and have an evaluation set where each question lists the documents that answer it (see the previous chapter). Here you score a retriever by looking at the set of top-k results and ignoring their order.2 min read
05Chapter 5: Rank-aware metrics: MRR, MAP, and nDCGPrecision@k and recall@k treat the top k results as an unordered set. A relevant document at rank 1 scores the same as one at rank k. Users and generators both care about order, because the top passages get read first and often get the most weight in the prompt. This chapter assumes you can read Pyt3 min read
06Chapter 6: Faithfulness: is the answer supported by the context?This chapter assumes you know how a RAG pipeline works (chunking, embedding, vector search, prompting an LLM). It also assumes you can read Python and that you know precision and recall from classification.3 min read
07Chapter 7: Answer relevance: does the answer address the question?This chapter assumes you know how a RAG pipeline works, can read Python, and have seen faithfulness defined as support from the retrieved context. Here you will measure a different property: whether the answer responds to what the user asked.2 min read
08Chapter 8: Scoring faithfulness claim by claimThis chapter assumes you know the difference between faithfulness and correctness from the previous chapters. It also assumes you can read Python and know what a retrieved context is. A faithful answer is one the retrieved context supports, whether or not it is true in the world.3 min read
09Chapter 9: Using an LLM as a judge, and where it goes wrongThis chapter assumes you have read the chapters on faithfulness and claim-level scoring. You should be comfortable reading Python and know that a verifier is a function that takes a claim and a context and returns True or False.2 min read
10Chapter 10: Judging context relevance when you have no labelsThis chapter assumes you can read Python, know how precision and recall work, and have seen precision@k and recall@k computed against labelled relevant documents. Here you will estimate retrieval quality when no such labels exist.3 min read
11Chapter 11: Checking a judge against human labelsThis chapter assumes you have read the earlier chapters on claim-level faithfulness scoring and LLM judges. It also assumes you can read Python and know precision and recall from classification.2 min read
12Chapter 12: Citation accuracy: do cited passages support the claims?This chapter assumes you can read Python and know how claim-level faithfulness scoring works. You should also be comfortable with precision and recall. Many RAG systems attach citations such as [p2] to each statement so users can check the source. Faithfulness tells you whether the context support2 min read
14Chapter 14: Sample size, variance, and confidence intervalsThis chapter assumes you can read Python, know what a mean and a standard deviation are, and already have per-question scores such as faithfulness or nDCG from earlier chapters.2 min read
15Chapter 15: Regression tests and production monitoringThis chapter assumes you can compute retrieval metrics and faithfulness scores, and that you know how a bootstrap confidence interval works from the previous chapter. Here you will use those numbers to decide whether a change to your RAG system made it better or worse, and to watch quality after rel2 min read