Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

LLM-as-Judge Rubric Builder

Define your evaluation criteria and a scoring scale, then generate a clean, copy-pasteable LLM-as-judge prompt you can drop into your eval pipeline — with the common pitfalls (position bias, verbosity bias, ties) called out. Turns eval theory into a prompt you can ship.

Mode
Scoring scale
Criteria
Generated judge prompt
You are an impartial evaluator. Your job is to score a response for the following task.

# Task
Answer a user question using only the provided context.

# Evaluation criteria
1. Faithfulness: Every claim is supported by the provided context; no hallucinations.
2. Relevance: The answer directly addresses the user’s question.
3. Completeness: The answer covers the key points the question requires.

# Inputs
<user_input>{{INPUT}}</user_input>
<response>{{RESPONSE}}</response>

# Instructions
- Score the response on each criterion using the scale: 1–5 (Likert).
- Judge on substance, not length or verbosity.
- For each criterion, give a one-line rationale before its score.

# Output (JSON)
{
  "faithfulness": { "rationale": "<one line>", "score": <number> },
  "relevance": { "rationale": "<one line>", "score": <number> },
  "completeness": { "rationale": "<one line>", "score": <number> }
}

Once a system produces open-ended text there is no exact string to test against, so teams grade it with another model and a rubric. This builder writes that judge prompt for you from a task description, a list of criteria, a scale and a mode, and keeps the parts that make judges more reliable: named criteria, a fixed output schema and reasoning before verdicts.

What it computes

There is no arithmetic here; the output is a structured prompt assembled in a fixed order:

  1. A role line: an impartial evaluator who will score one response or compare two.
  2. # Task: your description of what is being evaluated.
  3. # Evaluation criteria: a numbered list of each criterion’s name and description.
  4. # Inputs: placeholders, {{INPUT}} plus {{RESPONSE}}, or {{RESPONSE_A}} and {{RESPONSE_B}} in compare mode, each wrapped in a named tag.
  5. # Instructions: the scale, a rule to judge substance rather than length, a rule that response order must not matter in compare mode, and the rationale rule if enabled.
  6. # Output (JSON): in score mode, one key per criterion, its name lowercased with spaces turned into underscores, each holding a rationale and a score; in compare mode, a rationale and a winner of A, B or tie.

The scale options are Pass/Fail (written as 0 or 1), 1–3, 1–5 (the default, labeled Likert) and 1–10. Your harness replaces the placeholders with real data before each call.

A worked example

The defaults evaluate a grounded question-answering system: the task is “Answer a user question using only the provided context.”, the criteria are Faithfulness, Relevance and Completeness, the mode is Score one, the scale is 1–5 and the rationale is required. The generated prompt ends like this:

# Inputs
<user_input>{{INPUT}}</user_input>
<response>{{RESPONSE}}</response>

# Instructions
- Score the response on each criterion using the scale: 1–5 (Likert).
- Judge on substance, not length or verbosity.
- For each criterion, give a one-line rationale before its score.

# Output (JSON)
{
  "faithfulness": { "rationale": "<one line>", "score": <number> },
  "relevance": { "rationale": "<one line>", "score": <number> },
  "completeness": { "rationale": "<one line>", "score": <number> }
}

Switch to Compare two and the scale disappears. The inputs become a response A and a response B, the instructions add that order is random and must not influence the decision, and the output becomes a single object with a rationale of two or three sentences and a winner.

Assumptions and limits

  • No context slot. The default task mentions provided context, but the inputs hold only the user input and the response. For faithfulness checks, add the retrieved context to {{INPUT}} or extend the prompt with its own tag.
  • Scale points are not defined. The prompt names the range but does not describe what a 3 means. Add one-line anchors per score in the criterion descriptions for steadier grading.
  • Keys come straight from names. Only spaces are replaced, so punctuation survives in JSON keys and two criteria with the same name collide. Use short, unique names.
  • Instructions are not controls. Telling the judge that order is random does not randomize it; your harness must swap positions, ideally judging each pair both ways.
  • Unvalidated by default. The tool cannot tell you whether a judge agrees with humans on your data.

How to use the result

  • Calibrate first. Label 50 to 100 examples by hand, run the judge on them and measure agreement before relying on its scores.
  • Parse strictly. Reject outputs that are not valid JSON or miss a key, and retry, rather than guessing a score.
  • Report per criterion. A single averaged score hides which dimension regressed.
  • Freeze the judge. Pin the model version and prompt, because changing either changes every score you compare against.

When to use it, and when not

Use a judge where the output is open-ended and the volume is too high to read: grading hundreds of answers after a prompt change, comparing two models on the same inputs, or tracking one system week by week. It earns its keep once it has been checked against human labels on your own data.

Do not use one where an exact check exists. Valid JSON, a matching label, a numeric answer or code that passes its tests are cheaper, faster and deterministic to verify in code. Do not let a judge make final calls where a wrong verdict is costly; use it to sort the queue a human then reviews. And where you can, avoid judging a model with itself.

Trade-offs and limits

ChoiceBuysCosts
Score oneAn absolute bar; one call per outputThe judge must calibrate a number, which drifts between runs and judges
Compare twoSteadier relative verdictsCalls grow with pairs: n(n − 1)/2, doubled to judge both orders
Rationale onAuditable, steadier scoresMore output tokens per call, so more cost and latency
All criteria in one promptOne call per outputA strong opinion on one criterion can bleed into the others
One prompt per criterionIndependent scoresAs many calls as criteria

The deeper limit is that a judge measures agreement with its own reading of your rubric. If the rubric misses what users care about, a perfectly consistent judge reports the wrong thing with confidence.

Common mistakes

  • Reporting raw agreement. On a set where humans pass 80% of answers, a judge that passes everything agrees 80% of the time and knows nothing. Report agreement beyond chance, such as Cohen’s kappa.
  • Calibrating on easy cases. A set of clear passes and clear failures flatters any judge. Include the borderline answers where humans themselves hesitate.
  • Dropping failed parses. Outputs that are not valid JSON are often the long or odd responses. Removing them from the denominator quietly raises the pass rate; count them separately.
  • Overlapping criteria. Relevance and Completeness both reward covering the question, so one miss is penalized twice. Each criterion should fail for a reason no other criterion catches.
  • Optimizing against the judge alone. Tune prompts to raise the judge’s score and you will also find its biases, such as a taste for longer answers. Keep a human spot check on every release.

Check yourself

Criteria named “Tone & Style” and “tone & style”: what keys does the tool write?

Both become tone_&_style: names are lowercased and each run of spaces becomes one underscore, while punctuation is kept. The two keys collide, and a standard JSON parser keeps only the last value, so one score silently disappears.

On 100 examples, humans pass 80, the judge passes 80 and they agree on 85. What is Cohen’s kappa?

Chance agreement is 0.8 × 0.8 + 0.2 × 0.2 = 0.68. Kappa is (0.85 − 0.68) / (1 − 0.68) = 0.53: 85% agreement, but only about half of the possible agreement beyond chance.

You compare 5 prompt variants on 200 examples, every pair in both orders. How many judge calls?

5 × 4 / 2 = 10 pairs, times 2 orders, times 200 examples: 4,000 calls. Scoring each variant once is 5 × 200 = 1,000. Pairwise is steadier, but four times the cost here.

Judged both ways, 30 of 200 pairs change winner when the order flips. What does that tell you?

15% of verdicts were decided by position, not content. Run in one order only, those 30 would have counted as real wins. Record them as ties, and if the rate is high, tighten the criteria or change judge before trusting the rest.

Rubrictask+criteriaPrompt{{RESPONSE}}Judgepinned modelJSONreason→scoreParseretry if badCompare mode: judge every pair twiceA first, B secondB first, A secondSame winner?yes: keep itno: tie or flagCalibratevs humanlabels: kappa
The prompt is one stage of a harness. Malformed JSON is retried, not guessed; pairwise verdicts count only when they survive an order swap; and the whole judge is trusted only after it agrees with human labels beyond chance.

How it works

  • Builds the prompt from your task, criteria, scale and mode.
  • Score one response (pass/fail, 1–3, 1–5 or 1–10) or compare two.
  • Rationale-before-score JSON output, one key per criterion.
  • Built-in instructions against length and position bias.

Frequently asked questions

What is LLM-as-a-judge?

LLM-as-a-judge uses a language model to score or compare the outputs of another model against a written rubric, instead of relying only on human reviewers or rigid string matching. It scales evaluation to thousands of examples and handles open-ended answers that have no single correct string. It works when the criteria are specific, the output format is machine-readable and the judge has been checked against human labels, and it fails quietly when any of those is missing.

What makes a good evaluation rubric?

Specific, independent criteria, each judging one thing; a scoring scale whose points are described so they are applied the same way every time; and an instruction to reason before scoring. Vague criteria such as whether the answer is good produce noisy scores, while a criterion such as whether every factual claim is supported by the provided context produces consistent ones. Keep the list short, usually three to five criteria, so each gets real attention.

Should I use a 1–5 scale, 1–10 or pass/fail?

Use the coarsest scale that captures the decision you need. Pass/fail, which this tool writes as 0 or 1, is the most consistent between runs and between judges and is easy to turn into a pass rate. A 1–3 or 1–5 scale adds useful gradation if each point is defined. A 1–10 scale invites false precision: judges rarely use it consistently, and the difference between a 6 and a 7 usually means nothing.

When should I compare two responses instead of scoring one?

Use pairwise comparison when you are choosing between two prompts, models or versions and only need to know which is better. Relative judgments are usually more reliable than absolute scores, because the judge does not have to calibrate a number. Use single scoring when you need an absolute quality bar, such as a release gate or tracking one system over time. In compare mode this tool asks for a winner of A, B or tie.

What biases affect LLM judges?

Common ones are position bias, favoring the first or second option in a comparison; verbosity bias, favoring longer answers; and self-preference, favoring text that resembles the judge model’s own style. The generated prompt tells the judge to ignore length and response order, but instructions alone do not remove bias. Randomize or swap the order of the two responses in your harness, and compare the judge’s verdicts against human labels before trusting it.

Should the judge explain its score?

Yes. Asking the judge for a short rationale before each numeric score tends to improve consistency, because the model commits to its reasons before choosing a number, and it makes results auditable: you can read why an answer was marked down instead of trusting an unexplained digit. The rationale also helps you spot rubric problems, such as a criterion the judge keeps misreading. This tool puts the rationale field before the score in the JSON for that reason.