EvalSuite.
Quick Start
1
Score a trace
Pass a trace dict with tool calls and artifacts, then call
run:2
Add gates
Require specific artifacts and a minimum number of tool calls:
3
Gate on tool-schema parity
4
Aggregate in an EvalSuite
Add the evaluator to an
EvalSuite and export an EvalReport:How It Works
A trace passes through four independent gates; the score is the fraction of gates that pass.
The trace reads tool calls from
tool_calls → tool_trace → tools and artifacts from artifacts → files → outputs, so real harness traces score unmodified. An integer under a tool-calls key means “N calls”; dict-shaped artifacts are unwrapped via path/name/file/filename/artifact.
Configuration Options
Methods
Helper
harness_row_to_eval_case(row) maps a CSV harness row (id/name/scenario, prompt/input, optional fixture, rubric, expected) into an EvalCase with metadata["source"] = "harness".
run() returns a HarnessResult exposing passed, score, tool_call_count, tool_calls_sufficient, schema_hash, schema_consistent, artifacts_complete, missing_artifacts, judge_score, and judge_passed, plus to_dict(), to_json(), and print_summary().
Eval Module Reference
Full Python API for the eval package
Trace shape
Keys are order-insensitive — the first non-empty match wins.Common Patterns
Aggregate CSV harness scenarios into anEvalReport with harness_row_to_eval_case():
Best Practices
A bad judge score fails safely — it never crashes the suite
A bad judge score fails safely — it never crashes the suite
A non-numeric
judge_score fails the judge gate but does not raise, so one broken scenario won’t abort a mixed CI run. A trace with no judge_score treats the judge as “not configured” — the judge gate simply passes and does not count against you.The tool-call fallbacks let you pass real traces unmodified
The tool-call fallbacks let you pass real traces unmodified
Tool calls are read from
tool_calls, then tool_trace, then tools, and artifacts from artifacts, then files, then outputs. Whatever key your harness emits, the evaluator finds it — no reshaping step before scoring.Use min_tool_calls for behaviour, expected_schema_hash for parity
Use min_tool_calls for behaviour, expected_schema_hash for parity
Set
min_tool_calls when a scenario must actually exercise tools (a smoke test that made zero calls is suspect). Set expected_schema_hash when you need the tool surface to stay identical between two runs — for example native vs. plugin-provided tools.Persist results for CI artifacts
Persist results for CI artifacts
Pass
save_results_path to write the result JSON, or call result.to_json() yourself, so failed CI runs keep the per-gate breakdown for debugging.Related
Evaluation Suite
Run all four evaluators as one CI gate
Context Evaluator
Score multi-agent handoff fidelity
Evaluation Loop
Iterative agent → judge → improve loop
Judge
LLM-as-judge for evaluating outputs
Evaluation
Evaluators, suites, and reports
CHL Engineering
The Context / Harness / Loop rubric this evaluator scores against.

