ladderlore
  • Type a service name, like S3 or IAM.

Concept

Evaluating RAG, agents and workflows

Test each part of an FM application: retrieval, generation, agent actions and the whole workflow.

Question
Retrieve
Generate
Answer
Relevant?
Grounded?
Check retrieval and generation separately.
  • 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
What to check in each kind of application.

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

2 / 2

  • Workflow

    Check
    Does the whole chain work?
    Signal
    End-to-end success, latency, cost
What to check in each kind of application.

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.