LLM-as-a-judge evaluation can make AI output scoring faster, but an automated score is only useful when the judge is calibrated against clear criteria and human review. This guide provides a reusable workflow for designing a judge prompt, checking reliability, detecting bias, and deciding when human reviewers must remain involved.
Overview
An LLM-as-a-judge system uses one language model to assess the output of another model against a defined rubric. It can assign a score, select between two responses, classify an outcome, or explain why an answer passed or failed. Teams commonly use this approach for regression testing, prompt optimization, model comparison, and production quality monitoring.
The important distinction is between automated grading and automated truth. A judge model may be consistent while still applying the wrong standard. It may also prefer a particular writing style, reward longer answers, overlook subtle factual errors, or be influenced by the order in which responses are shown. Calibration therefore comes before scale.
A reliable LLM evaluation workflow normally contains five parts:
- A representative evaluation set containing realistic inputs and expected quality characteristics.
- A narrow, observable rubric with defined scoring rules.
- A judge prompt that requires structured, evidence-based decisions.
- A comparison between automated judgments and human judgments.
- Ongoing checks for disagreement, drift, position effects, and changes to the tested workflow.
For the dataset itself, see the guide to designing LLM evaluation test cases that reflect real user requests. The judge should evaluate the output against the task, not against a vague idea of what a good answer looks like.
Checklist by scenario
Scenario 1: Scoring a single response
Use single-response scoring when each output can be assessed independently. This is useful for criteria such as instruction following, completeness, format compliance, or groundedness relative to supplied context.
- State the task and the user’s request without adding information that was unavailable to the responding model.
- List each criterion separately, such as factual support, relevance, safety, tone, or required structure.
- Define what each score means. For example, explain the observable difference between a score of 2 and a score of 3.
- Tell the judge to quote or identify evidence from the response rather than relying on general impressions.
- Require a structured result, such as a JSON object containing scores, reasons, and an overall decision.
- Include an “insufficient information” or “cannot assess” outcome where appropriate.
Scenario 2: Comparing two model outputs
Pairwise comparison can be useful when choosing between prompts, models, or workflow versions. It often reduces the difficulty of defining an absolute score, but it introduces order and presentation risks.
- Show both responses the same user request and supporting context.
- Use neutral labels such as Response A and Response B.
- Ask the judge to evaluate both responses against the rubric before selecting a winner.
- Run the comparison again with the response order reversed.
- Record ties rather than forcing a winner when the difference is immaterial.
- Check whether formatting, length, or confident wording is influencing the result more than task quality.
Scenario 3: Regression testing a prompt or application change
For regression testing, the goal is not to find the most impressive answer. The goal is to identify whether a change caused meaningful improvement, degradation, or a trade-off.
- Freeze a versioned test set before comparing the old and new workflow.
- Use the same judge instructions, criteria, and evaluation settings for both versions where practical.
- Review score distributions, not only the average score.
- Inspect examples with the largest score changes.
- Separate critical failures from minor style differences.
- Link the evaluation to a regression-testing process; the prompt testing frameworks guide provides a complementary workflow.
Scenario 4: Monitoring a production workflow
Production evaluation should sample real or representative interactions while protecting sensitive information and respecting the boundaries of the system being evaluated. A judge can help identify patterns, but it should not be the only control for high-impact decisions.
- Define which outputs require automatic blocking, human review, or no action.
- Track missing context, malformed output, tool errors, and refusals separately from quality scores.
- Sample difficult cases instead of relying only on randomly selected traffic.
- Maintain a small, stable calibration set so score changes can be distinguished from judge changes.
- Review trends in quality, latency, cost, and failure type together.
- Use an observability process that can expose drift and recurring failure patterns; see the LLM observability guide for related checks.
A reusable judge-prompt template
The following template is a starting point, not a substitute for calibration. Adapt the criteria to the task and keep the output schema simple enough to validate programmatically.
You are evaluating an AI response against a defined task.
Task:
{{task}}
Available reference context:
{{context}}
Response to evaluate:
{{response}}
Evaluate these criteria independently:
1. Relevance: Does the response address the user's request?
2. Correctness: Are its claims supported by the task and available context?
3. Completeness: Does it cover the requirements that can reasonably be answered?
4. Format compliance: Does it follow the requested format and constraints?
For each criterion, assign a score from 0 to 3:
0 = fails or is unusable
1 = major problems
2 = mostly acceptable with notable issues
3 = fully meets the criterion
Rules:
- Use only the task and supplied context.
- Do not reward length, confidence, or writing style unless the task requires it.
- Identify concrete evidence for every score below 3.
- If the information is insufficient, say so instead of guessing.
- Return valid JSON only.
Return:
{
"scores": {
"relevance": 0,
"correctness": 0,
"completeness": 0,
"format_compliance": 0
},
"overall_decision": "pass | review | fail",
"evidence": ["..."],
"uncertainties": ["..."]
}
Do not automatically treat the numeric average as the final decision. A response with a serious correctness failure may need review even if its other scores are high. Encode such conditions explicitly in the rubric.
What to double-check
Calibration means testing whether the judge’s decisions agree with a carefully reviewed reference set. Start with examples covering clear passes, clear failures, borderline cases, and known failure modes. Have human reviewers grade the same examples independently, then compare the results with the judge.
| Check | What to look for | Useful response |
|---|---|---|
| Human agreement | Do reviewers interpret the rubric consistently? | Clarify definitions before tuning the judge. |
| Judge-human agreement | Are disagreements concentrated in specific task types? | Inspect examples and revise criteria or prompt instructions. |
| Position effects | Does the winner change when response order changes? | Randomize or reverse order and record instability. |
| Length and style bias | Does the judge reward longer, more polished, or more confident answers? | Tell it to prioritize task-specific evidence. |
| Criterion overlap | Are several criteria measuring the same property? | Merge or distinguish them with observable definitions. |
| Structured output | Are scores parseable and complete? | Validate the schema and route invalid results to review. |
Also test the judge’s behavior when context is missing, the response contains a prompt injection, the answer is empty, or the task has more than one acceptable solution. A judge should not treat fluent unsupported content as correct merely because it sounds plausible.
Common mistakes
- Using vague criteria: “Is this good?” produces an opaque decision. Replace it with observable requirements.
- Letting the judge grade its own preferences: A rubric should reflect the application’s purpose, not a general preference for a particular tone or format.
- Skipping human calibration: Without a reviewed reference set, a score has no demonstrated meaning.
- Reporting only an average: An average can hide critical failures, unstable categories, or a small group of badly affected users.
- Forcing binary decisions: Include a review or indeterminate state when the evidence does not support a confident judgment.
- Changing the judge without versioning: Record the judge model, prompt, rubric, settings, and schema so historical scores remain interpretable.
- Confusing correlation with quality: A judge may rank two systems consistently without measuring the property your users care about.
- Ignoring the evaluation set: A poorly sampled dataset can make a well-designed judge appear reliable while missing important real-world failures.
When classifications are central to the application, supplement judge scores with task-specific measures such as precision, recall, or error analysis. The LLM classification evaluation guide covers those checks.
When to revisit
Revisit the judge whenever the underlying inputs change. That includes a new model, a revised system or prompt, a different retrieval pipeline, a new output format, or a change in the user population. A provider migration should trigger a compatibility and quality review rather than an assumption that scores remain comparable; use the provider migration checklist as a companion.
Review the calibration set before seasonal planning cycles or other scheduled quality reviews. Add examples from newly observed failures, remove duplicates, and confirm that the rubric still reflects current product requirements. If the judge’s disagreement with humans increases, pause automated decisions for the affected category until the cause is understood.
Before acting on a new score, complete this short checklist:
- Confirm that the test set represents the current workflow and important edge cases.
- Version the judge model, prompt, rubric, output schema, and evaluation settings.
- Run clear pass, clear fail, and borderline examples.
- Compare automated results with human judgments.
- Reverse response order for pairwise tests.
- Inspect disagreements and critical failures individually.
- Define which results require human review before deployment or release.
- Record the decision and schedule the next calibration review.
LLM-as-a-judge evaluation is most useful as a repeatable quality signal inside a broader model evaluation program. Treat it as an instrument to calibrate and monitor—not as an authority that removes the need for sound datasets, explicit rubrics, and human judgment.