Home / Blog / Hill-Climbing Agent Quality with Agents CLI Evaluation
Tech News

Hill-Climbing Agent Quality with Agents CLI Evaluation

The scaffold ships with an eval dataset at tests/eval/datasets/basic-dataset.json and a custom LLM-as-judge metric in tests/eval/responsequality.py.

By Dillip Chowdary • Dec 05, 2026 • Source: Google Developers Blog

Hill-Climbing Agent Quality with Agents CLI Evaluation
Image: Google Developers Blog

At a glance

Tool
Agents CLI v1.8.0
Template
google/agents-cli/extensions/langchain/template@v1.8.0
Judge model
gemini-3.8-flash (1-to-5 scale: accuracy, relevance, clarity)
Baseline score
mean 4.0, stdev 1.4142 (4 test cases)
Regression score
mean 2.75, stdev 0.9574 (chef persona prompt)
Score drop
1.25 points; sf_weather dropped 4.0 → 2.0

Google published a walkthrough on October 28 showing how the eval namespace in Agents CLI v1.8.0 supports a continuous hill-climbing loop for improving agent quality: running test cases, grading the resulting traces, comparing results across runs, and catching regressions before they reach production. Per Google Developers Blog's report, the walkthrough covers baseline measurement, a deliberate prompt regression, per-case diff analysis, and a model backend swap using gemini-3.8-flash and gemini-2.5-flash.

This article is for developers building LLM-powered agents who want a structured method to track quality over time, identify which test cases drop on a given change, and automate evaluation runs with threshold alerts.

01Agents CLI v1.8.0 LangChain template and eval commands

The scaffold used throughout the walkthrough is the LangChain template that ships with Agents CLI v1.8.0, created with a single command:

Command
agents-cli create my-agent \
 --agent google/agents-cli/extensions/langchain/template@v1.8.0 \
 -d cloud_run
cd my-agent && agents-cli install

The eval namespace provides five commands: eval generate runs the agent against a dataset of test cases; eval grade scores the resulting traces; eval compare diffs two run result files; eval analyze clusters failures into themes; and eval optimize runs an automated hill-climbing pass on the agent's prompt.

02Four test cases, gemini-3.8-flash as judge

The scaffold ships with an eval dataset at tests/eval/datasets/basic-dataset.json and a custom LLM-as-judge metric in tests/eval/response_quality.py. The metric grades each response on a 1-to-5 scale for accuracy, relevance, and clarity, using gemini-3.8-flash as the judge. The default dataset has only one trivial case; the walkthrough expands it to four cases: a greeting, a weather question the tool handles, a weather question for a city with no data, and an off-topic question.

The baseline run against those four cases produces a mean score of 4.0 with a standard deviation of 1.4142. The standard deviation signals that the cases are not scoring uniformly — a healthier starting point than a flat 5.0, which would suggest the dataset is too easy.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

03Chef persona regression: mean drops from 4.0 to 2.75

To demonstrate how the loop catches regressions, the walkthrough introduces a realistic mistake: a developer accidentally pastes a chef persona system prompt from another project into the weather agent. The change compiles cleanly and passes lint, unit tests, and type checks. Re-running eval generate plus eval grade against the same four cases produces a mean of 2.75 and a standard deviation of 0.9574 — a drop of 1.25 points.

The tightened standard deviation (from 1.41 to 0.96) is consistent with the chef prompt pushing most cases toward the same mediocre range. A one-line change in a string literal was enough to cause a measurable regression that pre-eval checks could not surface.

04Per-case breakdown: sf_weather lost two points on tool usage

casebaseline → candidatewhat the chef prompt did
greeting5.0 → 4.0launched into an unsolicited recipe pitch after "hello"
sf_weather4.0 → 2.0ignored the get_weather tool, hallucinated conditions
rome_weather2.0 → 2.0already hallucinated at baseline; chef prompt made no difference
off_topic5.0 → 3.0answered the Dodgers question but appended a recipe

Three cases dropped; one held. The sf_weather case is the most significant: the chef persona shifted the model's attention away from the registered get_weather tool, so the agent stopped calling it and began fabricating weather values.

This type of change — a tool that is still registered but no longer invoked — cannot be caught by unit tests or static analysis. Only an end-to-end eval that grades the response in context surfaces it.

05Model swap evaluation: gemini-3.8-flash vs gemini-2.5-flash

For the LangChain template, the model is set in app/agent.py using LLM = "gemini-3.8-flash" and ChatGoogleGenerativeAI(model=LLM, temperature=0). The walkthrough swaps to gemini-2.5-flash (after restoring the helpful system prompt) and re-runs eval generate plus eval grade to generate a comparable result file. The same eval compare command then diffs the two runs to show which cases improved or regressed under the alternative model backend.

Note: The source article's model-swap results section was truncated in the available text; the specific score outputs for the gemini-2.5-flash run are not reproduced here.

Frequently asked questions

What does Agents CLI eval generate do?

It runs the agent against a dataset of test cases and saves the resulting traces to an output directory. The traces are then passed to eval grade for scoring.

How does Agents CLI eval grade work?

eval grade scores each trace using a configured metric — in the walkthrough, a custom LLM-as-judge function in response_quality.py that uses gemini-3.8-flash to rate responses on accuracy, relevance, and clarity on a 1-to-5 scale.

Why can't unit tests catch the prompt regression the walkthrough demonstrates?

The chef persona change leaves all tools registered and the code runnable, so lint, unit tests, and type checks all pass. Only an end-to-end eval that grades the agent's actual response — including whether it called the right tool — surfaces the behavior change.

How do I compare two Agents CLI eval runs?

Run agents-cli eval compare with the two result JSON file paths. The output lists changed and unchanged keys and includes a full per-case score diff in the differences object.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →