Expand description
LLM judges written as ordinary graphrt workflows.
{type: judge, workflow: judges/faithfulness.yaml} runs the judge workflow
on what the test produced and reads a verdict from its outputs. A judge is
versioned by its workflow fingerprint (recorded with every result), runs on
any provider (including replay cassettes), and is calibrated like any
other workflow: an eval whose target is the judge and whose expected
values are human labels (see calibration in the eval file).
Inputs. The judge’s start node receives, by name (only the variables it declares):
| Input | Value |
|---|---|
output | The value under test (the run output, or the transform path). |
vars | The test’s vars (an object). |
expected | The test’s expected value (absent when there is none). |
contexts | The text of every chunk the run’s knowledge-retrieval nodes returned, in rank order. |
trajectory | The run’s agent tool calls: [{node_id, name, provider?, tool?, arguments, is_error?}]. |
anything in inputs | Extra inputs from the assertion, e.g. inputs: { question: "{{question}}" }. |
Text inputs (paragraph, text-input, string…) get text: strings as
is, a list of strings joined by blank lines, anything else as JSON. json,
object and array inputs get the value itself.
Outputs. The judge’s outputs (or its single object output, e.g. an
llm node’s structured_output) carry verdict: pass | fail | unknown
and/or a numeric score in 0..=1, plus an optional reasoning. A verdict
decides; a score alone passes at threshold (default 0.5). unknown
fails the assertion unless unknown: exclude, which reports it without
scoring or gating it.
Structs§
- Judge
Record - What a judge decided, recorded with the assertion result.
- Judgement
- A verdict and/or score read from a judge’s outputs.
Enums§
- Unknown
Policy - What to do with a judge’s
unknownverdict. - Verdict
- A judge’s binary verdict, with an explicit way out.
Traits§
- Judge
Loader - Compiles judge workflows for
judgeassertions. Called once per distinct workflow file; the result is shared by every test.
Functions§
- register
- Register the
judgeassertion type. Judgeworkflowpaths are resolved againstbase(the eval file’s directory); each judge is compiled once byloaderand reused by every test.