What it says

The tutorial walks through building an LLM-as-a-judge that aligns with human labeling, using code-review quality as the running example. The workflow: define the criteria by manually labeling a representative sample (~30-50 examples) as ground truth, write an evaluation prompt, score the judge against human labels with classification metrics, iterate the prompt until the judge aligns, then verify across models and hold-out data, and finally monitor and recalibrate as the product evolves. Its concrete demo went from 67% agreement on a basic prompt to 96% accuracy / 92% recall after refining criteria, and to 98% accuracy with one added instruction to explain reasoning. The closing learnings stress multiple specialized judges, the prompt and model tuned together, consistent repeatable outputs, and continuous monitoring.

Claims drawn from this source

  • An LLM judge should scale human expertise, not replace it. Start by labeling a representative sample yourself; this clarifies what quality means and provides the criteria for the evaluation prompt.
  • Labeling the sample, not the model, is the primary ground-truth work. Start with 30-50 examples, label them as you would judge them, and treat your own labels as the target.
  • Binary or few-class labels work; arbitrary numeric scales do not. Arbitrary numeric scales such as 1-10 rarely work well; binary or a few classes keep judgments consistent and interpretable.
  • Simpler prompts underperform; refined explicit criteria fix the gap. A basic ‘GOOD/BAD’ prompt agreed with experts on only 67% of labels; a more detailed prompt reaching 96% accuracy and 92% recall left only two misclassified reviews.
  • Adding one line to explain reasoning lifts accuracy. Appending ‘Always explain your reasoning’ to the same prompt boosted performance to 98% accuracy with a single error across the dataset.
  • Prompt and model must be tuned together. Re-running the same prompt on a cheaper model (GPT-3.5 Turbo) dropped performance well below GPT-4o mini, showing the gap is not just prompt wording but model plus prompt.
  • Split the criteria into multiple small judges. Instead of one all-encompassing evaluator, use separate judges per behavior, for example one for tone and another for actionability.
  • A judge needs a held-out dataset and continuous recalibration. Reserve a small hold-out dataset for the final evaluation; an LLM judge behaves like a lightweight ML system that benefits from ongoing monitoring and periodic recalibration as the product evolves.