tool-eval-bench evaluates LLM tool-calling quality against deterministic mock tools. It runs
104 scenarios in total across 16 categories: 69 standard deterministic scenarios in categories A-O
plus 35 Hard Mode scenarios in category P that run on request. Requests target OpenAI-compatible
/v1/chat/completions endpoints or the native Gemini and Anthropic Messages APIs. Every scenario
scores pass, partial, or fail with a full conversation trace, and throughput, long-context
retrieval, toolset-scale, accuracy, and decision-model benchmarks run against the same endpoint.
Each scenario observes one assistant conversation with mock tools; it does not evaluate
independent agents, delegation, or inter-agent handoffs. Base localization coverage is
German-focused, with 4 opt-in locales (de, es, zh, ja) available on 26 language-neutral
scenarios. Difficulty tiers are author estimates rather than calibrated model rankings.
uv tool install git+https://github.com/SeraphimSerapis/tool-eval-bench.git
# Optional extras: perf (llama-benchy), web (Starlette/Uvicorn UI), card (resvg-py PNG export)
uv tool install 'tool-eval-bench[perf,web,card] @ git+https://github.com/SeraphimSerapis/tool-eval-bench.git'Also available via Docker or as a development checkout.
Check the serving stack before blaming the model. probe verifies reachability, and
--check-tools confirms structured tool_calls parsing instead of raw markup in content.
--check-template runs paired replay, multi-turn, and tokenizer special-token leak checks to
catch server Jinja template bugs early.
tool-eval-bench probe --base-url http://localhost:8000
tool-eval-bench probe --check-tools --base-url http://localhost:8000
tool-eval-bench probe --check-template --base-url http://localhost:8000 [--tokenizer MODEL_OR_PATH]
# Smoke test (core 15 scenarios), standard 69, and full 104 with Hard Mode
tool-eval-bench run --short --base-url http://localhost:8000
tool-eval-bench run --seed 42
tool-eval-bench run --seed 42 --hardmode
# Inspect stored runs, compare pairs, browse locally, or render a shareable card
tool-eval-bench history
tool-eval-bench leaderboard
tool-eval-bench compare <run-a> <run-b>
tool-eval-bench serve
tool-eval-bench card --png --hardware "RTX 5090 32GB"Omit --base-url to scan common localhost ports for vLLM, llama.cpp, TensorFold, SGLang,
LiteLLM, Ollama, and TGI.
| Capability | What it tests | Docs |
|---|---|---|
| Tool-call quality | 69 standard deterministic scenarios across categories A-O covering tool selection, parameter precision, multi-step chains, refusal, error recovery, localization, instruction following, safety and prompt injection, 52-tool namespaces, autonomous planning, and structured output | methodology |
| Hard Mode | 35 opt-in adversarial, stateful, and transactional scenarios in category P for high-scoring models, broken down by capability in reports | hard-mode |
| Throughput | llama-bench-style prefill and generation speed with depth and concurrency sweeps; --perf-preset long sweeps depth to 128K |
benchmarks |
| Long-context retrieval | Needle-in-a-haystack across a grid of context lengths and depths, reporting effective context | needle |
| Toolset scale | Tool selection across varying tool count, description similarity, query explicitness, catalog density, and description quality, separating call accuracy from call rate with paired error attribution | toolscale |
| Context pressure | Pre-fill a share of the window or a fixed token count before each scenario to locate where quality drops | context-pressure |
| Speculative decoding | Acceptance rate, effective tokens per second, speedup, and a live monitor | speculative-decoding |
| Accuracy | GSM8K, MMLU, and IFEval through the same adapter | benchmarks |
| Decision models | Single-pass option scoring on llama.cpp /v1/systemone against the Typed Decisions test split (accuracy, KL, Brier, calibration) plus a live canary monitor |
decision-models |
Mock tool responses include realistic payload noise such as extra metadata, timestamps, and nested objects. Models must extract the right fields from API-shaped payloads rather than trimmed fixtures. An asterisk on a prefill rate marks an estimate derived from time to first content token; see the throughput guide.
Scope. This suite measures tool-calling quality: tool choice, parameter accuracy, multi-step chaining, error recovery, and safety boundaries. It is not a full agentic system benchmark. See related work for how it compares with BFCL, PinchBench, and Claw-Eval.
Each scenario scores 2 (pass), 1 (partial), or 0 (fail). The final score is
(points earned / max points) × 100, so every scenario counts equally and larger categories carry
proportionally more weight.
| Score | Rating |
|---|---|
| 90-100 | ★★★★★ Excellent |
| 75-89 | ★★★★ Good |
| 60-74 | ★★★ Adequate |
| 40-59 | ★★ Weak |
| 0-39 | ★ Poor |
None (max_points == 0) |
Withheld (excluded from leaderboard) |
A recorded safety violation combined with a safety-critical group score below 50% caps the rating
at ★★★ Adequate (safety-capped) regardless of composite score. --weight-by-difficulty computes
a secondary score weighted by difficulty tier (1 to 5). Category definitions, difficulty tiers,
and acceptance notes live in docs/methodology.md.
- Completion rate and diagnostics. Timeouts, transport errors, rejected requests, and missing
backend capabilities drop the affected scenario from numerator and denominator instead of
scoring zero, lowering
completion_rate. When zero scenarios are gradable,final_scoreisNoneandratingisWithheld. Unparsed tool-call markup (unparsed_tool_call), repetitive text loops (degenerate_loop), and answers trapped inside reasoning (answer_in_thinking) stay scored at zero points and print server-fix diagnostics. See infrastructure failures and capability diagnostics. - Cohorts,
config_fingerprint, and warnings. Repeat runs of one model collapse into one leaderboard row only whenconfig_fingerprintmatches (config, version, commit, and probed deployment metadata). Cross-model cohorts group runs by evaluation settings plus explicit rubric versions (EVAL_RUBRIC_VERSION,LOCALE_VERSION,NOISE_VERSION) rather than unrelated commits, leaving deployment metadata and operational flags (concurrency,timeout_seconds,alpha) out. Leaderboard andcompareoutput emitcomparability_warningsfor dirty working trees, incomplete runs, unprobed self-hosted engines, subset limits, structured-output fallbacks, withheld scores, or rubric mismatches. See config fingerprint. - Safety gate. Any observed unsafe action or disclosure records a safety warning even outside Category K. Harmless incomplete work does not trigger a warning.
- Artifacts and held-out redaction. Every completed run writes a Markdown report with full
traces to
runs/YYYY/MM/<run_id>.mdand persists queryable records todata/benchmarks.sqlite. Held-out--scenario-packscenarios keep status and points in reports but withhold titles, summaries, and traces while keeping full traces in SQLite.
Supported serving stacks (15 engines):
- Self-hosted OpenAI-compatible (12). vLLM, SGLang, llama.cpp, LiteLLM, Strata, TabbyAPI, NInfer, TensorFold, TandemLLM, Flare (Hyperflare), Splash, and Halogen Flash.
- Hosted and native APIs (3). OpenAI, native Google Gemini API, and native Anthropic Messages API (including Messages API gateways such as OpenCode Zen).
Auto-detection reads declared server identity (owned_by, Server header, /health,
/.well-known/serviceinfo, /props, /metrics) and falls back to unknown rather than guessing
vLLM. --backend pins the reporting label while --format (openai, gemini, anthropic)
selects the wire protocol; see docs/backends.md.
Configure remote servers or multiple A/B endpoints in .env:
TOOL_EVAL_BASE_URL=http://your-server:8080 # or TOOL_EVAL_HOST + TOOL_EVAL_PORT
TOOL_EVAL_MODEL= # optional: auto-detected from /v1/models
TOOL_EVAL_API_KEY= # optional
# Named providers for A/B runs: select with --provider gemini or --provider local
TOOL_EVAL_GEMINI_BASE_URL=https://generativelanguage.googleapis.com
TOOL_EVAL_GEMINI_API_KEY=...
TOOL_EVAL_GEMINI_MODEL=gemini-2.5-pro
TOOL_EVAL_LOCAL_BASE_URL=http://gpu-box:8080Precedence is CLI flags > environment variables > nearest .env > localhost auto-discovery. Only
one .env file loads per invocation, and the gemini, openai, and anthropic provider names
also set the report's backend label. See specifying the server and .env.example.
| Command | Purpose |
|---|---|
run |
Run tool-call scenarios |
probe |
Check reachability, --check-tools structured tool parsing, or --check-template replay and token-leak checks |
bench |
Run throughput, speculative-decoding, or context-pressure benchmarks |
plugin |
Run gsm8k, mmlu, ifeval, needle, toolscale, or decision benchmarks |
spec-live |
Live-monitor speculative-decoding metrics |
decision-live |
Live-monitor a decision model with canary probes |
compare, compare-report |
Compare stored runs (paired 95% CI, sign test, McNemar's test) or Markdown reports |
history, leaderboard, export |
Inspect or export stored results |
card |
Render an SVG or PNG ([card] extra) results card from stored runs |
delete |
Delete stored runs, traces, checkpoints, and Markdown reports |
resume |
Continue an interrupted run from its last completed scenario |
serve |
Launch the authenticated local web UI ([web] extra) on 127.0.0.1 |
Run tool-eval-bench COMMAND --help for flags, or see docs/cli-reference.md for every option,
exit code, and flat invocation (--short, --history). Scenario IDs passed to --scenarios
resolve across all 104 scenarios without requiring --hardmode.
# 1. Smoke test 5 scenarios
tool-eval-bench run --scenarios TC-01 TC-02 TC-03 TC-04 TC-05
# 2. Full 104-scenario suite (standard + Hard Mode)
tool-eval-bench run --seed 42 --hardmode
# 3. Long-context throughput sweep to 128K
tool-eval-bench bench --perf-only --perf-preset long
# 4. Multi-trial Pass@k / Pass^k with throughput
tool-eval-bench bench --seed 42 --trials 3 --perf
# 5. Seeded fixture variants and translated locale run
tool-eval-bench run --hardmode --variant-seed 1 --locale de --seed 42
# 6. Pre-execution turn review with a second model
tool-eval-bench run --base-url http://localhost:8003 --reviewer-base-url http://localhost:8001 --reviewer-scope tools
# 7. Optional decision-model answer audits (deterministic scores stay unchanged)
tool-eval-bench run --hardmode --decision-judge --decision-judge-base-url http://localhost:8084/v1
# 8. Re-test discordant scenarios between two runs (both endpoints or one active server)
tool-eval-bench compare <run-a> <run-b> --retest-diffs --trials 5
tool-eval-bench run --scenarios-from-diff <run-a> <run-b> --trials 5- Fixture variants.
--variant-seedrotates 16 mock environments independently of sampling seed; see controlled fixture variants. - Locale runs.
--locale(de,es,zh,ja) translates prompts and tool descriptions on 26 language-neutral scenarios and tracks language drift; see docs/locales.md. - Reviewer mode.
--reviewer-*lets a second model critique turns before execution, assigns a separate cohort, and counts reviewer tokens in the final summary panel; see docs/reviewer.md. - Answer audits.
--decision-judgeaudits 11 (recommended) or 17 (all) scenarios on/v1/systemonewithout altering official scores or cohorts; see answer audits. - System prompt override.
--system-promptand--system-prompt-filereplace the default assistant prompt while keeping the reference date authoritative and splitting cohorts; see overriding the system prompt. - Local web UI.
tool-eval-bench servebinds to127.0.0.1with a per-launch sign-in token for traces, leaderboards, comparisons, deletion, and live launches; see web UI. - Results cards.
tool-eval-bench cardwrites sanitized SVG and PNG session summaries toruns/cards/; see results card. - Checkpoint and resume. Scenarios checkpoint to SQLite as each completes, so
tool-eval-bench resume RUN_IDpicks up after an interruption; see resuming.
import asyncio
from tool_eval_bench.api import run_benchmark
result = asyncio.run(run_benchmark(
model="Qwen/Qwen3-8B",
base_url="http://localhost:8000",
backend="vllm",
short=True,
persist=False,
))
print(result["final_score"]) # int 0-100, or None when withheld
print(result["rating"]) # e.g. "★★★★ Good" or "Withheld"run_benchmark() returns a versioned envelope containing final_score (int | None), rating,
safety_warnings, deployability, weighted_score, total_scenarios, and full per-scenario
details. For subprocess integration, --json-file writes the JSON result to disk while streaming
JSONL progress events on stderr. Validate external configurations against
tool_eval_bench.schema.get_schema(). See docs/api.md for every parameter and return field.
- Usage. CLI reference, artifacts and fingerprints, troubleshooting
- Benchmarks. methodology, hard mode, locales, toolscale, needle, context pressure, speculative decoding, accuracy and throughput, decision models, reviewer, held-out packs
- Backends and deployment. backends, Docker
- Architecture and API. Python API, architecture, scoring decisions
- Contributing. CONTRIBUTING.md, add a scenario, add a plugin, add a backend adapter, releasing
- Background. related work
Development setup, quality-bar commands, coverage floors, and pull request requirements live in
CONTRIBUTING.md. CHANGELOG.md is generated by towncrier; record user-facing changes as fragments
under changelog.d/.
Scenario methodology adapted from ToolCall-15 by stevibe (MIT License). Licensed under the MIT License.
The decision-model benchmark ships the test split of
Typed Decisions,
published by the LocalLLaMA organization on Hugging Face under the Apache License
2.0, pinned to revision e039ebffcc280174dd354227424fb2b249f191de. The rows are
unmodified apart from format conversion. The dataset's license and a notice
describing the changes sit next to the data in
src/tool_eval_bench/plugins/decision/vendor/typed_decisions/
and ship in every build. This project's MIT license does not cover that data. See
decision models.
