用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/whiskybeer/toolrecall --skill three-arm-benchmark命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | three-arm-benchmark |
| title | Three-Arm A/B Benchmark Runner |
| description | Run the three-arm interleaved benchmark (naive/prefix/toolrecall) with scripted workloads |
Run the controlled three-arm benchmark — naive vs provider prefix vs ToolRecall — with scripted workloads on real DeepSeek API calls.
toolrecall status (check via hermes terminal)/tmp/bench-env/bin/python3 — if missing, recreate:
python3 -m venv /tmp/bench-env && /tmp/bench-env/bin/pip install tiktoken
~/toolrecall/bench/ with run_arm.py, agent.py, workloads.py, interleave.py, turnlog.py, probes.py, analyze.pyturn_log + probe_result tables must exist in ~/.toolrecall/cache.dbOPENROUTER_API_KEY in ~/.hermes/.envcd ~/toolrecall && /tmp/bench-env/bin/python3 bench/interleave.py bugfix --seeds 1 --max-turns 10 --dry-run
cd ~/toolrecall && /tmp/bench-env/bin/python3 bench/interleave.py bugfix --seeds 7 --max-turns 400
cd ~/toolrecall && /tmp/bench-env/bin/python3 bench/interleave.py bugfix --seeds 3 --max-turns 200 --model "anthropic/claude-sonnet-4-20250514"
cd ~/toolrecall && /tmp/bench-env/bin/python3 bench/interleave.py bugfix --seeds 3 --max-turns 200 --provider anthropic --model claude-sonnet-4-20250514
This runs 7 seeds × 3 arms = 21 runs interleaved (naive → prefix → toolrecall → naive → ...). Expect ~30-60 minutes depending on LLM latency.
| Name | Turns | Type |
|---|---|---|
bugfix | 450 | Read files → find bug → write fix. High write invalidation rate. |
feature | 450 | Read docs → add feature → write tests. Medium write rate. |
analysis | 400 | Read files → compare/extract statistics. Low write rate. |
cd ~/toolrecall && /tmp/bench-env/bin/python3 bench/analyze.py --provider openrouter --model "deepseek/deepseek-v4-flash"
Adjust --provider and --model to match how the benchmark was run.
Generates:
fig1_context_growth.png — request_tokens vs turn for all 3 armsfig2_ratio.png — prefix/TR ratio with bootstrap CIfig3_warmup.png — tool cache hit rate over timebenchmark_stats.txt — Wilcoxon, log-rank, per-arm summarysqlite3 ~/.toolrecall/cache.db "
SELECT arm, workload_id, COUNT(*) as turns,
AVG(request_tokens) as avg_req_tok,
MAX(request_tokens) as max_req_tok
FROM turn_log
GROUP BY arm, workload_id
ORDER BY workload_id, arm;
"
sqlite3 ~/.toolrecall/cache.db "
SELECT arm, lag, AVG(passed) as recall_rate, COUNT(*) as n
FROM probe_result
GROUP BY arm, lag
ORDER BY arm, lag;
"
toolrecall status before starting.--dry-run mode uses a dummy agent that skips the LLM entirely. request_tokens is still counted (via tiktoken), but prompt_tokens will be 100 (stub). The toolrecall arm's context dropping is not exercised because dummy responses contain no file content to strip.--provider anthropic), set ANTHROPIC_API_KEY in the environment or ~/.hermes/.env.--model "anthropic/claude-..." without --provider anthropic), the existing OPENROUTER_API_KEY is used. OpenRouter returns usage in OpenAI-compatible format.