liveBook · Manning

LLM-as-a-judge

As explained in Build an AI Agent (From Scratch)

LLM-as-a-judge is an evaluation method in which a language model scores or classifies another system's outputs according to an evaluation rubric.

LLM-as-a-judge uses a language model to score or classify another system’s outputs against a rubric. It scales evaluation across changing agent prompts, models, and data, while complementing code-based checks and human judgment. section 10.3

Two common judging formats are:

  • Single-output grading scores one response against a rubric. A reference answer can be included to improve consistency, at the cost of preparing references. section 10.3.1
  • Pairwise evaluation compares two responses to the same input. The judge selects A, B, or Tie; aggregated choices can produce win rates. section 10.3.1

Prompt patterns

For a research-paper summary, a judge can return PASS or FAIL and briefly explain whether the answer is accurate and concise. For renewable-energy answers, it can choose A, B, or Tie based on which better meets the request. section 10.3.1

How Build an AI Agent (From Scratch) covers it

How deep it goes
Distinguishes single-output grading from pairwise comparison and gives prompt examples, without specifying judge-model implementation.
Examples
Uses a research-summary PASS/FAIL prompt and a renewable-energy A/B/Tie comparison.
What it assumes
Prepare agent responses and an evaluation rubric; optionally provide reference answers to improve scoring consistency.
What you can do after
Evaluate agent responses with rubric-based scores or pairwise choices, then aggregate comparisons into win rates.
How it connects
Compares with code-based evaluators, human evaluators, and end-user feedback, and uses rubrics and reference answers.

Also explained in

Compare how 9 books explain LLM-as-a-judge →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build an AI Agent (From Scratch). The section links point to the parts of the book it draws on.