Concept
Evaluating RAG, agents and workflows
Test each part of an FM application: retrieval, generation, agent actions and the whole workflow.
RAG retrieval
- Check
- Did search find the right passages?
- Signal
- Context relevance, coverage
RAG generation
- Check
- Is the answer correct and grounded?
- Signal
- Correctness, faithfulness
Agent
- Check
- Did it finish the task with the right tools?
- Signal
- Task completion, steps taken
Workflow
- Check
- Does the whole chain work?
- Signal
- End-to-end success, latency, cost
| Part | Check | Signal |
|---|---|---|
| RAG retrieval | Did search find the right passages? | Context relevance, coverage |
| RAG generation | Is the answer correct and grounded? | Correctness, faithfulness |
| Agent | Did it finish the task with the right tools? | Task completion, steps taken |
| Workflow | Does the whole chain work? | End-to-end success, latency, cost |
1 / 2
RAG retrieval
- Check
- Did search find the right passages?
- Signal
- Context relevance, coverage
RAG generation
- Check
- Is the answer correct and grounded?
- Signal
- Correctness, faithfulness
Agent
- Check
- Did it finish the task with the right tools?
- Signal
- Task completion, steps taken
| Part | Check | Signal |
|---|---|---|
| RAG retrieval | Did search find the right passages? | Context relevance, coverage |
| RAG generation | Is the answer correct and grounded? | Correctness, faithfulness |
| Agent | Did it finish the task with the right tools? | Task completion, steps taken |
2 / 2
Workflow
- Check
- Does the whole chain work?
- Signal
- End-to-end success, latency, cost
| Part | Check | Signal |
|---|---|---|
| Workflow | Does the whole chain work? | End-to-end success, latency, cost |
What it is
An application is more than a model. Judging only the model misses where an application fails, so test each part and then the whole.
For RAG, check retrieval first: did the search find relevant passages, and enough of them? Then check generation: is the answer correct, complete and grounded, meaning it uses only the retrieved passages? For an agent, check task completion: did it reach the goal, pick the right tools and avoid wasted steps? For a workflow, check end-to-end success, speed and cost.
What it is
Amazon Bedrock can evaluate RAG sources, including Amazon Bedrock Knowledge Bases, with a judge model. A bad answer often comes from bad retrieval, not from the model, so test the search separately. The named metrics are in the Judge metrics lesson.
Remember
- RAG retrieval: are the found passages relevant and complete?
- RAG generation: is the answer correct and grounded in those passages?
- Agents: task completion, right tool choice, number of steps.
- Workflows: end-to-end success, speed and cost.
- A bad answer often means bad retrieval. Test each stage.
On the exam
- “Check that answers stay faithful to the retrieved documents” points to the faithfulness metric in RAG evaluation.
- “Did the agent finish the user's task?” points to task completion.
Do not mix it up with
- Judge metrics: correctness, completeness and moreThe built-in scores a judge model gives in Amazon Bedrock, from correctness and completeness to harmfulness, plus the RAG metrics.
- Hallucination detection and groundingMake a model’s answers match real sources, and catch the ones that do not.
- Business objective metricsMeasure whether a model helps the business: productivity, engagement, task completion, satisfaction and cost.