hermesonehq/hermes-registry/agent-platform-eval-flywheel
Claude Code and agent skill by hermesonehq/hermes-registry
- community
Checking that the SKILL.md file is still in the repository.
Measures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when evaluating an agent or model, building an eval dataset, picking or writing evaluation metrics, analyzing failures, comparing results before and after a fix, or when guidance is needed on Agent Platform eval methodology — including dataset schema, LLM-as-judge scoring, and common failure causes. For fine-tuning, use agent-platform-tuning. For general production deployment, use agent-platform-deploy.
Install
npx vskill@latest install hermesonehq/hermes-registry/agent-platform-eval-flywheelSKILL.md
Agent Platform Eval Flywheel Skill
Help users evaluate and iteratively improve GenAI models and agents using the Agent Platform GenAI Evaluation SDK (google.genai / agentplatform).
When to use this skill
- Evaluating GenAI agents or models with the Agent Platform GenAI
Evaluation SDK (client.evals.evaluate()).
- Creating evaluation datasets from session traces, pandas DataFrames, or
synthetic generation.
- Selecting, configuring, or writing custom evaluation metrics.
- Analyzing rubric verdicts, loss patterns, and clustering failures.
- Suggesting concrete code/prompt improvements based on eval results.
- Evaluating a model served on an Agent Platform endpoint (BYOM) or a
Model-as-a-Service (MaaS) model by ID — including deploying the model first if needed. For this case, follow references/deployment.md and use the endpoint_evaluation.py / maas_evaluation.py scripts.
Safety & Confirmation Tiers (CRITICAL)
Before executing any commands or scripts on behalf of the user, you MUST adhere to the following safety tiers based on the action requested:
- Tier R: Read-only (
inspect_results.py,compare_results.py,validate_dataset.py,parse_adk_traces.py,render_html_report.py)
- Rule: No confirmation needed. You may execute these helper scripts immediately to inspect data, validate schemas, parse traces, or compare evaluation results.
- Tier M: Read-only with Compute Costs (`client.evals.run_inference`, `client.evals.evaluate`, `client.evals.generate_user_scenarios`, `client.evals.generate_loss_clusters`)
- Rule: These operations invoke LLMs or remote evaluation services
that consume compute resources and incur costs. This requires interactive confirmation with 'Yes'/'No' options. Once granted once, you do not have to prompt for future evaluation.
Setup
Install the SDK:
Need GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION. Check env vars first; if missing, ask the user. Newer Gemini models often need location="global".
The Quality Flywheel
Five stages, run in order on the first pass, then loop 2 → 5 until quality targets are met.
Shortcuts that waste time
| Shortcut | Why it fails | |
|---|---|---|
| "I'll tune the metric threshold down so it passes." | Hides real failures. Fix the agent, not the bar. | |
| "This case is flaky, I'll skip it." | Flakiness reveals non-determinism in the agent. Fix with temperature=0 or stricter instructions. | |
| "I just need to fix the eval dataset, not the agent." | If expected outputs keep moving, the agent has a behavior problem. | |
| "I can tell from the trace it works — skip Stage 3." | Self-grading doesn't generalize. Always run evaluate() and read scores. | |
| "One iteration is enough." | Expect 5–10+ iterations. Stopping early leaves regressions on other metrics undetected. |
1. Prepare Data
Produce an EvaluationDataset. There are three input shapes, pick the one that matches the data the user already has:
- `EvalCase` list (single-turn or multi-turn):
``python from agentplatform import types dataset = types.EvaluationDataset(eval_cases=[ types.EvalCase(prompt="What is 2+2?", response="4", reference="4"), # For multi-turn agent traces, set agent_data instead of prompt/response. ]) ``
Multi-turn agent traces wrap each conversation in AgentData → ConversationTurn → AgentEvent. See references/dataset_schema.md for the full type hierarchy.
- Pandas DataFrame (tabular sources — CSV, BigQuery, Sheets):
```python import pandas as pd from agentplatform import types
df = pd.DataFrame({ "prompt": ["What is 2+2?", "Capital of France?"], "response": ["4", "Paris"], "reference": ["4", "Paris"], }) dataset = types.EvaluationDataset(eval_dataset_df=df) ```
Column names must match the fields the chosen metrics expect (see references/dataset_schema.md for the per-metric requirements table).
- Cold start (no data at all): synthesize scenarios server-side with
client.evals.generate_user_scenarios(...) and a UserScenarioGenerationConfig (user_scenario_count, simulation_instruction, environment_data). Stage 2 plays them out.
For ADK session dumps, use scripts/parse_adk_traces.py instead of writing the conversion by hand.
2. Run Inference
Populate responses/traces on the dataset. Skip this stage if traces are already complete (e.g., production logs or replay).
3. Grade (always run)
Pick metrics by what you want to measure. Full catalog in references/metric_registry.md.
Agent metrics (multi-turn, adaptive rubrics) — start here for agent eval.
| Goal | Metric | |
|---|---|---|
| Did the agent achieve the user's goal? | multi_turn_task_success | |
| Was the reasoning path logical and efficient? | multi_turn_trajectory_quality | |
| Tool/function calling quality across turns | multi_turn_tool_use_quality | |
| Overall conversational quality | multi_turn_general_quality | |
| Final response quality (no reference needed) | final_response_quality | |
| Final response vs. a golden reference | final_response_match | |
| Single-turn tool use | tool_use_quality |
General quality metrics (single-turn, adaptive rubrics) — for model eval.
| Goal | Metric | |
|---|---|---|
| Overall response quality (recommended starting point) | general_quality | |
| Linguistic quality (fluency, coherence, grammar) | text_quality | |
| Adherence to specific constraints / instructions | instruction_following |
Static rubric metrics (fixed criteria) — apply alongside the above.
| Goal | Metric | |
|---|---|---|
| Catch hallucinated claims (RAG, factual answers) | hallucination | |
| Factuality / consistency against provided context | grounding | |
| Safety policy compliance | safety |
Domain-specific check no built-in covers: write a custom metric.
- Predefined:
types.RubricMetric.<NAME>— server-side AutoRater, no
judge model needed.
- Custom LLM-as-a-judge:
types.LLMMetricwithprompt_templateor
types.MetricPromptBuilder for structured rubrics.
- Custom code:
types.CodeExecutionMetricwith acustom_function
string containing def evaluate(instance: dict) for remote sandboxed execution; or types.Metric with custom_function=<callable> for local execution.
Always persist the result so Stage 4 and 5 can read it. Save both JSON (machine-readable, diffable) and HTML (human-readable, linkable):
Or after the fact: scripts/render_html_report.py --type evaluation or scripts/inspect_results.py --save-html.
4. Analyze Failures
Read summary_metrics and eval_case_results — never fabricate scores. Use scripts/inspect_results.py --failing-only to filter to failures.
For each failed metric, see references/failure_patterns.md for deeper diagnoses. The compact mapping:
| Failing metric | What to change | |
|---|---|---|
multi_turn_task_success low | The agent isn't completing the goal — fix orchestration, missing tool calls, premature termination, wrong tool selection. | |
multi_turn_trajectory_quality low | The agent reaches the goal inefficiently — refine planning prompts, remove redundant tool calls. | |
multi_turn_tool_use_quality low | Fix tool descriptions, parameter docstrings, or agent instructions for tool selection. | |
final_response_quality low | Read auto-generated rubric verdicts; refine instructions to address the worst-scoring criterion. | |
final_response_match low | The agent's final answer doesn't match the golden reference — adjust response format or update the reference. | |
hallucination low | Tighten instructions to stay grounded in tool output; verify the tool actually returned the claimed data. | |
grounding low | The response contradicts the provided context — add explicit "cite only from context" instructions. | |
safety low | Add safety guardrails; review the violating content category in the rubric verdict. | |
general_quality / text_quality low | Adjust system instruction wording; the model's default phrasing is too generic for the task. | |
instruction_following low | The agent is ignoring constraints — restate them in the system instruction or use stricter wording. | |
| Agent calls wrong tools | Fix tool descriptions, agent instructions, or tool_config. | |
| Agent calls extra tools | Add explicit stop instructions, or switch to multi_turn_tool_use_quality to surface the extra calls in the rubric. |
For 10+ failures on the same metric, use the Error Analysis service to cluster failures into themes (L1/L2 taxonomy categories) instead of reading every trace:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/mlops/agent-platform-eval-flywheel/SKILL.md
Popularity
- Repository stars
- 91
- Repository forks
- 17
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hermesonehq/hermes-registry/agent-platform-eval-flywheel)