liveBook · Manning

Judge prompt

As explained in AI Model Evaluation

A judge prompt is an instruction given to an evaluating language model that defines how it should assess another model's output.

A judge prompt instructs an evaluating language model how to assess another model’s output. It defines what good means for a particular task and decision, rather than leaving the judge to infer criteria from its own preferences. A structured response alone cannot rescue a vague judging task. section 9.5.1

Define the evaluation contract before writing the prompt:

  • Identify the object being judged, such as an answer, recommendation list, agent action, or pair of outputs. section 9.5.1
  • Specify the criteria and scoring rules, such as factual accuracy, relevance, safety, or policy compliance. section 9.5.1 section 9.5.2
  • Supply the context needed to judge, such as the user query, source document, retrieved evidence, or policy text. section 9.5.1
  • Set the evaluator’s role and the required output format, such as a score, winner, justification, or structured JSON. section 9.5.2

Evaluate a supported answer

Instead of asking “Judge this answer,” ask the judge to evaluate whether the answer is factually supported by the provided source text, complete enough to answer the user’s question, and free of unsupported claims. Supply the question, answer, and source text so the judge has the evidence needed to apply those criteria. section 9.5.1

Score distinct dimensions before making an overall decision. For example, a support chatbot judge can assess correctness, completeness, tone, and policy compliance separately before returning pass or fail. Use a machine-readable schema when results need to be parsed and aggregated at scale. section 9.5.2

Treat evaluated content as untrusted: separate it from instructions and criteria, and tell the judge to ignore instructions embedded in it. Higher-risk settings may also need sanitization or additional injection checks. section 9.7.5

Start with a baseline prompt, test it on examples with known judgments, inspect disagreements, and change one part at a time. Version and document changes. If scores unexpectedly shift, check the data, judge model and canary baseline, prompt and rubric edits, and instability from repeated sampling or swapped order before concluding that the evaluated model regressed. Keep the prompt explicit enough to reduce ambiguity but concise enough for cost and latency. section 9.5.2 section 10.6.2 section 9.5.1

How AI Model Evaluation covers it

How deep it goes
Explains prompt components, iterative testing, injection safeguards, and production triage, including checks for judge instability.
Examples
Uses source-supported answer evaluation and separate correctness, completeness, tone, and policy-compliance scores for a support chatbot.
What you can do after
Apply a judge prompt to specify criteria and output fields, test known cases, and investigate unexpected score changes.
How it connects
Connects LLM-as-a-judge to scoring rubrics, structured output, prompt injection, and regression testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Model Evaluation. The section links point to the parts of the book it draws on.