Scorers

August 20, 2026 · View on GitHub

Scorers turn a completed evaluation into numbers. Every scorer produces a score (typically 0–100, though some report raw counts or milliseconds) plus optional textual logs explaining the result.

All scorers are enabled from the scorers: block of your run config. The YAML key selects the scorer; the value is that scorer's configuration. Scorers that need no options take null or {}:

scorers:
  exact_match: null
  trajectory_matcher:
    enforce_order: true
  goal_completion:
    model_config: datasets/model_configs/gemini_2.5_pro_model.yaml

Scorers are additive — enable as many as you need, and each reports as its own row in CSV and BigQuery output.

Contents


SQL scorers

Used for NL2SQL evaluations (DQL, DML, DDL). See the NL2SQL dataset format for how golden queries and eval queries are defined.

Scorer KeyTypeWhat it Measures
exact_matchDeterministicWhether the generated query's execution result exactly matches the golden query's result.
recall_matchDeterministicPrecision and recall between generated and expected results, ignoring None and duplicate values. Defaults to recall-based scoring, order-insensitive.
set_matchDeterministicExecution accuracy comparing golden and generated query results, as defined by the BIRD methodology.
executable_sqlDeterministicWhether the generated query runs at all — 100 if it executes without error, 0 if an error is present. Measures syntactic validity independent of correctness.
returned_sqlDeterministicWhether the generated output contains actual SQL rather than only comments or prose.
regexp_matcherDeterministicWhether the generated query matches supplied regex patterns.
llmraterLLMUses an LLM to compare golden and generated execution results, scoring cases like mismatched column names or extra columns. Requires its own model_config.
analytics_scorerLLMConversational Analytics Data Results Rater. Uses an LLM judge with the full 11-point Conversational Analytics rubric to grade generated data against golden data. Requires model_config.

regexp_matcher options

OptionDefaultDescription
regexp_string_listrequiredList of regex patterns to match against the generated query.
invert_resultsfalseWhen true, non-matching queries score 100 and matching queries score 0.
match_all_patternsfalseWhen true, score 100 only if all patterns match; otherwise one match suffices.
match_whole_queryfalseWhen true, patterns must match the entire query rather than a substring.

llmrater options

OptionDefaultDescription
model_configrequiredPath to the model config for the rating LLM.
hybrid_ground_truthfalseWhen true, if the golden query fails on the target BigQuery engine, fall back to resolving reference rows from the local SQLite database file.

analytics_scorer options

OptionDefaultDescription
model_configrequiredPath to the model config for the rating LLM.
max_rows50Maximum number of unique rows to render before truncation.
query_label"SQL Query"Label used when formatting the query block for evaluation.

Multi-trial consistency scorers

These require num_trials greater than 1 in the run config. They compare trials of the same prompt against each other rather than against a golden answer, and aggregate at the prompt level using a strict all-or-nothing rule — the prompt is consistent only if all trial pairs are consistent.

Scorer KeyTypeWhat it Measures
exact_match_consistencyDeterministicConsistency across trials using exact match on execution results.
llm_consistencyLLMConsistency across trials using an LLM to compare results and errors. Requires model_config.

Agentic scorers

Used for multi-turn agent evaluations. See Agentic evaluations for the execution model and the agentic dataset format for how scenarios declare their expectations.

Deterministic

Scorer KeyScore RangeWhat it Measures
trajectory_matcher0–100Expected vs. actual tool calls. Jaccard similarity by default (order-insensitive); Levenshtein distance with enforce_order: true.
turn_countCountNumber of user↔agent conversation turns. Lower is generally better.
agent_stepsCountTotal tool-call round trips the agent made — the internal effort collapsed inside each reply, as opposed to the conversation rounds turn_count measures.
end_to_end_latencyMillisecondsTotal wall-clock latency: model API latency plus tool execution latency.
tool_call_latencyMillisecondsSum of all tool execution durations across all turns.
token_consumptionCountFresh tokens consumed (input + output) across all turns.
tokens_processedCountEvery token the model evaluated, including fully cached context layers, unweighted. An absolute index of physical compute performed.
effective_billed_tokensWeighted countTokens normalized by price weighting, condensing multi-tier pricing into one index correlated with real spend.

trajectory_matcher options

OptionDefaultDescription
enforce_orderfalseWhen true, use Levenshtein distance for order-sensitive matching instead of Jaccard similarity.
filter_native_toolstrueWhen true, drop native/harness-internal tools (anything not in canonical <server>__<tool> form) from both expected and actual lists before scoring. Set to false to score native tool usage too. See tool name format.

effective_billed_tokens options

Default weights mirror Anthropic Opus price ratios, relative to fresh input at 1.0.

OptionDefaultDescription
input_weight1.0Weight for fresh input tokens.
cached_weight0.1Weight for cache reads — cheap replay of cached context.
cache_write_weight1.25Weight for cache writes — a premium to establish a cache entry.
output_weight5.0Weight for generated output tokens.

LLM-based

All of these require a model_config pointing at the LLM that performs the evaluation.

Scorer KeyScore RangeWhat it Measures
goal_completion0–100Whether the agent accomplished the conversation_plan's intent. Returns 100 for PASS, 0 for FAIL.
behavioral_metrics0–100Hallucination rate and unnecessary-clarification rate in a single pass. Starts at 100 and penalizes 50 per hallucination and 20 per unnecessary clarification.
parameter_analysis100 (qualitative)Qualitative feedback on the arguments passed to each tool. Always scores 100 — the value is in the textual explanation.
binary_rubric_scorer0–100Pass/fail against your own rubric criteria.

goal_completion, behavioral_metrics, and binary_rubric_scorer accept include_tool_calls (default false), which adds the full tool-call record to the LLM's context instead of conversation text alone.

binary_rubric_scorer reads its criteria from the scenario's binary_rubric array and emits one score per criterion, named binary_rubric_scorer_<index>. If a scenario declares no rubric, a single unindexed scorer runs instead.


Skills scorers

For evaluating agent skill packages rather than tool calls.

Scorer KeyTypeWhat it Measures
skills_trajectoryDeterministicExpected vs. actually activated skill names. Jaccard set similarity by default.
skills_best_practicesLLMQuality of each activated skill's SKILL.md — name compliance, description quality, body completeness, absence of TODOs, and progressive-disclosure design. Scores the mean across all evaluated skills.

skills_trajectory options

OptionDefaultDescription
enforce_orderfalseUse strict Levenshtein sequence alignment instead of Jaccard similarity.
allow_extra_skillsfalseFlexible coverage matching — extra activated skills don't reduce the score. Cannot be combined with enforce_order.

skills_best_practices options

OptionDefaultDescription
model_configrequiredPath to the model config for the judging LLM.
skills_dirsandbox pathsDirectory to resolve <skill_name>/SKILL.md from. Falls back to sandbox paths when unset.

Transform tooling scorers

For evaluating generated Dataform and dbt projects. Compile scorers check that the project builds; run scorers execute it.

Scorer KeyWhat it Measures
dataform_compileWhether the generated Dataform project compiles locally.
dataform_runWhether the generated Dataform project executes locally.
dataform_cloud_compileCompilation via the Google Cloud Dataform API. Requires gcp_project_id and gcp_region.
dataform_cloud_runExecution via the Google Cloud Dataform API. Requires gcp_project_id and gcp_region.
dbt_compileWhether the generated dbt project compiles (dbt compile).
dbt_runWhether the generated dbt project executes (dbt run).

Local Dataform and dbt scorers locate the project by searching for workflow_settings.yaml and dbt_project.yml respectively.


MCP readability scorers

These apply only when orchestrator: mcp_readability is set. Rather than scoring an agent run, they evaluate an MCP endpoint's own tool listing for agent-consumability.

Scorer KeyTypeWhat it Measures
mcp_tool_metricsDeterministictotal_tools, estimated_tokens (approximated as JSON length ÷ 4, summed across tools), and token_budget_used_percent against a configured token_budget. Its binary summary metric is "within token budget".
mcp_style_readabilityLLMReviews the tool manifest against a style guide from an LLM-agent-consumption perspective, returning P0/P1/P2 findings and an overall readability score.

Custom scorers

python_scorer

Runs an arbitrary Python script as a scorer, so you can add evaluation logic without forking EvalBench.

OptionDefaultDescription
script_pathrequiredPath to the Python evaluation script.
scorer_namescript basenameName this scorer instance reports under.
scorers:
  python_scorer:
    script_path: "path/to/your_script.py"
    scorer_name: "my_custom_check"

Contract:

  1. EvalBench runs uv run --isolated <script_path> as a subprocess.
  2. The complete evaluation context is passed as a JSON object on stdin.
  3. The script writes a JSON object to stdout containing score (float) and reason (string).

Scripts can declare dependencies with PEP 723 inline metadata — uv run installs them into an isolated environment automatically:

# /// script
# dependencies = ["requests"]
# ///

import sys
import json

def main():
    input_data = json.load(sys.stdin)
    # ... custom logic ...
    print(json.dumps({"score": 100.0, "reason": "PASS"}))

if __name__ == "__main__":
    main()

Included judge — hybrid_xa_judge.py: setting script_path: evalbench/scorers/judges/hybrid_xa_judge.py runs a cross-database Execution Accuracy judge. It compares BigQuery execution results against SQLite references using strict cell normalization: rounding floats to 4 decimal places, sorting rows lexicographically, stripping trailing .0 string suffixes, and ignoring column headers.


Adding a scorer

Scorers implement the Comparator base class in evalbench/scorers/comparator.py and are registered by config key in evalbench/scorers/score.py. Multi-trial comparators register separately in evalbench/scorers/multi_trial_score.py.

If your scorer is specific to your workflow rather than generally useful, prefer python_scorer — it needs no changes to EvalBench itself. See contributing for submitting a scorer upstream.