↑ ↓ to move, Enter to open, Esc to close

    GCP-PAAProfessional Agentic Architect

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search

    Exams / GCP-PAA / D1 Evaluating and deploying agentic workflows

    D1.1

    Evaluating and deploying agentic workflows

    • 2 min read
    • 5 sections
    • 25 questions
    • Free preview
    • Exam domain: Evaluating and deploying agentic workflows
    You are reading a free preview. The rest of the GCP-PAA course unlocks with an Exam pass or All access.See plans

    1. Improving agent behavior with prompts

    Symptom First fix
    Wrong tool / wrong order Structured system instructions (role, rules, tool usage) + few-shot examples
    Hallucination, inconsistent format Restrict answers to retrieved context, add output-format instructions and few-shot input/output examples

    System instructions define tool calling guidelines: "Tool calling guidelines: Define tool selection, ordering, and retry". Prompts reduce but do not guarantee correct behavior.

    2. Workflow architectures (ADK, A2A, Antigravity)

    Need Choice
    Generate → critique → refine until approved ADK LoopAgent; set max_iterations and a tool that sets escalate (the loop does not decide to stop itself)
    Two agents, not consumed externally, latency matters Local sub-agents, not A2A ("best handled as local sub-agents for performance and simplicity")
    Long-running remote tasks A2A SSE streaming for live updates; push notifications (webhook) for tasks lasting minutes to days
    Concurrent coding subagents branch workspace (isolated Git worktree) + isolated contexts for builds

    3. Multimodal inputs and retrieval

    • Large audio/video: pass Cloud Storage URIs; Cloud Storage files can reach 2 GiB minus 500 KiB, while inline parts are capped and Base64 adds about 33% overhead.
    • Video search: Multimodal embeddings API (text and video share a space) + Vector Search ANN.
    • RAG chunk ranked low but present: add a ranking-API reranker (an LLM reranker needs an extra Gemini call).
    • Narrow, high-volume classification: fine-tuned small model with batch inference (50% discount, asynchronous).

    4. Evaluation

    Which metric catches which agent failure

    Goal Metric / tool
    Tool order vs a reference trajectory_exact_match, trajectory_in_order_match, any-order, precision, recall
    Many valid tool paths, no reference Managed rubric TOOL_USE_QUALITY
    Several acceptable final answers ADK rubric_based_final_response_quality_v1
    Answer supported by context Groundedness / hallucination metrics (need context)
    Retrieval quality Context precision and recall vs ground truth
    Flaky live backends Mocked tool data / simulated errors, plus trajectory metrics

    5. Hosting and observability

    Where to host and how to find latency

    • ADK agent with managed sessions and Memory Bank: Agent Runtime (sessions move from in-memory locally to cloud-based managed after deployment).
    • Stateless, bursty service: Cloud Run (stateless instances, scale to zero).
    • Intermittent or cross-service latency: Cloud Trace spans; trace context links spans across services. Averages and metrics cannot name the slow step.

    Exam traps

    • Fix prompts/instructions before swapping models or adding memory.
    • A LoopAgent without max_iterations or escalate never stops.
    • Reference-based trajectory metrics penalize valid alternative paths; use rubric metrics there.
    • Groundedness does not measure retrieval completeness.
    • Batch inference is cheap but asynchronous.
    • Monitoring/alerts detect failures; evaluation gates prevent them.

    Docs

    The rest of this chapter is part of the GCP-PAA premium course

    Unlock every chapter, all 75 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters