What good looks like for an agent
An agent can give the right answer the wrong way. Name the six dimensions of agent quality, judge the path as well as the answer, and evaluate before launch while monitoring after it.
Chapter 5Evaluate and deployLesson 1 of 5ShowHide
Chapter 5 of 7 in Google Cloud Professional Agentic Architect
- What good looks like for an agentYou're here
Prerequisites: What makes something an agent
A demo is not an evaluation
Many agents ship after a few happy demos. Someone asks the questions they had in mind, the answers look right, and the agent goes live. Then it refunds the wrong order, loops on a tool for a minute, or quotes a policy it never retrieved.
The trouble is that an agent does more than answer. As the first lesson showed, it chooses a path: which to call, with what arguments, in what order. A good answer can hide a bad path. So before you choose eval tools or criteria, you need a clear picture of what "good" means for an agent.
Six dimensions of quality
Google's Agent Development Kit (ADK) splits agent evaluation into two parts: the final response and the trajectory and tool use. The is the sequence of tool calls (and other intermediate steps) the agent took before it answered. ADK compares it with an expected trajectory, the path you would accept.
ADK's built-in criteria also check grounding, safety and efficiency. This path groups them into six dimensions, each with a typical failure:
| Dimension | The question | A failure |
|---|---|---|
| Final response | Is the answer correct, relevant and complete? | It gives last year's price. |
| Trajectory | Did it call acceptable tools, with the right arguments, in an acceptable order, and only tools it may use? | It issues a refund without the approval step. |
| Grounding | Are its claims supported by what its tools and retrieval returned? | The tool says 12 months; the agent says 24. |
| Safety | Is the output harmless and within policy? | It reveals another customer's address. |
| Latency | How long did the turn take? | It answers in 40 seconds. |
| Cost | How many model calls, tool calls and tokens did it spend? | It spends 40,000 tokens on a one-line answer. |
Latency and cost are often symptoms of a trajectory problem: a loop of repeated calls shows up as a slow, expensive turn.
Which quality dimension does a reply fail when it contradicts what the agent's own tool returned?
The right answer, the wrong way
Here is one run of a refund agent, scored on all six dimensions.
The customer got the right message, the amount matches the order, and the turn was quick. A test that compares only the final response with a reference answer passes this run. But the agent took an action its policy forbids. In production, that is the failure that costs money.
This is why evaluating agents differs from evaluating a single model call. A model call has one output to check. An agent's output is the end of a path, and the path is where it reads data, spends money and changes systems. Judge the path as well as the answer.
Your eval compares each final response with a reference answer and nothing else. Which failure can it never catch?
Before launch and after it
There are two times to measure quality, and you need both.
runs the agent on a fixed dataset before release: a set of cases with the inputs, the expected trajectory and the expected response. Because the cases stay the same, you can run them on every change (a new prompt, a new model version, a new tool) and see exactly what got better or worse. In ADK, these datasets are test files and evalsets, and a later lesson shows how to build one.
measures the deployed agent on live traffic. With tracing enabled, ADK records each run as a trace (the record of one run), with a span (one timed step) for each model call and tool call, and can export traces to Cloud Trace; logs and metrics sit alongside. Monitoring catches what the dataset missed:
- New inputs. Real users ask things no one put in the dataset.
- Changes after launch. A model version, a prompt, a tool's API or the documents the agent retrieves can change, and the same input then takes a different path.
- Behaviour at scale. Slow turns, rising cost and rare failures show up only across many runs.
The two feed each other. A failure you find in production becomes a new case in the offline dataset, so the next release is tested against it.
What do you do with a failure you find through online monitoring?
Recap
- An agent's quality has six dimensions: final response, trajectory, grounding, safety, latency and cost.
- A correct answer can come from a wrong, wasteful or unauthorised path, so judge the trajectory as well as the answer.
- Evaluate offline on a fixed dataset before each release, and monitor online after launch; turn what monitoring finds into new offline cases.
Sources
Show 3 sourcesHide sources
| Source | Publisher | What it supports |
|---|---|---|
| Why evaluate agents (opens in a new tab) | Google, Agent Development Kit documentation | retrieved 2026-11-17: agent evaluation covers the trajectory and tool use and the final response; test files and evalsets; the built-in criteria and the efficiency criteria, which never pass or fail a case |
| Evaluation criteria (opens in a new tab) | Google, Agent Development Kit documentation | retrieved 2026-11-17: what each criterion measures, including hallucinations_v1 for groundedness and safety_v1 for harmlessness |
| Agent activity traces (opens in a new tab) | Google, Agent Development Kit documentation | retrieved 2026-11-17: traces with spans for agent invocations, model calls and tool executions; export to Cloud Trace |
Suggested videos
Show 2 videosHide videos
The agent evaluation revolution (opens YouTube in a new tab)
Explains why the final answer is not enough and system-level, trajectory-aware evaluation is needed: the lesson's core idea.
How to evaluate agents in practice (opens YouTube in a new tab)
Component, trajectory and human-review tiers: judge the path as well as the answer.
Note: Doesn't list the six named quality dimensions.
Review
What are the six dimensions of agent quality in this path?
Check yourself
An account agent must call verify_identity before it deletes an account. In a test run it calls delete_account without verifying, then replies 'Your account has been deleted.' The reply matches the reference answer word for word. Should the run pass?