CAI Technology
Menu ☰
rag · · 8 min read

How to Properly Evaluate a RAG System: the 9 Essential Metrics

The 9 essential metrics for evaluating a RAG system, on two axes (retrieval + generation) plus the human verdict — with diagrams, formulas, a troubleshooting table and how to automate them in practice.

CAI Technology · Last reviewed: 7/3/2026
Infographic: the 9 RAG evaluation metrics grouped into 3 families — Retrieval, Generation and Human, with formulas.

How to Properly Evaluate a RAG System: the 9 Essential Metrics

A RAG (Retrieval-Augmented Generation) system has two components that can fail independently. If the answer is poor, you need to know which part is to blame. This article summarizes the 9 essential metrics, explains them visually and shows how to implement them in practice — including how we already use them in a real system of ours.

Why you need metrics on TWO axes

The two components of a RAG:

  1. Retrievalwhich documents/chunks it brings from the knowledge base.
  2. Generationwhat answer the model produces from the retrieved documents.

That is why the metrics split into two families + a human one:

FamilyWhat it measuresMetrics
A. RetrievalQuality of the retrieved context1. Context Precision · 2. Context Recall · 3. Context Relevance · 7. Hit@k · 8. MRR
B. GenerationQuality of the answer4. Faithfulness · 5. Answer Relevance · 6. Answer Correctness
C. HumanFinal human judgment9. Human Evaluation

Diagram 1 — Where each metric applies in the pipeline

flowchart LR Q(["User question"]) --> R["Retriever<br/>embeddings + vector DB"] R -->|"top-k chunks"| RR["Reranker"] RR --> CTX["Retrieved context"] CTX --> G["LLM Generator"] G --> A(["Answer"]) R -. "measures" .-> MRET A -. "measures" .-> MGEN A --> H["9 Human Evaluation"] subgraph MRET["RETRIEVAL metrics"] direction TB M1["1 Context Precision"] M2["2 Context Recall"] M3["3 Context Relevance"] M7["7 Hit@k"] M8["8 MRR"] end subgraph MGEN["GENERATION metrics"] direction TB M4["4 Faithfulness"] M5["5 Answer Relevance"] M6["6 Answer Correctness"] end

How to read the diagram: the RETRIEVAL metrics evaluate what comes out of the retriever (before the LLM); the GENERATION metrics evaluate the final answer; Human Evaluation is the human verdict over everything.


Family A — RETRIEVAL metrics

1. Context Precision — how much of what you retrieved is relevant

Precision = relevant chunks retrieved / total chunks retrieved

2. Context Recall — you retrieved EVERYTHING that was relevant

Recall = relevant chunks retrieved / all relevant chunks

Precision and Recall are in tension: raise k → recall ↑ but precision ↓. The reranker reconciles them (retrieve a lot, then filter to the top).

3. Context Relevance — how relevant the documents are to the question

Checks, qualitatively, whether the retrieved documents actually relate to the query. Higher = better. Implementation: LLM-as-judge gives a relevance score per (query, chunk).

7. Hit Rate (Hit@k) — at least one hit in the top-k

Hit@k = 1 if a relevant doc is in the top-k, otherwise 0.

8. Mean Reciprocal Rank (MRR) — how HIGH the first relevant doc appears

MRR = (1/N) · Σ (1 / rankᵢ) — where rankᵢ = the position of the first relevant document for query i, and N = the total number of queries.


Family B — GENERATION metrics

4. Faithfulness — the answer is supported by the context (no hallucinations)

Checks whether every claim in the answer is covered by the retrieved context. “No hallucinations.” Higher = better.

5. Answer Relevance — the answer addresses the user’s question

An answer can be 100% faithful to the context yet off topic. It measures how well it answers what the user actually asked. Higher = better. Fix when it’s low: improve the generation prompt, reformulate the query.

6. Answer Correctness — factual correctness against the reference truth

Compares the answer with a ground truth / reference. Higher = better. Requires a “gold” set of correct answers. Implementation: LLM-as-judge or semantic matching vs the reference.


Family C — Human Evaluation

9. Human Evaluation — human judgment

Human judgment of usefulness, accuracy and grounding, on a rubric:

It remains the gold standard for ambiguous cases; it is done on a sample, not on everything.


Diagram 2 — Taxonomy of the 9 metrics

flowchart TB ROOT["RAG Evaluation"] ROOT --> A["A. RETRIEVAL<br/>context quality"] ROOT --> B["B. GENERATION<br/>answer quality"] ROOT --> C["C. HUMAN"] A --> A1["1 Context Precision<br/>relevant / total retrieved"] A --> A2["2 Context Recall<br/>relevant retrieved / all relevant"] A --> A3["3 Context Relevance"] A --> A7["7 Hit@k<br/>at least one in top-k"] A --> A8["8 MRR<br/>rank of first relevant"] B --> B4["4 Faithfulness<br/>no hallucinations"] B --> B5["5 Answer Relevance"] B --> B6["6 Answer Correctness<br/>vs ground truth"] C --> C9["9 Correctness / Helpfulness / Grounding / Completeness"]

How to implement them in practice

MetricHow you compute itWhat you need
Context Precision / RecallCompare the retrieved chunks with a “gold” set of relevant chunksAnnotated set (query → relevant chunks)
Hit@k / MRRDirectly from the retriever’s results + gold setGold set + the returned positions
Context RelevanceLLM-as-judge on (query, chunk)A judge LLM
FaithfulnessLLM-as-judge (answer vs context) or grounding via embeddingsJudge LLM / embedder
Answer RelevanceLLM-as-judge (answer vs question)Judge LLM
Answer CorrectnessLLM-as-judge (answer vs reference)“Gold” set of answers
Human EvaluationRubric + human evaluatorsPeople + a scoring guide

Tools: the ragas library (Python) covers Context Precision/Recall, Faithfulness, Answer Relevance, Answer Correctness (LLM-as-judge) out of the box. The pure ranking metrics (Hit@k, MRR) you compute with simple code over the retriever’s results.


How WE do it (real implementation)

Our RAG pipeline automates exactly 2 of the 9 metrics as a quality gate, at scale:

In practice, the “platinum dataset” is built by passing each example through automated Faithfulness + Answer Correctness — two of the metrics above, applied to hundreds of thousands of pairs.


Rough thresholds + what to do when a metric is low

SymptomLow metricProbable causeWhat you do
Incomplete answerContext RecallThe retriever misses infok, better embeddings/chunking, hybrid search
Answer diluted with noiseContext PrecisionToo much junk retrievedReranker, ↓ k, metadata filters
Model makes things upFaithfulnessWeak prompt / no grounding”Answer ONLY from the context”, grounding gate
Answers off topicAnswer RelevanceWeak generation/promptImprove the prompt, reformulate the query
The good doc appears lateMRR / Hit@kPoor rankingReranker, embeddings, HNSW tuning

Key takeaways

We start with a 30-minute conversation.

Free AI-readiness audit for companies with 50+ employees. We reply within 24 hours.