ScoreMatch values from niceeval/expect. They do not read a context or register an Assertion. Register a Judge Match against explicit input and output with check; the measurement is a finite number in [0, 1].
Three Judge factories
For one Turn, pass its frozen input and assistant output to
turn.check:
t.check when material comes from files, several turns, or another custom source:
{ input, output } material through check, and model selection comes from the resolved Eval configuration.
Declare capability and configure it
Only an Eval that declaresjudge can register Judge Matches:
judge: truedeclares the capability and inherits fields from the Experiment and project configuration.judge: { ... }both declares the capability and overrides fields from the Experiment and project configuration.- Creating a Judge Assertion without a
judgedeclaration immediately reports an authoring error.
baseUrl is the OpenAI-compatible endpoint, apiKeyEnv is OPENAI_API_KEY, and timeoutMs is 180000 milliseconds. The Runner freezes the resolved configuration once and uses the same configuration for fingerprinting, preflight, and the actual evaluator.
Thresholds and scores
Pass-style Evals call.atLeast(n) on the Judge ScoreMatch before registration. This forms the thresholded local condition. The returned Assertion handle’s parameterless .gate() includes that condition in the Verdict.
.orStop() is an async barrier on the same handle. If the value is below the threshold, it stops the current continuation. The Attempt still receives a failed Verdict after a normal stop.
Score-style Evals call .score(n) on the registered handle. A measurement m contributes m * n. If control flow also needs a threshold, form it on the Match before registration.
.score() saves only the evaluation by default.
Configuration, preflight, and failures
When no model or key is available, NiceEval does not make a network preflight request. The Judge Assertion isunavailable and retains the reason judge-model-unresolved or judge-key-unresolved. If an Assertion configured with a score or .orStop() is unavailable, score grading cannot rank it; a pass-style Attempt is errored.
When both a model and key exist, the Runner checks the endpoint before dispatch. A real preflight failure is a setup error and does not fabricate an AssertionResult. A transport failure after the model request starts is an ordinary unavailable. An invalid response, a non-finite score, or a score outside the range is errored; NiceEval does not clamp it to a usable score.
The Judge’s reason goes in the general explanation. evidence stores only trimmed and redacted evaluation material.
Reading results
niceeval view, fixed query operations, and failure feedback create summaries from the same sealed Assertion results. Failed and unavailable entries appear first. Configured measurements display their actual value and required threshold. Judge has no special Assertion-result or display branch.
Related reading
- Assertions and Matches — Registration at call time and the two Eval types.
- Pass-style and score-style Evals — Choosing a threshold, gate, or score contribution.
- Drive — Turns, sessions, and material across turns.