feat: add benchmark_runner skill for capability testing and report generation
This commit is contained in:
parent
d00995504d
commit
89a9534678
|
|
@ -0,0 +1,117 @@
|
|||
name: benchmark_runner
|
||||
agent_type: dynamic_tool_chain
|
||||
version: "1.0.0"
|
||||
description: "能力回测 Agent:运行 AgentKit 各维度能力测试,生成综合评估报告(召回率、过拟合、执行效率、准确度等)"
|
||||
task_mode: llm_generate
|
||||
execution_mode: react
|
||||
max_steps: 10
|
||||
max_concurrency: 1
|
||||
|
||||
intent:
|
||||
keywords:
|
||||
- "benchmark"
|
||||
- "回测"
|
||||
- "能力测试"
|
||||
- "测试报告"
|
||||
- "能力评估"
|
||||
- "召回率"
|
||||
- "过拟合"
|
||||
- "执行效率"
|
||||
description: "运行 AgentKit 能力回测并生成评估报告"
|
||||
examples:
|
||||
- "运行 benchmark 测试"
|
||||
- "回测一下当前能力"
|
||||
- "生成能力测试报告"
|
||||
- "跑一下回测"
|
||||
- "测试各项能力并生成报告"
|
||||
- "benchmark all dimensions"
|
||||
- "测试预处理准确度"
|
||||
|
||||
capabilities:
|
||||
- capability_benchmark
|
||||
- report_generation
|
||||
- multi_dimension_analysis
|
||||
|
||||
prompt:
|
||||
identity: "你是 AgentKit 能力回测助手,负责运行各维度能力测试并生成评估报告。"
|
||||
instructions: |
|
||||
## 职责
|
||||
根据用户需求运行 AgentKit 能力回测,生成综合评估报告。
|
||||
|
||||
## 可用命令
|
||||
|
||||
### 完整回测(推荐)
|
||||
```bash
|
||||
python3 -m agentkit.cli.main benchmark --report --verbose
|
||||
```
|
||||
运行所有 7 个维度共 51 个测试用例,生成 JSON + TXT 报告。
|
||||
|
||||
### 快速回测
|
||||
```bash
|
||||
python3 -m agentkit.cli.main benchmark --fast --report
|
||||
```
|
||||
运行核心用例(约 23 个),适合开发时快速验证。
|
||||
|
||||
### 单维度回测
|
||||
```bash
|
||||
python3 -m agentkit.cli.main benchmark --dimension <dim> --verbose
|
||||
```
|
||||
可选维度:preprocessing, overfitting, efficiency, tool_search, event_model, spec_management, verification
|
||||
|
||||
### HTML 报告
|
||||
```bash
|
||||
python3 -m agentkit.cli.main benchmark --report --format html
|
||||
```
|
||||
|
||||
### pytest 综合回测
|
||||
```bash
|
||||
python3 -m pytest tests/e2e/test_capability_comprehensive.py -v
|
||||
```
|
||||
运行 60 个测试(8 维度),生成 comprehensive_report。
|
||||
|
||||
### 指定输出目录
|
||||
```bash
|
||||
python3 -m agentkit.cli.main benchmark --report -o ./my-results
|
||||
```
|
||||
|
||||
## 测试维度说明
|
||||
1. **preprocessing** — 预处理准确度:greeting→DIRECT_CHAT, tool→REACT, @skill→SKILL_REACT
|
||||
2. **overfitting** — 过拟合检测:同一意图不同表达的一致性
|
||||
3. **efficiency** — 执行效率:预处理延迟 < 50ms, 工具搜索延迟 < 10ms
|
||||
4. **tool_search** — 工具搜索准确度:BM25 相关性排序
|
||||
5. **event_model** — 事件模型完整性:SQ/EQ 双队列生命周期
|
||||
6. **spec_management** — Spec 管理:CRUD 操作
|
||||
7. **verification** — 验证循环:verify/retry 行为
|
||||
|
||||
## 报告位置
|
||||
- CLI 报告:`test-results/benchmark/benchmark_report.{json,txt,html}`
|
||||
- pytest 报告:`test-results/e2e/comprehensive_report.{json,txt}`
|
||||
|
||||
## 输出要求
|
||||
1. 运行测试命令
|
||||
2. 读取生成的报告文件
|
||||
3. 向用户展示结果摘要表格
|
||||
4. 如有失败用例,分析原因并给出改进建议
|
||||
5. 对比历史报告(如存在),展示趋势变化
|
||||
|
||||
llm:
|
||||
model: "default"
|
||||
temperature: 0.0
|
||||
max_tokens: 4096
|
||||
|
||||
tools:
|
||||
- shell
|
||||
- file_read
|
||||
- file_write
|
||||
|
||||
quality_gate:
|
||||
required_fields: ["content"]
|
||||
min_word_count: 50
|
||||
max_retries: 1
|
||||
|
||||
memory:
|
||||
working:
|
||||
enabled: true
|
||||
episodic:
|
||||
enabled: true
|
||||
track_success: true
|
||||
Loading…
Reference in New Issue