DevTools Logo

LLM Eval Rubric Builder

LLM Eval Rubric Builder

Design anchored 1–5 criteria, weights and pass/fail gates, then export a judge prompt and schema.

Runs in your browser
Try an example

Composite & exports

3 criteria · score 3.83 · PASS

Weighted score: 3.833 · verdict: PASS · active weight: 6

You are an impartial evaluator. Score the response against this rubric: RAG answer quality.
For each criterion, assign an integer score from 1 to 5 using the anchors below.

groundedness — Groundedness (weight 3) [PASS/FAIL GATE]
Claims are supported by retrieved context.
  1 = Unsupported
  2 = Mostly unsupported
  3 = Mixed
  4 = Mostly supported
  5 = Fully supported

relevance — Relevance (weight 2)
Answers the user's question directly.
  1 = Off topic
  2 = Tangential
  3 = Partly relevant
  4 = Relevant
  5 = Direct

clarity — Clarity (weight 1)
Response is clear and well structured.
  1 = Unreadable
  2 = Confusing
  3 = Mixed
  4 = Clear
  5 = Exemplary

Return only JSON: {"scores": {"groundedness": 1, "relevance": 1, "clarity": 1}, "gates": {"groundedness": true}, "rationale": "..."}
A response passes when the weighted score is at least 3.5 and every gate passes.

Details

The LLM Eval Rubric Builder turns evaluation criteria into machine-usable artifacts. Each criterion has a name, description, weight from 0 to 10, five written anchors describing what a 1 through 5 looks like, and an optional pass/fail gate. A live calculator shows the weighted composite (Σ weight×score / Σ weight) as you enter sample judge scores; any failed gate overrides the score with FAIL. Exports include canonical JSON with rubric_version 1, stable-order YAML, a ready-to-paste judge prompt with a marked insertion point for the response and reference answer, and an OpenAI json_schema response_format whose properties are all required, additionalProperties is false and scores are enums 1–5. Criterion ids are sanitized to strict-mode-safe property names, and a pre-flight lint warns about duplicate ids, missing anchors, undefined gates and concentrated weights. Three starter rubrics — RAG answer quality, code review and support tone — get you started, and URL sharing fits rubrics up to 8 KB. Everything runs locally; the curl snippet contains only a $OPENAI_API_KEY placeholder, never a real key.

More examples

Standardize a judge prompt across models

Load the RAG answer quality template, tune the weights and anchors, then export the judge prompt and structured schema together.

Add a hard safety gate

Add a pass/fail criterion for never revealing the system prompt, describe what a pass looks like, and watch the composite show FAIL when the gate is unchecked.

Check the math before running evals

Enter sample scores per criterion and confirm the weighted composite and pass threshold behave as expected before wiring the schema into your harness.

Examples

Groundedness gate

Input
Weighted score 4.8 but the groundedness gate fails
Output
Verdict FAIL with the failed gate named

Gates encode hard requirements that a high average cannot compensate for.

Zero-weight reference

Input
Criterion with weight 0 and score 2
Output
Excluded from the composite denominator

The tool warns that reference-only criteria do not affect the verdict.

Strict judge schema

Input
three criteria, one gate
Output
response_format with required scores, gates and rationale fields

Strict mode rejects missing or extra fields, making judge outputs parseable.

About this tool

LLM Eval Rubric Builder structures the criteria, anchors, weights and gates that an LLM judge needs to grade outputs consistently. Three starter rubrics — RAG answer quality, code review and support tone — get you started.

Every criterion carries five anchored descriptions for scores 1 through 5. Sample scores feed a live composite calculation: Σ(weight × score)/Σ(weight), clamped to active criteria, with any failed pass/fail gate overriding the verdict.

Exports include a versioned JSON rubric, stable YAML, a judge system prompt with explicit output instructions, and a strict JSON-schema request snippet whose score fields are required integer enums. Editing and export happen locally; nothing is uploaded.

What this tool does not do

  • The composite is a simple weighted mean; no Bayesian or calibrated scoring is performed.
  • Judge prompts are templates, not validated model instructions for every provider.
  • Share-state URLs are omitted in this implementation; export a JSON file instead.
  • No score-distribution chart is rendered; the numeric composite is shown.
  • URL state longer than practical link lengths is not supported.

How to use this tool

  1. Pick a starter

    Load a template or start from a single blank criterion.

  2. Write anchored criteria

    Name each criterion, describe what it measures, set a 0–10 weight and write what 1 through 5 mean.

  3. Set gates and sample scores

    Mark must-pass criteria, enter sample scores and check the live composite verdict against the threshold.

  4. Export your artifacts

    Copy or download the judge prompt, JSON/YAML rubric or strict response-format schema.

Use cases

LLM-as-judge evaluation

Turn subjective quality judgments into a repeatable, auditable scoring contract.

RAG QA

Separate groundedness, relevance and clarity so regressions are attributable.

Prompt comparison

Apply the same rubric to outputs from two prompt versions and compare composites.

Scoring rules

ElementBehavior
AnchorsFive concrete descriptions per criterion; blank anchors produce a warning.
Weight0–10; zero-weight criteria are excluded from the denominator.
CompositeWeighted mean of scored criteria, reported on the 1–5 scale.
GateAny failed gate forces FAIL regardless of the weighted score.
ThresholdPass when the composite is at least this value and no gate fails.
Schemastrict: true, all fields required, additionalProperties false, score enum 1–5.

Missing sample scores produce an INCOMPLETE verdict rather than a fabricated number.

Common mistakes

Mistake:Writing vague anchors like 'good' and 'bad'.

Fix:Describe observable behavior for each level; the judge prompt reproduces your anchors verbatim.

Mistake:Giving every criterion the same weight.

Fix:Weight by impact on the task; must-pass requirements should be gates instead.

Mistake:Ignoring the gate failure warning.

Fix:A high weighted average cannot rescue a failed gate by design.

Mistake:Leaving all weights at zero.

Fix:The composite is undefined; the tool shows a warning instead of NaN.

Mistake:Assuming the schema enforces anchor meaning.

Fix:The schema only enforces shape; anchor quality determines judgment quality.

Frequently asked questions

What makes a good anchor description?

An anchor describes observable behavior at that score, not a vague adjective. Instead of 'good', write 'cites the correct section and does not invent facts'. Each of the five levels should be distinguishable from its neighbors, because the judge prompt copies your anchors verbatim and uses them as the decision rule.

How should I weight criteria?

Weight by how much a failure matters for your task. A critical correctness criterion might carry weight 4 while style carries 1. Requirements that must never fail — such as groundedness in RAG — are better modeled as pass/fail gates than as large weights, because a high average cannot override a failed gate.

What is structured output mode and why use it?

The schema export produces an OpenAI-compatible response_format with strict mode: every score and gate field is required, additional properties are rejected, and scores are integer enums from 1 to 5. That makes judge responses deterministic to parse instead of relying on regexes over free-form text. A rationale string keeps the reasoning auditable.

Can the judge be another LLM (which one)?

Yes, any model that follows instructions and supports structured output. The schema snippet uses gpt-4o-mini as a cost-conscious default, but the rubric and judge prompt are model-agnostic text. Keep the judge separate from the model being evaluated when possible to reduce self-preference bias.

How do pass/fail gates interact with scores?

Gates are hard requirements. The composite score is a weighted mean of the entered scores, but if any gated criterion is marked as failed the verdict is FAIL even when the weighted score exceeds the threshold. Missing scores show INCOMPLETE rather than guessing a value; zero-weight criteria are excluded from the denominator.

Is my rubric uploaded anywhere?

No. Editing, validation, composite calculation and all four export formats are generated in your browser tab. Nothing is transmitted, and the rubric is not stored after you leave the page unless you download it yourself.

References & standards