Skip to main content

Benchmarks

Benchmarks answer one question: did a change make tool discovery and execution quality better, worse, or merely different?

Use deterministic suites for daily development and reserve long LLM-backed runs for release candidates or public claims.

What To Measure

MetricStageMeaning
hit@kretrievalExpected target appears in the top K candidates
top1retrievalExpected target is ranked first
mrrretrievalMean reciprocal rank of expected target
ndcgretrievalRank quality when multiple targets are relevant
candidate_countretrievalNumber of tools passed downstream
context_reductionretrievalSchema/context bytes removed before the LLM
selector_accuracytarget selectionFinal selected target matches expectation
plan_hit_rateplanSynthesized plan matches expected target/path
execute_success_rateexecuteSafe execution cases reach expected result
failure_reason_coverageexecuteFailures are classified with stable reason codes
latency_msallTime by stage

Development Loop

Run small suites while editing retrieval, graphify, plan, or learning code:

make quick

When the change only affects documentation or website code, use the website build instead:

cd website
npm run typecheck
npm run build

Deterministic Benchmark

The repository includes benchmark utilities under benchmarks/.

python -m benchmarks.run_benchmark

Store result JSON when the numbers will be referenced in a PR, README, or docs page.

python -m benchmarks.run_benchmark \
--output benchmarks/results/my_run.json

XGEN-Scale Snapshot

Use snapshot replay for large OpenAPI catalog regressions without paying the cost of a live API or full LLM run.

make xgen-scale-snapshot

Track these gates for large enterprise API catalogs:

  • semantic action/resource/module coverage
  • search hit@8 and Top-1
  • target selector accuracy
  • average and max candidate count
  • schema context reduction
  • uncaught error count

LLM-Backed Evaluation

LLM-backed runs should record:

FieldWhy It Matters
model/providerResults are model-dependent
prompt/template versionTarget selection can change with prompt shape
dataset versionPrevents comparing different test sets
graph-tool-call versionTies result to library behavior
seed/configHelps rerun the same scenario
raw result artifactAllows later inspection

Do not update public quality claims from a private, one-off, uncommitted run.

Interpreting Results

SymptomLikely CauseNext Check
Hit@8 improves but Top-1 dropsRecall widened but ranking got noisierscore breakdown and selector signals
Search passes but plan failsContract fields or user slots are weakapi_contract, user_input_slots
Plan passes but execute failsAdapter/auth/runtime issueauth_readiness, runner events
Candidate count growsGraph expansion is too broadproducer expansion and edge evidence
Context reduction dropsToo many raw schema leaves are includedartifact text rendering policy