Lesson 3 of 3 Evaluating RAG Systems and Agents

Evaluating Agent Task Completion, Tool Use and Efficiency

This lesson covers task completion, tool usage effectiveness, efficiency and reasoning quality, since agents are judged by what they accomplish, how efficiently and how soundly they reason, not only by their final reply.

Learning outcomes

After completing this lesson, you will be able to:

  • Measure task completion rate.
  • Evaluate tool usage through trajectories.
  • Measure efficiency and reasoning quality.

Task completion

Task completion rate is the share of test scenarios in which the agent reaches the correct end state: the right record updated, the right booking made, the correct answer with the correct data. Scenarios define the user goal, the starting state (often in sandbox systems or mocked tools), the expected end state and constraints (for example, must ask for confirmation before cancelling). Simulated users, played by an FM following a script, make multi-turn scenarios repeatable. End-state checks are deterministic where possible, such as querying the sandbox database.

Select all that apply

Writing an agent test scenario

Exam skills 5.1.7

Choose what an agent test scenario should define.

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

Tool usage effectiveness

An agent can reach a correct final answer by a poor route, or fail because of one bad tool call, so its trajectory, the sequence of steps and tool calls it took, is evaluated as well as its result. Tool selection accuracy measures whether the right tool was chosen at each step, and argument correctness whether the parameters were valid and accurate. The evaluation also looks for unnecessary or repeated calls, correct handling of tool errors, and respect for required sequences, such as looking up an order before modifying it.

For scenarios with one correct route, an expected trajectory allows automatic comparison. For scenarios where several routes are valid, an LLM judge assesses whether the trajectory was reasonable, efficient and safe.

The following diagram compares two agent versions evaluated on 150 scenarios.

Comparing two agent versions on 150 scenarios. Both complete 91% of tasks, but version B averages 9 tool calls per task against 5 for version A, often searching flights twice, and uses 70% more tokens. Efficiency decides in favour of version A.
Trajectory analysis found the redundant searches.
Scenario questions

Judging an agent's trajectory

Exam skills 5.1.7

Use trajectory metrics to compare agent behaviour.

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

Efficiency and reasoning quality

Efficiency metrics count steps, model calls, tokens, cost and time per completed task; two agents with equal completion rates can differ greatly in cost. Reasoning quality in multi-step workflows is assessed from traces: whether the plan was sensible, observations were interpreted correctly, assumptions were checked and the agent stopped appropriately. Amazon Bedrock agent traces and AgentCore Observability provide the trajectories, and Amazon Bedrock AgentCore Evaluations scores agents with built-in and custom evaluators, including LLM judges that read traces. The following table summarises agent metrics.

MetricMeasuresMethod
Task completion rateCorrect end state reachedScenario tests with end-state checks
Tool selection accuracyRight tool for each stepCompare trajectory with expected tools
Argument correctnessValid, accurate parametersSchema and value checks
Steps, tokens and cost per taskEfficiencyTraces and usage data
Reasoning qualitySound plans and interpretationsLLM judge over traces; expert review
Safety adherenceConfirmations, refusals, permissions respectedScenario constraints
Worked example

Comparing agent versions

A team compares two versions of a travel agent on 150 scenarios. Version B has the same task completion rate as A (91%) but users say it is slower.

Trajectory analysis shows B averages 9 tool calls per task versus 5 for A, often searching flights twice, and uses 70% more tokens. Efficiency metrics, not completion alone, decide in favour of A, and B's prompt is revised to avoid redundant searches.

Check yourself

How should task completion be checked?

Show answer

By checking the end state, such as the created record, not only the agent's reply.

Exam Tips

Remember for the exam

  • Task completion: check the end state, not just the reply.
  • Evaluate tool selection, arguments, redundancy and error handling.
  • Efficiency: steps, tokens, cost and time per completed task.
  • Judge reasoning quality from traces; AgentCore Evaluations scores agents.