LLM-as-a-judge
LLM-as-a-judge: automated evaluation of AI outputs
Short answer
LLM-as-a-judge uses a model to grade another model's output against criteria such as groundedness, helpfulness or policy compliance. It makes evaluation cheap enough to run on every response. Keep each criterion a separate yes/no or score question, calibrate the judge against human labels, and use its probabilities to decide what needs human review.
AI features are hard to test because the output is open-ended. Human review doesn't scale, and string-matching tests miss most failures. A judge model fills the gap: it reads the question, the context and the answer, then grades the answer against a rubric.
Judging is a decision, not a writing task. That makes it a good fit for a decision model when you need to judge every production response, not just an offline test set.
Get Early Access to ClassifierHub: 2× credits in your first paid month.
What to judge
- Groundedness: is every claim supported by the retrieved context? The key check for RAG.
- Relevance and helpfulness: does the answer address the question, and how fully?
- Policy: does it give advice you don't allow, promise something you can't do, or leak data?
- Tone and format: does it follow your style guide?
One question per criterion
Ask for separate answers instead of an overall 1-10 grade. A yes/no for groundedness and a 4-level helpfulness score are much easier to calibrate, and they tell you what went wrong.
curl https://classifierhub.com/v1/decide \
-H "Authorization: Bearer $CLASSIFIERHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": {
"input": { "kind": "object" },
"outputs": [
{
"key": "grounded", "type": "boolean",
"instructions": "Is every claim in answer supported by context?",
"criteria": {
"true": "All claims appear in or follow directly from context",
"false": "At least one claim is missing from or contradicts context"
}
},
{
"key": "helpfulness", "type": "score",
"instructions": "How well does answer resolve question?",
"levels": ["Does not address it", "Partially", "Mostly", "Fully and concisely"]
}
]
},
"input": {
"question": "Can I get a refund after 30 days?",
"context": "Refunds are available within 14 days of purchase.",
"answer": "Yes, refunds are available for 60 days."
}
}'The ClassifierHub API opens to Early Access members first.
Offline evals vs. online gates
Offline, a judge grades a fixed test set every time you change a prompt or model, so regressions show up before release. Online, a fast judge can gate responses in production: block ungrounded answers, add a disclaimer, or fall back to "let me connect you with a person". Online judging needs low latency and low cost, which is where a decision model beats a large LLM judge.
Calibrating the judge
A judge is only useful if it agrees with your people. Label a sample of outputs by hand, compare with the judge, and adjust criteria descriptions where they disagree. Watch for known biases of LLM judges, such as preferring longer answers, and write criteria that counter them explicitly.
Frequently asked questions
Related guides
Last updated . ClassifierHub is an independent product built on top of the Jev decision model, accessed through OpenRouter. It is not affiliated with or endorsed by TypeSafe or OpenRouter.