google-agents-cli-eval
Skill này làm gì
Skill hướng dẫn đánh giá một agent AI bằng bộ dữ liệu, các chỉ số và một AI chấm điểm. Skill dành cho lập trình viên muốn đo mức độ trả lời của agent và cải thiện nó.
Khi nào nên dùng
- ✓Khi bạn muốn chạy đánh giá cho agent AI của mình.
- ✓Khi bạn cần viết bộ dữ liệu các ca kiểm thử cho agent.
- ✓Khi bạn muốn phân tích lý do kết quả đánh giá thất bại và so sánh các lần chạy.
Liên kết skill
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-eval/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chạy đánh giá cho agent của tôi bằng một bộ dữ liệu kiểm thử, rồi cho tôi biết vì sao các ca thất bại.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích định dạng bộ dữ liệu, các chỉ số có sẵn và cách AI chấm điểm câu trả lời. Skill giúp agent chạy lệnh đánh giá rồi đọc kết quả để tìm nguyên nhân thường gặp của lỗi.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Agent Evaluation Guide
Requires:
agents-cli(uv tool install google-agents-cli) — install uv first if needed.
Scaffolded project? If you used
/google-agents-cli-scaffold, dataset and a custom metric are already scaffolded intests/eval/(Python projects) oreval/(Go projects). For simplicity, this skill and its references use the Python directory layout; adjust accordingly if you've scaffolded a Go agent. You already haveagents-cli eval run(chainsgenerate+grade),tests/eval/datasets/, andtests/eval/eval_config.yaml. Start with executingeval runand iterate from there.
Reference Files
| File | Contents |
|---|---|
references/dataset_schema.md |
Canonical EvaluationDataset schema — all field types, JSON examples for single-turn / multi-turn / multi-agent, common mistakes |
references/metrics-guide.md |
Complete metrics reference — all built-in metrics, match types, custom metrics, judge model config |
references/user-simulation.md |
Dynamic conversation testing — eval dataset synthesize flags, what scenarios are, compatible metrics |
references/builtin-tools-eval.md |
google_search and model-internal tools — trajectory behavior, metric compatibility |
references/advanced-commands.md |
Opt-in commands: eval analyze, eval optimize, eval submit / eval results |
references/multimodal-eval.md |
Multimodal inputs — eval dataset schema, built-in metric limitations, custom evaluator pattern |
references/live-eval.md |
Live and voice agents — --mode adk_live, what gets graded, user-only turn authoring, the Live-model and region traps |
The Quality Flywheel
Improving agent quality is iterative. The 4 stages below describe the loop. Each stage has a Default path (you, the coding agent, do the work directly) and an Opt-in CLI command that delegates to the Eval Service in Gemini platform for better quality and scale.
1. Prepare Data
Default: Use or edit the scaffolded tests/eval/datasets/basic-dataset.json to define single-turn eval inputs. Start with 1–2 cases.
Opt-in (ADK projects): agents-cli eval dataset synthesize: user-simulate multi-turn datasets when you lack data; its output already includes traces, so Stage 2 collapses to agents-cli eval grade alone. See Eval Commands and references/user-simulation.md.
2. Run the Eval (always run)
Default: agents-cli eval run runs the agent over the dataset and grades the traces, writing results_<ts>.{json,html} to artifacts/grade_results/.
Decoupled form: eval generate then eval grade, for a custom traces location, re-grading without re-running the agent, or traces from synthesize (eval grade alone).
3. Analyze Failures
Default: Open the latest artifacts/grade_results/results_<ts>.html (or .json) and identify failed metrics — see What to fix when scores fail below for the fix table.
Opt-in: agents-cli eval analyze, LLM-based failure clustering; prefer when you have 10+ failing cases and want categorized failure modes. See references/advanced-commands.md.
4. Optimize & Code Fix
Default: Edit the agent — adjust prompts, tool descriptions, instructions, or eval dataset based on the failure analysis. See What to fix when scores fail below for the failure → fix mapping.
Opt-in (ADK projects): agents-cli eval optimize runs ADK GEPA prompt optimization against a target metric (see references/advanced-commands.md). Suitable for prompt-only failures. The optimized prompt appears in the command output; capture it and apply it to the agent. For the full per-iteration trace, set print_detailed_results: true in your optimization config file.
Long-running and expensive. GEPA optimization makes many LLM calls and can take a long time. Do not run it unless the user explicitly asks for prompt optimization. When you do run it, iterate as far as possible with manual fixes first, then run a single final
eval optimize— never loop on this command.
Running the loop
Iterate stages 2 → 3 → 4 → 2 (with synthesize, re-run Stage 1 each pass, then eval grade). After each fix, run agents-cli eval compare <prev_results>.json <new_results>.json to confirm the target metric improved without regressing others. Expect 5–10+ iterations per case before it passes, which is normal. Only after a case passes should you expand
Câu hỏi thường gặp
Bạn có cần cấu trúc dự án đặc biệt không?
Skill dùng cấu trúc Python cho các ví dụ, nên bạn có thể cần điều chỉnh với dự án Go.
Có những chỉ số nào?
Skill có hướng dẫn về các chỉ số có sẵn, kiểu so khớp và chỉ số tùy chỉnh.
Skill có so sánh hai lần chạy không?
Có. Mô tả cho biết skill có thể giúp so sánh kết quả đánh giá.
Chi tiết
Mô tả gốc của tác giả
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding
repo: google/agents-cli
Độ phổ biến
- Sao GitHub
- 6.3k
- Vị trí xếp hạng
- #14370
- Giấy phép
- Apache-2.0
- Cập nhật
- 27/10/2026
Bình luận
- …
Thêm skill từ kho mã này
google-agents-cli-adk-code
6.3kGiúp agent của bạn viết mã cho agent AI bằng Google ADK, gồm công cụ, callback, trạng thái và các mẫu điều phối.
google-agents-cli-deploy
6.3kGiúp agent của bạn triển khai một agent AI lên Google Cloud, gồm Agent Runtime, Cloud Run, GKE, bí mật, CI/CD và xử lý sự cố.
google-agents-cli-observability
6.3kGiúp agent của bạn thiết lập truy vết, ghi nhật ký và giám sát cho một agent AI đã triển khai trên Google Cloud, để bạn thấy nó làm gì.
google-agents-cli-publish
6.3kGiúp agent của bạn đăng ký một agent AI đã triển khai với Gemini, và quản lý các agent cùng máy chủ MCP trong Agent Registry.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.