Skip to main content
Use a Judge for open-ended quality judgments that rules cannot express as an exact match. First use one minimal Eval to confirm that the model, key, and endpoint can score for real, then add the Judge to production tasks.

Configure the model and credential source

niceeval.config.ts
Keep the key only in the process environment:
The configuration file stores the environment-variable name, never the key value. To compare Judge models, override judge.model in different Experiments. Model selection comes from the resolved Eval configuration, not an individual factory call.

Write one minimal real scoring Eval

evals/judge-smoke.eval.ts
judge: true declares that this Eval needs a Judge and inherits its fields from the Experiment and project configuration. .atLeast(0.8) forms the threshold before registration, and parameterless .gate() makes the resulting condition a pass/fail requirement.

Run only this verification Eval

First ensure that an existing Experiment’s evals scope includes judge-smoke, then use the second positional argument to select only that Eval. This example uses the Experiment ID local:
Use pnpm exec niceeval exp list to find the actual Experiment ID. Do not treat an Eval ID as an Experiment ID too. When both the model and key are present, the Runner preflights the Judge endpoint before dispatching. A failed preflight is a setup error and never produces a fabricated Judge score.

Inspect the scoring result

Copy the Run ID from the completion feedback:
The result should contain the Judge measurement, threshold, condition, reason, and trimmed material. Distinguish these three failure types: For production tasks, first calibrate the rubric and threshold with representative results. To compare two Judge models, have two Experiments select the same Evals and use different labels to identify the Judge conditions. See the full matrix pattern in Experiment Matrices.