LLM-as-judge
An LLM judge scores another output using a rubric. It can scale review but can exhibit position, verbosity and model-preference biases.
Before you start: Review Evals first. Python-like examples use variables, lists and functions.
Follow the mechanism
Rubric
Define observable scoring criteria.
Start with an everyday explanation
A second student can help mark an essay with a guide. You still compare their marking with a teacher and check whether they reward longer answers unfairly.
See a concrete example
If a judge flags four of six bad answers, recall on those bad cases is 4/6 ≈ 66.7%. You also need false positives on good answers to understand usability.
A claim to question
An always-pass judge can have high agreement on an easy dataset while missing every harmful answer.
Try before revealing the answer
Use the judge calculator to separate precision, recall and agreement. Explain why accuracy can mislead on rare failures.
Show the worked answer
With few bad examples, always saying pass can look accurate. Report missed bad cases and false alarms, calibrate by risk slice and inspect a confusion matrix.
Now explain the idea to someone else using your own example. If you cannot explain a stage, revisit it before moving on.
Engineering details and trade-offs
Calibrate against human-labeled examples and inspect disagreement. Blind candidate identities and swap answer order for pairwise comparisons.
Use deterministic checks for exact requirements and reserve judgment for suitable criteria. Log judge version and rubric; monitor drift and adversarial manipulation.
Reason through the example
If a judge flags four of six bad answers, recall on those bad cases is 4/6 ≈ 66.7%. You also need false positives on good answers to understand usability.
Implement and test
Use the judge calculator to separate precision, recall and agreement. Explain why accuracy can mislead on rare failures.
Inspect the reasoning and expected result
With few bad examples, always saying pass can look accurate. Report missed bad cases and false alarms, calibrate by risk slice and inspect a confusion matrix.
What to measure
State the expected result before changing a control. Record your inputs, compare the observed result and explain one limit of this model. In a real implementation, test the failure case as well as the normal path.
Answer before reading the reference
How reliable is LLM-as-judge?
A defensible answer
Reliability is task- and rubric-dependent. Validate against humans, test position and verbosity bias, use blind paired comparisons and deterministic checks, and report disagreement rather than assuming a model score is ground truth.
Prepare the follow-up
How would you prevent evaluated text from injecting instructions into the judge?
Show follow-up reasoning
Treat candidate text as untrusted data, keep the rubric outside it and do not let evaluated answers request tools or change scoring instructions. Add adversarial evaluation text, compare with human labels and use exact checks for hard requirements. A judge prompt alone is not a complete defense.
Use the engineering explanation and worked task above to support your response. Identify which assumptions you would need to verify in production.
Choose a practice depth
- New to GenAI
- Define llm-as-judge with the everyday example and name its key limitation.
- Applied experience
- Explain the example, implementation choice and a measured failure case. Use the exercise as a small design review.
- Senior or systems depth
- Answer the follow-up, compare alternatives and justify an evaluation or rollout plan with operational constraints.
Self-review your answer
0/4 checks selected. This is self-assessment, not an interview score.
Your explanation and revision notes
Loading local notes…