Sub topic 16
When to Use Something Other Than a Judge
This chapter assumes you can read Python, have prompted an LLM, know what an evaluation set is, and understand proportions and averages. It also assumes you have seen the judge biases and the validation steps from earlier chapters.
A judge is one tool among several. Use it when the quality you care about is subjective and cannot be checked by a rule. Otherwise, a cheaper and more reliable method usually exists.
Start with the question you are asking
Ask first whether the property can be checked without a model. If it can, a deterministic check beats a judge on cost, speed, repeatability and trust. It has no position bias, no verbosity bias and no drift.
| Property to check | Better method | Why |
|---|---|---|
| Output is valid JSON or matches a schema | Parser or schema validator | The answer is exactly right or wrong |
| Answer equals a known value | Exact or normalized match | A reference answer exists |
| Code works | Unit tests | Running the code is the ground truth |
| Answer cites a source from the context | String or span check | The citation is literal text |
| Tone, helpfulness, faithfulness to a long context | LLM judge, validated against humans | No simple rule captures it |
| High-stakes or novel failures | Human review | Errors are costly and the judge is unproven |
A deterministic check in practice
This check handles a task where the model must return a JSON object with a bounded integer. No judge is needed.
import json
def check_output(text):
try:
data = json.loads(text)
except json.JSONDecodeError:
return False
qty = data.get("quantity")
return isinstance(qty, int) and not isinstance(qty, bool) and 1 <= qty <= 100
print(check_output('{"quantity": 7}'))
print(check_output('{"quantity": "7"}'))
print(check_output("seven"))It prints True, False, False. It gives the same result on every run and costs nothing per call.
Combine methods
Most real systems layer the methods. Run cheap deterministic checks first and send only the outputs that pass to the judge. Then sample a small share of judged outputs for human review to keep the judge honest.
Signs a judge is the wrong tool
- Low agreement with humans. If chance-corrected agreement stays low after you tighten the rubric, the judge is not measuring what people care about.
- The task has a checkable answer. A judge adds noise where a test or exact match would be exact.
- Stakes are high. For safety, legal or medical decisions, a judge score alone is not enough evidence. Use human review.
- The judge is weaker than the task. A judge often cannot reliably grade work that it could not do itself.
- You are optimizing against it. If the system is tuned directly on the judge's scores, rising scores may stop meaning rising quality. Hold out human-labeled data to check.
- You cannot afford variance. If the decision depends on small score differences and your evaluation set is small, the confidence interval may be too wide to act on.
Exercise
Exercise
You evaluate a model that must extract an invoice total as a number. A teammate proposes an LLM judge to grade each extraction. What would you use instead, and when would you still add a judge?
Show answer
Compare the extracted number to the known correct total with an exact or tolerance-based match, because a reference answer exists and the check is deterministic. Add a judge only for qualities a rule cannot check, such as whether an accompanying explanation is clear, and validate that judge against human labels first.