Lesson 1 of 3 Evaluating RAG Systems and Agents

Evaluating RAG Retrieval and Generation Separately

This lesson describes a multi-perspective RAG evaluation that scores retrieval and generation separately, so a failing answer can be traced to missed information, distorted generation or both.

Learning outcomes

After completing this lesson, you will be able to:

  • Separate retrieval metrics from generation metrics.
  • Score RAG metrics with LLM-as-a-judge.
  • Add human feedback to RAG evaluation.

Separating retrieval from generation

RAG evaluation scores two stages. Retrieval metrics ask whether the retrieved context contains the information needed: context relevance (are the retrieved chunks relevant to the question?) and context coverage or recall (do they contain all the facts in the reference answer?). Generation metrics ask how well the model used that context: faithfulness (are claims supported by the context?), correctness and completeness (compared with a reference answer), answer relevance, and citation precision and citation coverage (do citations point to chunks that support the statements, and are statements cited?).

The combination diagnoses the problem: low context coverage with high faithfulness means retrieval is failing; high coverage with low faithfulness means the model is not using the context properly or is adding unsupported content.

The following diagram shows which metrics belong to each stage.

Evaluating the two stages of RAG separately. Retrieval metrics, context relevance and context coverage, ask whether the retrieved chunks hold the needed information. Generation metrics, such as faithfulness, correctness and completeness, ask how well the model used that context.
A retrieve-only evaluation measures the first stage alone.
Sort into groups

Retrieval or generation problem?

Exam skills 5.1.5 · 5.2.4

Use the metric results to decide which stage of the RAG system is failing.

Log in to try this activity Interactive activities are free with an account.

Automated assessment with LLM-as-a-judge

Most RAG metrics require judgement, so they are computed with LLM-as-a-judge: an evaluator model receives the question, retrieved context, response and (when available) reference answer, and scores each metric with an explanation. Amazon Bedrock RAG evaluation jobs provide these metrics for knowledge bases or for responses from any RAG system supplied as a dataset. Judges should be stronger than, or at least different from, the generator, use clear rubrics, and be checked against human ratings, because judges can prefer longer answers or their own family's style.

The following diagram shows a RAG assistant's evaluation scores before and after changes to retrieval.

Locating a RAG problem from evaluation scores. Correctness is 0.68, context coverage only 0.62 and faithfulness 0.94, so the model uses what it receives but the context often lacks the facts. Hierarchical chunking and hybrid search raise coverage to 0.85, and correctness follows.
The scores come from the scenario above.
Match the pairs

RAG metrics

Exam skills 5.1.5

Match each RAG metric with the question it asks.

Log in to try this activity Interactive activities are free with an account.

Human feedback in RAG evaluation

Automated metrics cannot catch every problem in a RAG system, so human feedback collection interfaces complete the picture. Domain experts rate samples of answers and correct reference answers in the evaluation dataset, and users flag answers that are wrong or out of date in production.

Each source of feedback has a distinct use. Expert ratings calibrate the LLM judge, showing whether its scores agree with people who know the subject. User flags reveal gaps that a fixed dataset cannot, such as documents missing from the knowledge base or content that has become outdated since the dataset was written. The following table maps patterns in the metrics to their likely causes.

PatternLikely causeWhere to look
Low context relevance and coverageRetrieval missesChunking, embeddings, hybrid search, query rewriting
High coverage, low faithfulnessModel adds or distorts contentPrompt instructions, temperature, model, grounding check
High faithfulness, low correctnessContext is outdated or wrongSource documents and sync
Low citation precisionCitations attached to wrong chunksPrompt or citation logic
Good scores, poor user ratingsDataset unrepresentativeAdd production questions to the dataset
Worked example

Locating the problem

A RAG assistant's correctness score is 0.68. A Bedrock retrieve-and-generate evaluation shows context coverage of 0.62 and faithfulness of 0.94.

The model is faithful to what it receives, but the context often lacks the needed facts, so the team works on retrieval: a retrieve-only evaluation of hierarchical chunking and hybrid search raises coverage to 0.85, and correctness follows.

Check yourself

Which Bedrock feature computes judge-based metrics for RAG systems?

Show answer

RAG evaluation jobs in Amazon Bedrock Evaluations.

Exam Tips

Remember for the exam

  • Evaluate retrieval (relevance, coverage) and generation (faithfulness, correctness) separately.
  • Low coverage plus high faithfulness: fix retrieval.
  • Bedrock RAG evaluation jobs compute judge-based RAG metrics.
  • Calibrate judges with expert ratings; add user-flagged cases.