Evaluate the retriever, generator and business outcome
Build a held-out evaluation and identify where a model application loses quality.
The right document, the wrong answer
A legal information assistant fails on ten held-out questions. In eight cases the necessary passage reached the prompt, but the answer contradicted it. What part of the system would you investigate first?
Evaluations with a reference
Build held-out cases with a rubric and known constraints. Blind human reviewers to the model where possible and check agreement. Bedrock evaluations can help run comparisons. A general benchmark informs selection, but may poorly represent your customers’ cases.
Choosing a metric
ROUGE measures forms of reference overlap used in summarization. BLEU scores n-gram precision with a length penalty, often for translation. BERTScore compares contextual token representations. A model judge applies a rubric at scale. Check agreement with humans and treat factual grounding as its own test.
Measuring task success
Specify what successful assistance looks like, such as a complete invoice explanation accepted without correction. Instrument the task from start to finish. Good text similarity can coexist with poor completion or extra manual work.
Finding component failures
For RAG, measure whether required passages appear among the retrieved results, then measure whether the answer is supported. For agents, score tool selection, argument validity, execution success and final outcome. A component score can direct a fix that an aggregate rating hides.
Business alignment
Track completion rate, time to resolution, cost per successful interaction and user satisfaction together. Segment results by use case and account for escalations. Compare with a baseline using the same traffic mix.
Work through the decision
Compare your reasoning
Audit grounding and response generation on those eight cases. Inspect ranking for the other two. Score support against the cited passages and use independent reviewers for ambiguous cases. A better embedding model need not fix a generator ignoring correct evidence.
Change one constraint
A faster model lowers cost per call but causes more repeat requests. Which unit should procurement compare?
Check your answer
Use total cost per successfully completed case, including retries, tools and review. Assess satisfaction and safety constraints alongside the unit cost.
Isolate a retrieval failure
Each row contains the required source ID, the IDs that reached the prompt, and the result of a human check on the generated answer. Count evidence availability separately from final answer support. Run this locally with Python 3 or trace the example on paper.
cases = [('policy-a', ['policy-a', 'policy-b'], True),
('policy-b', ['policy-c'], False),
('policy-c', ['policy-c'], False),
('policy-d', ['policy-d'], True)]
hits = sum(required in found for required, found, _ in cases)
supported_hits = sum(required in found and ok for required, found, ok in cases)
print('retrieval hits', hits, 'of', len(cases))
print('supported answers on hits', supported_hits, 'of', hits)
Check your result
The required source reached the model in three of four cases. Two of those three answers were supported. Investigate retrieval for policy-b and generation or grounding for policy-c. Combining them into one failure count could send both investigations to the wrong team.
Revisit the recording
The evaluation chapter compares correct results, false predictions and retrieval relevance. Decide which denominator matches the cost of a missed case. Evaluations · 9:41:44.
Sources and further practice
AWS exam objectives · AWS documentation for this case.
From tool request to verified action · Claude Certified Architect – Foundations · Return to the study map.
Evaluate the retriever, generator and business outcome quiz
Answer 5 questions. Check each answer for an explanation.