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
