temperwork Blog Documentation
Guides

Judges

A judge grades every file of a dataset and changes nothing. It has steps, like a pipeline: a model scoring against a prompt, a program you supply, a comparison with a reference, or a model eval's answer and check. Run a judge on the outputs of your pipelines to see which version does best, and grade the judge yourself to know how far to trust it.

What a judge is

A judge judges one kind of data (Datasets it judges: images, video, text or audio) and runs only on datasets of that kind. Its steps each judge one part of every file, with their own name, kind and Pass at, the score a file needs to pass. Judges are versioned like steps: an edit saves a new version.

Kinds of step

  • llm: a model scores each file from 1 to 10 against the step's prompt, seeing the file and, as set, the file it was made from and its reference. Pass at is 7 unless set. Models lists the models a judge can use and what each reads.

  • automation: a Docker image you name runs once over the files, with no network, and writes a score from 0 to 1, and optionally pass or fail and a reason, for each file. temperwork's own images run on its judge workers without Docker: judge-faces checks people in images (as many faces as the source; the face is the reference's person; the scene, pose and expression kept). Any other image needs a judge worker of yours with Docker.

  • score: each image against the image of the same name in a reference dataset (Pass at 0.85 unless set).

  • answer and check: a model eval. An answer step has the model under test answer each file (a question), and the check step after it compares each answer with the answer key, the reference file of the same name: as a choice, a number, a set of letters, exact text, or tool calls. A model eval's run picks the model to test, and each model's results are kept apart, so you can compare models on the same questions.

Order, branches and verdicts

Steps run in order, and each judges only the files no step before it failed, so a quick step first spares the slower ones. Parallel steps judge the same files at the same time, and their join decides: all (every branch passes), majority, any, or mean (the branches' mean score reaches the block's Pass at).

A judge's steps: an automation step, then a score and an llm step in parallel joined by all, then another llm step
A judge's steps: an automation step, then a score and an llm step in parallel joined by all, then another llm step

A file passes when every block passes it and fails when one fails it; it is not judged when a step couldn't judge it (no reference file, or the model declined), and then counts for nothing. Its score is the mean of its steps' scores, on 0 to 1.

Make and run a judge

New judge on the Judges page asks for a name, the kind of data and the steps, edited in the same diagram as a pipeline's. Templates (judge templates) are judges to start from: Person swap (LoRA) checks images where a person was replaced by a LoRA's (the faces, the identity, the scene, pose and expression kept, then whether it looks real); Model eval (answers) tests a model on a question set.

Run on a judge's page runs it on a dataset of its kind, with a reference and source dataset if its steps use them. Its page shows each file's score and verdict, and why a step failed it.

A judge run's page: each file beside its source and reference, with its score; 08-moon.png failed, and says why
A judge run's page: each file beside its source and reference, with its score; 08-moon.png failed, and says why

Run statuses

StatusWhat it means
queuedRecorded and waiting for a judge worker. Cancel takes it off the queue, and it becomes stopped.
runningA judge worker is judging its files. Cancel stops it at the next file.
succeededEvery step judged what it could.
failedIt judged nothing, or something went wrong; its page says why (no Docker for an automation step, no access to the model). A run still queued a day after it started fails too.
stoppedSomeone cancelled it. Files judged before keep their verdicts.
interruptedThe judge worker went away: it stopped checking in for 5 minutes, or it restarted. Run it again.

Succeeded, failed, stopped and interrupted are final.

Scores

A judge's Scores tab shows its recent runs, each with its score, the dataset and the pipeline version that made it; then its top datasets, and its top pipelines, each pipeline version by the mean score of the datasets it made. Tie marks a score the data can't tell apart from the row below: judge more files to rank them (hover a score for its range). A run's page shows the judges' latest scores of its output, too. Judging a dataset again adds a judgement; the pages show each judge's latest.

Grade the judge

Review is where you check the judge, a page of 12 files at a time. To review picks them at random from everything the judge judged, so what you check is a fair sample. Look at each, click the ones it got wrong, and save the page: only the files you saw are counted, and the next page comes up. Reviewed and Marked wrong show what you answered; click one to change your answer.

The judge's grade answers whether you can trust it: how many bad files it catches and how many good ones it passes, and a word for it: good (both at 80% or more), lenient (it lets bad files through) or strict (it fails good ones). It waits until you have found five bad files and five good ones; until then the tab says how many more to review. Hover the grade for the counts and their ranges.

To fix a lenient or strict llm step, the Review tab and the judge's card may suggest a pass mark that matches your review better. **Save as v2 with pass at 8** saves a new version with that mark and works out its verdicts from the scores the judge already gave, without judging again, so it costs nothing. Files an earlier step used to fail and now lets through still need a run of the new version. The card then shows, on the same files, how the old version and the new one did. Once five files of each kind are reviewed, it also says what share of what the judge judged is really good, allowing for its mistakes. Your answers are kept apart from its judgements, so a new version is graded against them too.

When a judge has judged two runs on the same input, Compare says per judge whether one is better or the gap could be luck (too few files to tell); hover it for the numbers.

With the API

GET /v1/judges lists judges; make one with POST /v1/pipelines ("kind": "judge") and run it with POST /v1/executions. GET /v1/datasets/<name>/judgements gives a dataset's judgements, GET /v1/judges/<id>/board a judge's scores, and POST /v1/judges/<id>/reviews saves your review. See Use the API and the API reference.

On this page