MockCertMockCert
Menu

Test yourself in exam conditions

A full Google Cloud Professional Agentic Architect mock exam: 60 questions in 120 minutes. Your first one is free.

Start a free mock exam
Domain 4 · 2 topics · about 16 minTopics in this domainTopics

Domain 4 · Overview

Overview

Up next: Evaluating agents in development and in production · 11 steps + check · 7 min

Domain 4 · Topic 1 of 2

Evaluating agents in development and in production

Step 1 of 11

Think first How would you build test sets and pick tools to evaluate an agent both before and after it goes live?

Why it matters: Questions describe an agent and a testing need, then ask which test set, metric or evaluation tool fits.

Agent evaluation is a continuous cycle: evaluate, analyze failures, then optimize. Eval cases define the tasks, and traces record what the agent did. Offline evaluation scores traces against metrics, and Online Monitors keep scoring on a schedule.

Step 2 of 11

Term Meaning
Eval case A specification that defines the task the agent must perform.
Trace An immutable record of agent behavior: model inputs, responses and tool calls.
Conversation plan A hidden instruction that tells the simulated user its goals and how to react.
Golden expectation A check on a golden turn, such as which tool was called and with what parameters.
Quality drift A drop in agent performance over time caused by changes in user behavior or external data.

Step 3 of 11

Evaluation is a loop: evaluate, analyze failures, then optimize. You score the agent, group its failures into clusters, and fix those specific issues. Then the cycle starts again. An eval case specifies the task. A trace is the immutable record of what the agent did, including model inputs, responses and tool calls.

Step 4 of 11

Some metrics need a reference answer; others do not. Match the metric to your test set. If your eval cases lack reference answers, Exact Match cannot score them. Use a reference-free metric such as Helpfulness instead.

Two kinds of metrics compared

Feature Reference-based Reference-free
Example metric Exact Match Helpfulness
Needs a reference answer Yes, in the eval case No, it judges the trace on its own

Exam trap Helpfulness does not need a reference answer. It is reference-free and evaluates the trace by itself.

Step 5 of 11

Simulation builds a test suite even without production data. LLMs generate diverse multi-turn scenarios from the agent's instructions and tool definitions. They then roleplay as the user to stress-test the conversation logic. Each case has a starting prompt and a conversation plan. Simulation needs at least one agent version in the Agent Registry.

Exam trap You do not have to wait for live traffic to build a test set. Simulation can create cases from scratch with LLMs.

Step 6 of 11

Environment simulation injects errors into tool calls. It intercepts chosen tool calls and returns mocked data or simulated errors, such as HTTP 503 errors or latency spikes. A persona's speaking rate can be raised to test fast talkers. In user simulation, Max Turn caps invocations to stop endless loops.

Exam trap Max Turn is not unlimited by default. It defaults to 5 invocations, which stops a runaway conversation.

Step 7 of 11

Evaluate an Agent Development Kit (ADK) agent locally to iterate fast. Local runs let you tune prompts and tool configurations quickly. Built-in and partner tools test execution trajectories. The agents-cli eval commands give a CLI workflow to evaluate and optimize. The adk optimize command applies the GEPA algorithm to refine root system instructions against your test suite.

Step 8 of 11

Score single traces or whole multi-turn sessions. Offline evaluation scores individual traces or full sessions against predefined or custom metrics. A session is a multi-turn conversation history. Multi-turn autoraters evaluate entire conversation histories automatically. In the console, a new offline evaluation adds all four core metrics by default.

Step 9 of 11

A CX Agent Studio evaluation uses golden steps or a scenario, never both. A golden evaluation replays a golden conversation, and expectations check each turn. An expectation can require a specific tool with given parameters, or no tool calls at all. Tool invocation correctness passes at a threshold from 0 to 1 that defaults to 1.0. A scenario instead simulates the conversation and scores it against rubrics.

Golden and scenario evaluations compared

Feature Golden evaluation Scenario evaluation
Input Golden steps Scenario config
Turn limit Replays at most 100 turns Simulates at most 100 turns, the default
Checked against Golden expectations for each turn Required rubrics

Exam trap A mocked tool response does not fill gaps safely. Any parameters you leave out of mockToolResponse are hallucinated by the LLM.

Step 10 of 11

Online Monitors evaluate on a schedule, typically every 10 minutes. This loop helps you detect quality drift early. Results go to Cloud Logging, and numeric scores go to Cloud Monitoring. The Max samples per run setting caps evaluation costs.

Exam trap Max samples per run does not set how often a monitor runs. It caps evaluation costs; the schedule sets the timing.

Step 11 of 11

Check

Check: Evaluating agents in development and in production

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Deploying and scaling production workloads · 11 steps + check · 8 min

Domain 4 · Topic 2 of 2

Deploying and scaling production workloads

Step 1 of 11

Think first How would you pick a runtime for an agent, then keep it fast, reliable, and affordable once it runs in production?

Why it matters: Questions describe an agent workload or failure and ask which runtime, monitoring signal, or fix fits it.

Agent Runtime is a fully managed home for agents, while Cloud Run runs containers as immutable revisions. Once deployed, telemetry shows latency, errors, and the agent's reasoning path. Monitoring alerts and a kill switch let you catch drift and stop bad behavior.

Step 2 of 11

Term Meaning
Agent Runtime Fully managed runtime, formerly Agent Engine, that hosts, deploys, and scales agents.
Runtime contract HTTP API spec that sets a custom container agent's endpoints and request and response structures.
Revision An immutable Cloud Run version, created whenever any setting changes.
OpenTelemetry Protocols used to collect agent traces, logs, and metrics such as latency and token usage.
Drift A significant change over time in the feature data a model sees in production.

Step 3 of 11

Agent Runtime runs agents without you managing servers. It was formerly named Agent Engine. It hosts, deploys, and scales agents built with ADK or other tools, so you focus on agent logic. It adds session management, a long-term Memory Bank, VPC-SC compliance, and IAM settings. Agents deployed to Agent Platform also join the Agent Registry automatically.

Step 4 of 11

Any language works if the agent is containerized and meets the contract. The runtime contract defines the HTTP endpoints and the request and response shapes. ADK is fully integrated. LangChain, LangGraph, AG2, and LlamaIndex get managed templates in the Agent Platform SDK. With that SDK, query code is identical for local and deployed agents.

Exam trap Agent Runtime is not limited to ADK agents. Any language or framework can run, as long as the agent is containerized and follows the runtime contract.

Step 5 of 11

Match the runtime to the use case, requirements, and cost. The exam names Agent Runtime, Cloud Run, and GKE as options. Agent Runtime hides the infrastructure from you. Cloud Run services cost nothing until they receive requests.

Agent Runtime and Cloud Run compared

Feature Agent Runtime Cloud Run
What it runs Containerized agents in any language that meet the runtime contract Container images; any setting change makes a new immutable revision
Extra features Integrated session management and a long-term Memory Bank Continuous deployment, if set up: a Cloud Build trigger on new commits to one branch
Fast recovery Delete the agent or reroute revision traffic Roll back to a previous, known-good revision

Exam trap Changing only a Cloud Run setting, with the same image, still creates a new revision. Every revision is immutable.

Step 6 of 11

ADK deployments send telemetry to Cloud Observability by default. The suite includes Cloud Trace, Cloud Logging, Cloud Monitoring, and Topology. It uses OpenTelemetry to collect traces, logs, and metrics such as latency and token usage. That lets you debug failures, watch costs, and follow an agent's full reasoning path.

Step 7 of 11

Overview tracks the whole agent; Tools tracks its tool calls. Switch on OpenTelemetry trace and log instrumentation to populate these pages. Check the Tools tab when tool invocation latency is the suspect. With traces on, the Playground also shows Trace, Event, and State details, where Event graphs the invoked APIs.

Metrics on the Overview and Tools tabs

Feature Overview tab Tools tab
Volume Agent request count Number of tool calls
Errors Agent error rate Tool error rate
Speed Agent latency Tool latency

Exam trap Agent latency on the Overview tab does not isolate slow tools. Tool latency appears on the Tools tab.

Step 8 of 11

Use skew detection with training data, drift detection without it. Model Monitoring alerts when a score passes a threshold, so you can re-evaluate or retrain. By default, v1 watches all features with a threshold of 0.3. To cut cost, set a sampling rate that monitors only a subset of requests.

Skew detection and drift detection compared

Feature Skew detection Drift detection
Compares Production feature data against the training data Changes in production feature data over time
Use when The original training data is available The original training data is not available

Exam trap Drift detection does not need the training data. Skew detection is the one that does.

Step 9 of 11

Deleting the deployed agent is the immediate kill switch. Deletion stops every running container and invalidates the agent's SPIFFE identity. You can also reroute traffic or revoke access through Agent Gateway and IAM. Policy changes take 2 to 7 minutes to spread, so pair them with deletion or rerouting.

Exam trap Revoking IAM access alone does not stop an agent right away. Policy changes need 2 to 7 minutes or more to propagate.

Step 10 of 11

Reproduce locally first to split code bugs from platform issues. Running the image locally shows whether the problem is in the code or only in Cloud Run. Error Reporting groups errors by message across revisions and services. Cloud Logging also shows errors that lack a recognized stack trace. For a quick fix, roll back to a previous healthy revision.

Exam trap Error Reporting does not list every error. Check Cloud Logging for messages that lack a recognized stack trace.

Step 11 of 11

Check

Check: Deploying and scaling production workloads

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Domain 4 · after the last topic

Domain 4 review

Each topic's Check tested it on its own; this mixes them.

Mixed quiz

Take the Domain 4 quiz

13 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.

Flashcards

Domain 4 flashcards

4 cards with this domain's key facts. Flip each one and check what you knew. No account needed.

Test yourself in exam conditions

A full Google Cloud Professional Agentic Architect mock exam: 60 questions in 120 minutes. Your first one is free.

Start a free mock exam
Next domain · 15% of the examSecuring and governing agentic workflows2 topics

Report a problem

On “”. Tell us what looks wrong; we read every report.

What is the problem?

Optional.