Skip to main content
Harness Evaluator scores an Interactive Test Harness trace against tool-call, schema-parity, artifact, and judge gates so harness runs plug straight into 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_callstool_tracetools and artifacts from artifactsfilesoutputs, 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 an EvalReport with harness_row_to_eval_case():
Enforce tool-schema parity between a native run and a plugin run:
Gate CI on artifact completeness for a suite of scenarios:

Best Practices

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.
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.
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.
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.

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.