Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. Building agents that take real-world actions is impressive, but ensuring they continue to behave correctly as they evolve is a much harder challenge. Manual reviews of execution traces and subjective “vibe checks” quickly become a development bottleneck. In this fourth episode of the Google ADK series, the focus moves from deployment to evaluation and quality assurance. You’ll learn: * What should be evaluated in an agent system? Distinguishing final-response quality from tool use, execution trajectories, state handling, and end-to-end task success. * How Google ADK represents evaluations. Understanding eval sets, evaluation cases, invocations, evaluation configs, and the metrics that operate on them. * How to create, run, and inspect ADK evaluations. Recording evaluation cases, configuring metrics, executing evals from the CLI or Python, and interpreting the resulting scores and reports. 👉 Enjoyed this episode? Subscribe to The AI Practitioner to get future articles and podcasts delivered straight to your inbox: aipractitioner.substack.com Get full access to The AI Practitioner at aipractitioner.substack.com/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
[music]
SPEAKER_00Welcome back to The AI Practitioner. I'm Lina Faik, ML Engineer, Consultant, and Lecturer in Advanced Machine Learning at Sorbonne University. I help companies turn their data into real outcomes with AI, and this is where I share what I learned from actual projects. The deep technical write-ups live on Substack at AIPractitioner.substack.com, and these conversations are the audio companions. With me today is Julian. He ships LLM applications to production and he's never once written a formal test for an agent which makes him exactly the right person for this one.
SPEAKER_01So what's on the table today?
SPEAKER_00Okay, picture this. I add one tool to an agent pipeline. Small change, five minutes of work. I run it, the output comes back, and the article it wrote is good. Clean structure, answers the question, nothing weird about it. I almost shipped it. But. But I scrolled through the trace out of habit, and the critic agent never ran. The draft went from the writer straight to approved. The text was fine by accident.
SPEAKER_01Ouch.
SPEAKER_00That's the moment I stopped trusting my own eyes. The output looked right, the execution was broken, and there's no amount of rereading that final answer that would have caught it.
SPEAKER_01Hold on, though. You did catch it. You read the trace. Isn't that the process working?
SPEAKER_00That one time? Sure. But it doesn't scale. Every new tool, every new agent, every new branch, and I'm back to reading messy traces by hand. That's a bottleneck wearing a quality process as a costume.
SPEAKER_01Chair.
SPEAKER_00I call it the vibe check. You run the thing, it looks about right, you move on. Works fine when the system is small and you wrote all of it last week. Falls apart the second it has features you've already forgotten about.
SPEAKER_01So what replaces the vibe check?
SPEAKER_00Regression testing. Same idea as any other software. You capture the behavior you want to keep and you get told when it changes. What's different with agents is what the word behavior even means.
SPEAKER_01Because it's more than the answer.
SPEAKER_00Way more. An agent picks actions, calls tools, updates state, decides when to stop. All of that is behavior and all of it can break while the final text still reads beautifully.
SPEAKER_01Break it down for me.
SPEAKER_00Four things. Did it actually do the task? Did the workflow take a sensible path? Did it call the right tools with the right arguments? And did information survive the handoffs between agents?
SPEAKER_01And in your writing pipeline, what do those look like?
SPEAKER_00The first one is, is the article clear and accurate? The second is, did the writer run before the critic? The third is, did research fire only when something actually needed checking? And the fourth is, did the revision step use the current draft and the current critique?
SPEAKER_01That last one sounds like the sneaky one.
SPEAKER_00It's the sneakiest. A stale draft gives you a perfectly coherent article that quietly ignores everything the critic asked for. Nothing crashes, nothing looks wrong.
SPEAKER_01Okay, pushback. All four of those sound like things I could just assert in a unit test. Why do I need an evaluation framework at all?
SPEAKER_00For some of them, you should absolutely use a unit test. I think about it in three layers. At the bottom, you've got component tests, parsers, schemas, the functions of the right state, tool wrappers, business rules, anything where you can work out the expected answer exactly.
SPEAKER_01And those stay as plain Python?
SPEAKER_00They stay as plain Python. A judge model adds nothing when you already know the right answer. It just adds cost and randomness to something that was fast and repeatable.
SPEAKER_01What's the middle layer?
SPEAKER_00Trajectory tests. Routing, the order agents run in, conditional steps, loop termination, state getting passed along. That's where the framework earns its keep, because now you're testing interactions instead of functions.
SPEAKER_01And the top?
SPEAKER_00End to end. Did the person actually get what they came for? Task completion, response quality, groundedness, whether it followed instructions. Up there, several outputs can be valid, so you stop comparing against one right answer and start judging against criteria.
SPEAKER_01Cheap and precise at the bottom, expensive and fuzzy at the top.
SPEAKER_00And if you only build the top layer, you get slow tests that tell you something broke without telling you where.
SPEAKER_01So how does ADK handle all this?
SPEAKER_00This is the part I liked most. It treats an evaluation as data, not as a pile of scripts. You describe some representative interactions, you describe how they should be scored, and the engine runs them for you.
SPEAKER_01Two separate things.
SPEAKER_00Two separate things and keeping them separate really matters. An eval set says what gets tested. An eval config says how it gets scored. Same recorded conversation, different criteria, anytime you want.
SPEAKER_01So what's actually inside an eval set?
SPEAKER_00Eval cases. Each case is one interaction the agent should handle correctly. And inside a case you've got invocations, which is the bit people get wrong.
SPEAKER_01Wrong how?
SPEAKER_00An invocation isn't one model call. It's one user interaction plus everything the system did in response. That might be four agents, a dozen model calls, a handful of tool executions, and it all collapses into a single invocation. Huh.
SPEAKER_01So it's a unit of interaction, not a unit of inference.
SPEAKER_00That's exactly the right way to think about it. And each invocation carries the user input, the expected final response, optionally the tool calls and agent events in between, and optionally a starting session state.
SPEAKER_01Wait, a starting session state. You can drop a case into the middle of a workflow?
SPEAKER_00You can, and honestly, it's one of the most useful things in there. I can hand it an existing draft and a revision count and start the agent from that exact point.
SPEAKER_01So you skip replaying the first four steps just to test the fifth.
SPEAKER_00And I skip sitting there, hoping the critic asks for a revision this time so the branch I care about actually runs.
SPEAKER_01Alright, let's talk scoring, because this is where I get skeptical. Can't you just save a good article and compare against it?
SPEAKER_00That's everybody's instinct, and it's the first thing that breaks. Reference matching compares what got generated against a saved answer. One version does it on word overlap. Another uses a judge model to ask whether the new answer holds up against the reference.
SPEAKER_01And for an article that fails because?
SPEAKER_00Because a better article can share almost no wording with the one you saved, there's no single correct output for writing or summaries or reports, you end up punishing improvements.
SPEAKER_01So what do you reach for instead?
SPEAKER_00Depends entirely on which of those four things you're checking. ADK groups its metrics into five families, deterministic, reference-based, rubric-based, groundedness and safety, and multi-turn.
SPEAKER_01Start with Deterministic.
SPEAKER_00Deterministic is tool trajectory. It takes the sequence of tool calls in your eval set and compares it against what actually happened during the run. You can demand an exact match or just check that the calls you needed happened in the right order. No judge model anywhere.
SPEAKER_01Which means the same result every time.
SPEAKER_00Reproducible, cheap, and honest. It's my workhorse for routing. Did the coordinator send this to the right workflow? Did the agents I expected actually show up? Those are yes or no questions, so they deserve a yes or no metric.
SPEAKER_01And rubrics for the fuzzy stuff.
SPEAKER_00Rubrics for the fuzzy stuff. You write your criteria in plain language and a judge model scores against them. Things like, does the article answer the question directly? Are the factual claims either supported or properly hedged? Does it hold the register I asked for all the way through?
SPEAKER_01That's a completely different shape of test.
SPEAKER_00It is, and it matches the shape of the output. You're not asking whether the text looks like your example anymore. You're asking whether it has the properties you care about. And there are rubric metrics for tool use and for whole conversations too, not just final answers.
SPEAKER_01What about hallucinations?
SPEAKER_00Different family. And there's an important distinction hiding in it. Hallucination checks don't compare against a golden answer at all. They ask whether the claims in the response are supported by what the agent actually had in front of it. Tool outputs, retrieve documents, the conversation itself.
SPEAKER_01So it's about groundedness, not correctness.
SPEAKER_00Exactly. And then multi-turn metrics, which judge a whole conversation instead of one response. Did the task succeed across all the turns? Was the path a sensible one? Were the constraints from turn one still being respected at turn six?
SPEAKER_01Any catch with those?
SPEAKER_00One you want to know before you plan a sprint around it. On the version I was running, the managed multi-turn metrics and the safety metric handoff to Google's evaluation services. So an AI Studio key isn't enough. You need a cloud project, credentials, API switched on, permissions, billing. I'm not gonna walk through that setup out loud, it's all in the article.
SPEAKER_01Better to hear that now than at five o'clock on a Friday.
SPEAKER_00That was roughly my Friday, yeah.
SPEAKER_01Okay, so you've got cases and you've got metrics. How do you actually run the thing?
SPEAKER_00Three ways in, and they're for genuinely different moments. There's the web interface, there's the command line, and there's the Python API.
SPEAKER_01Start with the interface.
SPEAKER_00The interface is for recording. You run the agent normally, you have a real interaction, and then you turn that session into an eval case. That's the killer feature for me. I'm not writing the expected trajectory by hand. I'm capturing one that really happened.
SPEAKER_01And then you pick your metrics.
SPEAKER_00You pick metrics and thresholds, run it, and get a pass or fail plus the expected and actual execution side by side. There are event and trace views underneath with the tool calls, the state updates, the agent transfers, all the stuff I used to squint at manually.
SPEAKER_01Hang on. If it writes a different article the second time, doesn't the case just fail?
SPEAKER_00Not if you picked the right metric. In the example I walked through, Tool Trajectory scores a perfect one against a threshold of 0.7 and the case passes, even though the article that came out is completely different text.
SPEAKER_01Because the trajectory metric doesn't care about the pros.
SPEAKER_00It cares whether the workflow held. That's the whole game, matching the metric to the behavior you're actually protecting.
SPEAKER_01So why leave the interface at all?
SPEAKER_00Because recording something isn't the same as maintaining it. When you save a case, it writes an eval set file into the agent's evaluation folder. And once that file exists, you want it in version control, reviewed like code, and run by a machine on a schedule.
SPEAKER_01The file becomes the real thing.
SPEAKER_00The file becomes the real thing. In my repo the eval sets sit in one folder, the metric configs in another, custom metrics in a third, and control tool outputs in a fourth. Separate eval sets for routing, refinement, article quality and simulated conversations, each with a config that suits it.
SPEAKER_01Anything you learned the hard way editing those by hand?
SPEAKER_00One big thing. Don't preserve unstable details unless the requirement depends on them. Generated IDs, timestamps, the exact prose inside an argument. That's all noise, and it'll fail your test for reasons you don't care about.
SPEAKER_01The classic brittle test trap.
SPEAKER_00Same trap, new syntax. And once those files exist, you run them from the command line. Point it at the agent package, the eval set, the config, and ask for detailed results.
SPEAKER_01What does detailed actually give you?
SPEAKER_00Three levels. Whether the case passes I'll grab the exact flags from the article. They're all in there with the full output breakdown. Reading command line flags out loud is nobody's idea of a good time. Control. It slots into a PyTest suite or a notebook. And it does one thing the command line just can't do. It lets you evaluate a single sub-agent as if it were the root of the whole system.
SPEAKER_01Oh, that's interesting. Why does that matter?
SPEAKER_00Because a sub-agent normally only runs after a bunch of upstream decisions. If I want to test my writer agent, So you cut the coordinator out entirely. Any sharp edges?
SPEAKER_00Sub-agent targeting only exists in the Python API, not on the command line. And custom metrics have to be registered explicitly before the programmatic evaluator will find them. The command line does that registration for you, so it's very easy to get a lookup failure and go blame your config.
SPEAKER_01I'd have lost an hour to that.
SPEAKER_00I lost some time to that. It's flagged in the article so nobody else has to.
SPEAKER_01Okay, bigger question. I already send my traces to an observability platform. Isn't this just a worse version of what Langsmith or Phoenix already do?
SPEAKER_00Not worse, different, and I'd say complementary. What ADK has going for it is that it's native. Evalsets, Session State, Tool Trajectories, Traces, they all use the same concepts as the agents themselves. Capturing a real interaction and replaying it needs no extra instrumentation layer at all.
SPEAKER_01And the platforms are stronger where?
SPEAKER_00Dataset Management. Comparing experiments, tracing across frameworks, watching production. Langsmith gives you version datasets, offline experiments, and evaluation on live traffic. Phoenix pairs open telemetry tracing with datasets and experiments. And DeepEval is the one to look at if you want evaluation to feel like ordinary software testing.
SPEAKER_01So what's the actual division of labor?
SPEAKER_00I use ADK to answer one question. Does this agent still behave the way it behaved last week? That's regression testing, and native tooling is genuinely better at it. Then the traces go out to a platform for the wider experiment analysis and the production picture.
SPEAKER_01That's a narrower claim than I expected from someone who just wrote a whole piece about it.
SPEAKER_00It's deliberately narrow. The failure I keep watching teams walk into is expecting one tool to cover both development testing and production observability, and then being disappointed by both.
SPEAKER_01Alright, if I'm sitting at my desk on Monday with an agent I don't trust, where do I actually start?
SPEAKER_00One session. Run your agent, get an interaction you'd be happy to see again, save it as an eval case in the interface, then score it with tool trajectory and nothing else. No judge, no cloud setup, no rubrics to write.
SPEAKER_01That's a smaller first step than I expected.
SPEAKER_00It's small on purpose, and it already catches the thing I opened with. A skipped critic changes the trajectory even when the prose comes out perfect. One case, one metric, and that whole category of silent breakage becomes visible.
SPEAKER_01And then it grows from there.
SPEAKER_00You add cases as you find failures, add rubrics once quality starts mattering more than routing, and wire the whole thing into continuous integration so the machine reads the traces instead of you.
SPEAKER_01Where do I find the full version?
SPEAKER_00The complete write-up is on Substack at AIPractitioner.substack.com with the metric families, the folder layout, the commands, the code, and the repo. It's part 4 of the ADK series, so the pipeline getting tested here is the one built across the first three.
SPEAKER_01I'll go read it.
SPEAKER_00The thing I'd leave you with is this. The reason to build any of this isn't that your agent is wrong today. It's that you can't tell whether it's wrong today, and the polished output is exactly what stops you from noticing.
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could learn from every interaction...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could continuously improve their...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if AI agents could improve their own prompts...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if the key to better AI agents isn’t writing...
Prefer reading instead? The full article is available here. The podcast is also available on Spotify and Apple Podcasts. Subscribe to keep up with the latest drops. What if improving an AI agent’s performance had less...