Pointwise (default)

LLM-as-Judge diagramTest set, Support bot, Rubric, Judge, Report, Release gate, Ship. Step captions follow the diagram.Test setSupport botunder testRubric1-5 per criterionJudgeseparate modelReportmean + histogramRelease gatevs 3.5 and last releaseShipLLM-as-Judge diagramTest set, Support bot, Rubric, Judge, Report, Release gate, Ship. Step captions follow the diagram.Test setSupport botunder testRubric1-5 percriterionJudgeseparatemodelReportmean +histogramReleasegatevs 3.5 andlast releaseShip

All steps

Scores clear the bar

Regression caught

Parts of this pattern
Test set Input / output
200 real customer messages kept as a fixed test set, re-run on every prompt or model change.
Support bot Agent
The system being evaluated: the support bot with the candidate prompt change applied.
Rubric Memory
The written scoring guide: helpfulness and policy compliance, each with a definition and an example of every score.
Judge Evaluator
A separate model that reads each message and reply, reasons against the rubric, then gives a score.
Report Aggregator
Collects the scores into a mean, a histogram and the worst cases with the judge's reasons. It ranks candidates even with no gate.
Release gate Router
Compares the report's mean with the 3.5 threshold and with the current release's mean, then lets the change ship or blocks it.
Ship Input / output
The prompt change goes live, with the report attached to the release.
Test set → Support botcases
Each test message is sent to the system under test, exactly as a customer would send it.Case 17: I was charged twice for order A-1093. Can you refund one?
Support bot → Judgereply
Each message and the bot's reply go to the judge as a pair.Reply 17: Sorry about that! I've refunded the duplicate charge of $42.10; it will appear within 5 business days.
Rubric → Judgerubric
The same rubric goes into every judge call, so scores are comparable across cases and runs.Policy: 5 = follows refund policy exactly; 3 = right action, missing a required step; 1 = promises something the policy forbids.
Judge → Reportscore
The judge's reasoning and score for one case are added to the report.{"reasoning": "Refunds without confirming the duplicate in billing, which the policy requires.", "score": 2}
Report → Release gatemean
The report's summary goes to the release gate: the mean, the change from the last release, and the worst cases.Mean 4.0 over 200 cases (current release 3.9). Lowest: case 17 (2), case 88 (2).
Release gate → Shippass
A mean that clears the threshold and does not regress lets the change ship, with the report attached.PASS: mean 4.0 >= 3.5, no regression against 3.9. Lowest: case 17 (2), case 88 (2).
Release gate → Support botblock
A failing mean blocks the candidate prompt from shipping and returns the report to its author.BLOCKED: mean 3.1 < 3.5. Policy scores fell on refund cases 12, 17, 40 and 88.

Pairwise

The judge sees two systems' replies to the same input and picks the better one, asked twice with the order swapped to cancel position bias.

LLM-as-Judge: Pairwise diagramTest set, Prompt v1, Prompt v2, Pairwise judge, Win rate, Winner. Step captions follow the diagram.Test setPrompt v1current releasePrompt v2candidatePairwise judgeasked in both ordersWin rateWinnerLLM-as-Judge: Pairwise diagramTest set, Prompt v1, Prompt v2, Pairwise judge, Win rate, Winner. Step captions follow the diagram.Test setPrompt v1currentreleasePrompt v2candidatePairwisejudgeasked inboth ordersWin rateWinner

All steps

Both orders agree

Position bias caught

Parts of this pattern
Test set Input / output
The same 200 customer messages, sent unchanged to both versions.
Prompt v1 Agent
The support bot as it runs today.
Prompt v2 Agent
The support bot with the proposed prompt change.
Pairwise judge Evaluator
Sees both replies to one message and picks the better, then judges again with the replies swapped.
Win rate Aggregator
Counts a win only when both orders agree; disagreements count as ties.
Winner Input / output
The version that wins more often, with its win rate and the tie rate.
Test set → Prompt v1
Each test message goes to the current version.Case 17: I was charged twice for order A-1093. Can you refund one?
Test set → Prompt v2
The same message goes to the candidate version.Case 17: I was charged twice for order A-1093. Can you refund one?
Prompt v1 → Pairwise judgereply A
The current version's reply, shown to the judge as Reply 1 in one order and Reply 2 in the other.Please contact billing@acme.com about duplicate charges.
Prompt v2 → Pairwise judgereply B
The candidate's reply, shown in the opposite position each time.I've checked billing and confirmed the duplicate. I've refunded $42.10; it will appear within 5 business days.
Pairwise judge → Win rateverdict
The two verdicts for one case are mapped back to A or B and compared before anything is counted.Order A,B: winner 2 (B). Order B,A: winner 1 (B). Both pick B: win for v2.
Win rate → Winner
The final counts and win rate leave as the result of the comparison.v2 wins 112, v1 wins 54, ties 34. v2 win rate 67% excluding ties.

Jury

Several smaller judges from different model families score each output, and their votes are pooled, which cuts cost and any one model's bias.

LLM-as-Judge: Jury diagramTest set, Support bot, Judge 1, Judge 2, Judge 3, Jury vote, Report. Step captions follow the diagram.Test setSupport botunder testJudge 1small, family AJudge 2small, family BJudge 3small, family CJury votemajority or meanReportLLM-as-Judge: Jury diagramTest set, Support bot, Judge 1, Judge 2, Judge 3, Jury vote, Report. Step captions follow the diagram.Test setSupport botunder testJudge 1small,family AJudge 2small,family BJudge 3small,family CJury votemajorityor meanReport

All steps

Two pass, one fails

A biased judge is outvoted

Parts of this pattern
Test set Input / output
The 200 customer messages, run through the system under test.
Support bot Agent
The system being evaluated; each of its replies goes to every judge on the panel.
Judge 1 Evaluator
A small judge model from one family. It scores alone, without seeing the other judges' verdicts.
Judge 2 Evaluator
A small judge from a second family, so it does not share the first judge's habits and blind spots.
Judge 3 Evaluator
A small judge from a third family. Three judges make a majority vote possible with no ties.
Jury vote Aggregator
Pools the three verdicts into one, by majority vote for pass or fail, or by the mean for scores.
Report Input / output
The pooled verdicts for the test set, with each judge's agreement with the panel.
Test set → Support bot
Each test message goes to the system under test.Case 17: I was charged twice for order A-1093. Can you refund one?
Support bot → Judge 1
The message and reply go to the first judge.Reply 17: I've confirmed the duplicate in billing and refunded $42.10.
Support bot → Judge 2
The same pair goes to the second judge, in parallel.Reply 17: I've confirmed the duplicate in billing and refunded $42.10.
Support bot → Judge 3
The same pair goes to the third judge, in parallel.Reply 17: I've confirmed the duplicate in billing and refunded $42.10.
Judge 1 → Jury votevote
The first judge's verdict, with its reasoning.{"reasoning": "Confirms the duplicate before refunding, as the policy requires.", "verdict": "pass"}
Judge 2 → Jury votevote
The second judge's verdict.{"reasoning": "Correct refund, clear timeline.", "verdict": "pass"}
Judge 3 → Jury votevote
The third judge's verdict; here it dissents.{"reasoning": "Does not apologize for the error.", "verdict": "fail"}
Jury vote → Report
The pooled verdict for each case goes into the report, with the dissents.Case 17: pass (2 of 3). Dissent: judge 3. Panel pass rate 91%.

Agent-as-a-Judge

The judge is an agent with tools that inspects the files and the step-by-step trace an agent produced, checking each requirement against evidence.

LLM-as-Judge: Agent-as-a-Judge diagramTask, Coding agent, Workspace, Requirements, Judge agent, Inspect tools, Verdicts. Step captions follow the diagram.TaskCoding agentunder testWorkspacefiles + traceRequirementsJudge agentInspect toolsread, search, runVerdictsLLM-as-Judge: Agent-as-a-Judge diagramTask, Coding agent, Workspace, Requirements, Judge agent, Inspect tools, Verdicts. Step captions follow the diagram.TaskCodingagentunder testWorkspacefiles +traceRequirementsJudge agentInspecttoolsread,search, runVerdicts

All steps
Parts of this pattern
Task Input / output
The development task given to the agent under test, such as 'Train a classifier on this dataset and plot its accuracy'.
Coding agent Agent
The agent being evaluated. It does the task, leaving files and a trace of every step it took.
Workspace Memory
Everything the agent left behind: the files it wrote and the log of its steps and tool calls.
Requirements Memory
The task's checklist, such as 'loads data from data/train.csv' and 'saves the plot to out/accuracy.png'.
Judge agent Agent
An agent with read-only tools. It checks each requirement by gathering evidence before deciding.
Inspect tools Tool
Read-only tools over the workspace: list and read files, search the trace, run a script in a sandbox.
Verdicts Input / output
A met or not-met verdict for each requirement, each with the evidence it rests on.
Task → Coding agent
The task goes to the agent under test.Train a logistic regression on data/train.csv, report test accuracy, and save a plot to out/accuracy.png.
Coding agent → Workspacefiles + steps
The agent's files and its trace of steps are kept for the judge.wrote train.py, out/metrics.json; 23 steps, last: python train.py (exit 0)
Requirements → Judge agentrequirement
The judge takes one requirement at a time from the checklist.R3: saves the accuracy plot to out/accuracy.png.
Judge agent → Inspect toolsinspect
The judge calls a tool to find evidence for the current requirement.list_files('out/'); search_trace('savefig')
Workspace → Inspect tools
The tools read the workspace; they cannot write to it.out/: metrics.json. Trace step 19: plt.savefig('accuracy.png')
Inspect tools → Judge agentevidence
Each tool result returns to the judge, which decides whether it needs more evidence.out/accuracy.png not found. Plot saved to ./accuracy.png at step 19.
Judge agent → Verdictsverdict
When it has enough evidence, the judge records a verdict for the requirement.{"verdict": "not_met", "evidence": "out/ has no accuracy.png; step 19 saved it to ./accuracy.png instead."}

← → neighboursesc atlas

Safety & Oversight

LLM-as-Judge

Also known as Model-graded evaluation · Auto-grader · Rubric judge · Agent-as-a-Judge

A separate judge model scores a system's outputs against a rubric, and the scores gate releases or rank candidates.

Pointwise, Pairwise: Popularized by Zheng et al. (2023) · UC Berkeley, UC San Diego and others

Earlier 2023 work such as G-Eval already used GPT-4 as an evaluator; Zheng et al. named and measured the practice: strong judges agreed with human preferences over 80% of the time, about as often as humans agree with each other, and they catalogued its position, verbosity and self-enhancement biases.

Jury: Introduced by Verga et al. (2024) · Cohere

A Panel of LLM evaluators (PoLL) of smaller models from disjoint families outperformed a single large judge, showed less intra-model bias, and cost over seven times less.

Agent-as-a-Judge: Introduced by Zhuge et al. (2024) · Meta AI & KAUST

Applied to code generation on the DevAI benchmark (55 tasks, 365 requirements), the agent judge did far better than an LLM judge and was about as reliable as the human evaluators.

Measured over one run

Pointwise

Nodes
7. Boxes in the diagram: models, tools, stores, people and plain code.
LLM calls
3. Model invocations in the first scenario: each time a model or agent node starts thinking, plus each branch it decides.
Tool calls
0. Messages sent to a tool node in the first scenario.
Steps
3. Steps in the first scenario, with repeated steps counted every time they run.
Scenarios
2. Distinct example runs you can switch between on the diagram.
Loop
no. Whether the flow cycles back on itself until a condition is met.
Parallel
no. Whether two or more messages are in flight at the same time.
Branch
yes. Whether the flow takes one path out of several, chosen at run time.
Human in the loop
no. Whether a person appears as a node, to approve, correct or answer.
Autonomy
low. How much the model decides the control flow itself, from fixed code paths (low) to open-ended (high).
Cost
medium. Relative token spend per request.
Latency
medium. Relative wall-clock time per request.

Pairwise

Nodes
6. Boxes in the diagram: models, tools, stores, people and plain code.
LLM calls
2. Model invocations in the first scenario: each time a model or agent node starts thinking, plus each branch it decides.
Tool calls
0. Messages sent to a tool node in the first scenario.
Steps
4. Steps in the first scenario, with repeated steps counted every time they run.
Scenarios
2. Distinct example runs you can switch between on the diagram.
Loop
no. Whether the flow cycles back on itself until a condition is met.
Parallel
yes. Whether two or more messages are in flight at the same time.
Branch
no. Whether the flow takes one path out of several, chosen at run time.
Human in the loop
no. Whether a person appears as a node, to approve, correct or answer.
Autonomy
low. How much the model decides the control flow itself, from fixed code paths (low) to open-ended (high).
Cost
medium. Relative token spend per request.
Latency
medium. Relative wall-clock time per request.

Jury

Nodes
7. Boxes in the diagram: models, tools, stores, people and plain code.
LLM calls
3. Model invocations in the first scenario: each time a model or agent node starts thinking, plus each branch it decides.
Tool calls
0. Messages sent to a tool node in the first scenario.
Steps
3. Steps in the first scenario, with repeated steps counted every time they run.
Scenarios
2. Distinct example runs you can switch between on the diagram.
Loop
no. Whether the flow cycles back on itself until a condition is met.
Parallel
yes. Whether two or more messages are in flight at the same time.
Branch
no. Whether the flow takes one path out of several, chosen at run time.
Human in the loop
no. Whether a person appears as a node, to approve, correct or answer.
Autonomy
low. How much the model decides the control flow itself, from fixed code paths (low) to open-ended (high).
Cost
medium. Relative token spend per request.
Latency
medium. Relative wall-clock time per request.

Agent-as-a-Judge

Nodes
7. Boxes in the diagram: models, tools, stores, people and plain code.
LLM calls
1. Model invocations in the first scenario: each time a model or agent node starts thinking, plus each branch it decides.
Tool calls
3. Messages sent to a tool node in the first scenario.
Steps
3. Steps in the first scenario, with repeated steps counted every time they run.
Scenarios
1. Distinct example runs you can switch between on the diagram.
Loop
yes. Whether the flow cycles back on itself until a condition is met.
Parallel
no. Whether two or more messages are in flight at the same time.
Branch
no. Whether the flow takes one path out of several, chosen at run time.
Human in the loop
no. Whether a person appears as a node, to approve, correct or answer.
Autonomy
low. How much the model decides the control flow itself, from fixed code paths (low) to open-ended (high).
Cost
medium. Relative token spend per request.
Latency
medium. Relative wall-clock time per request.

Counted from the first scenario's timeline when the site is built.

Problem

You changed the support bot’s prompt, and you need to know whether it got better or worse before it ships. The replies are open-ended text, so there is no exact answer to compare against, and reading 200 of them by hand on every change does not scale. Without a repeatable score, prompt changes ship on a few spot checks, and regressions show up as customer complaints.

How it works

Use a second model as the grader. A fixed test set of real customer messages goes through the support bot with the change applied. Each message and its reply go to a separate judge model, together with a written rubric that defines each score from 1 to 5 for helpfulness and policy compliance, with an example of each. The judge explains its reasoning first, then gives a score.

The scores go into a report: the mean, the histogram and the lowest-scoring cases with the judge’s reasons. On its own, the report is enough to rank candidate prompts. In the example, scores of 4, 5, 2, 5 and so on average 4.0. The release gate compares that with a 3.5 threshold and with the current release’s 3.9, and lets the change ship. A later change that skips a step in the refund policy averages 3.1, and the gate blocks it, sending the report back with the failing cases.

The judge sits outside the system it grades. It changes nothing about any single reply; it produces a signal you can track across versions. That signal is only as good as the judge’s agreement with people, so a person scores a sample now and then, and the report shows how often the judge agrees.

The tabs show three common changes. Pairwise compares two versions’ replies directly, asking twice with the order swapped, because judges favour whichever reply they see first. Jury replaces one large judge with several small judges from different model families and pools their votes. Agent-as-a-Judge gives the judge tools, so it can inspect the files and trace an agent left behind instead of reading only its final message.

When to use

  • Outputs are open-ended text where exact-match tests do not apply.
  • Human review cannot keep up with how often you change prompts or models.
  • You want a regression signal on every change, or a ranking of several candidates.

When to avoid

  • An exact check exists. If a unit test, a schema or a string match can decide it, use that.
  • The judge is the same model as the system and likely shares its blind spots.
  • The stakes are high and you have no human-scored sample to calibrate the judge against.

Trade-offs

A judge makes evaluation cheap enough to run on every change, but its scores are opinions with known biases. Zheng et al. found strong judges agree with people about as often as people agree with each other, and also found that they favour the first answer shown, longer answers and answers from their own model. A rubric with examples, reasoning before the score, swapped orders and a jury all reduce these. Every case costs a model call, so a 200-case run is 200 calls or more; the latency rarely matters because the judge runs offline.

Failure modes

  • Verbosity bias: longer, more confident replies score higher regardless of quality. Say in the rubric that length is not quality, and check that scores do not simply track length.
  • Self-preference: a judge rates its own model’s style higher. Use a judge from a different family, or a jury.
  • Drifting scale: a change to the judge prompt or model shifts every score, making old and new runs incomparable. Version the judge with the test set and re-score the baseline when it changes.
  • Overfitting the judge: prompts are tuned until the judge is happy, not until users are. Keep a human-scored sample and watch agreement.

Build it with your AI

Pointwise

Paste this into Claude Code, Cursor, ChatGPT or any AI coding assistant.

Implement the LLM-as-Judge pattern in this codebase, using the LLM client and language we already use.

## Goal

Score a system's outputs on a fixed test set with a separate judge model and a written rubric, and block a change from shipping when the aggregate score falls below a threshold.

## How it works

1. Assemble a test set of inputs that represent real traffic, and write a rubric with a 1-5 scale per criterion and an example of each score.
2. Run the system under test on every input and keep each output alongside its input.
3. For each pair, call the judge model with the Pointwise judge prompt, filling in the input, the output and the rubric. Parse its JSON reply into a reasoning string and an integer score.
4. Aggregate the scores into a report: the mean per criterion, the score histogram, and the lowest-scoring cases with the judge's reasons.
5. Compare the mean with the threshold and with the last released version. Pass if it clears both; otherwise block the release and attach the report.
6. Every so often, have a person score a sample of cases, and report how often the judge agrees with them.

## Prompts

### Pointwise judge prompt

```markdown
You are grading one reply from a customer-support assistant. Judge it only
against the rubric. Length and confident tone are not quality.

<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<assistant_reply>{{output}}</assistant_reply>

First explain in two or three sentences how the reply meets or misses each
criterion. Then give one integer score from 1 to 5 as defined in the rubric.
Respond in JSON: {"reasoning": "...", "score": 1-5}
```

## Stop rule

Stop after every case is scored once. If more than 5% of judge replies fail to parse after one retry each, stop and report the run as invalid; an invalid run blocks the release.

## Requirements

- Use a judge from a different model family than the system under test, at temperature 0; if you cannot, say so in the report.
- Make the judge write its reasoning before its score, and validate that the score is an integer on the rubric's scale.
- Keep the test set, rubric and judge prompt under version control, and record their versions in every report.
- Report the judge's agreement with the latest human-scored sample; if agreement drops below a set level, block releases until the judge is recalibrated.
- Add a test with a stub judge that returns scores 4, 5, 2 and 5 for four cases, a threshold of 3.5 and a previous release mean of 3.9; assert the report's mean is exactly 4.0 and the gate passes.

Pairwise

Paste this into Claude Code, Cursor, ChatGPT or any AI coding assistant.

Implement the LLM-as-Judge pattern (Pairwise variant) in this codebase, using the LLM client and language we already use.

## Goal

Decide which of two system versions is better by having a judge model compare their replies case by case, in both orders, and report the win rate.

## How it works

1. Run both versions, A and B, on every input in the test set.
2. For each input, call the judge with the Pairwise judge prompt, showing A's reply first and B's second. Parse the verdict: A, B or tie.
3. Call the judge again on the same input with the replies swapped, B first and A second, and map its verdict back to A or B.
4. If the two verdicts agree, count a win for that version; if they disagree, count a tie, because the judge was following the order, not the content.
5. Report the win, loss and tie counts, the win rate excluding ties, and the cases where the verdicts disagreed.

## Prompts

### Pairwise judge prompt

```markdown
Two assistants answered the same customer message. Decide which reply is
better against the rubric. The order of the replies means nothing, and
a longer reply is not a better one.

<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<reply_1>{{first}}</reply_1>
<reply_2>{{second}}</reply_2>

Explain your comparison in two or three sentences, then decide.
Respond in JSON: {"reasoning": "...", "winner": "1" | "2" | "tie"}
```

## Stop rule

Stop after every input has been judged in both orders. If more than a quarter of cases end in disagreement, report the comparison as inconclusive instead of naming a winner.

## Requirements

- Always judge each pair in both orders; never count a single-order verdict.
- Hide which version is which from the judge: label the replies only 'Reply 1' and 'Reply 2'.
- Keep a fixed random seed for any sampling of the test set, so the two versions see identical inputs.
- Report the tie rate as a measure of how much the judge was guided by order.
- Add a test with a stub judge that always picks Reply 1; assert every case is counted as a tie and the result is reported as inconclusive.

Jury

Paste this into Claude Code, Cursor, ChatGPT or any AI coding assistant.

Implement the LLM-as-Judge pattern (Jury variant) in this codebase, using the LLM client and language we already use.

## Goal

Score each output with a panel of smaller judges from different model families and pool their verdicts, so no single model's bias decides the result.

## How it works

1. Pick three or more judge models from different model families. Prefer small, cheap models over one large one.
2. For each output, call every judge in parallel with the same Juror prompt, and parse each reply into a verdict.
3. Pool the verdicts: a majority vote for pass or fail, or the mean for numeric scores.
4. Record each judge's verdict next to the pooled one, so a judge that keeps disagreeing with the panel stands out.
5. Aggregate the pooled verdicts across the test set into a report, as for a single judge.

## Prompts

### Juror prompt

```markdown
You are one of several independent graders. Judge the reply only against
the rubric.

<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<assistant_reply>{{output}}</assistant_reply>

Explain your judgement in one or two sentences, then decide whether the
reply passes. Respond in JSON: {"reasoning": "...", "verdict": "pass" | "fail"}
```

## Stop rule

Stop after every output has a pooled verdict. If a judge fails to answer after one retry, pool the rest; if fewer than three answered, or the remaining votes tie, mark that case as unjudged.

## Requirements

- Draw the judges from different model families, and never include the family of the system under test.
- Give every judge the identical prompt and rubric.
- Use an odd number of judges for pass or fail votes, so there are no ties.
- Report per-judge agreement with the pooled verdict, and review any judge that falls far below the others.
- Add a test with three stub judges returning pass, pass and fail; assert the pooled verdict is exactly pass and the dissent is recorded for the third judge.

Agent-as-a-Judge

Paste this into Claude Code, Cursor, ChatGPT or any AI coding assistant.

Implement the LLM-as-Judge pattern (Agent-as-a-Judge variant) in this codebase, using the LLM client and language we already use.

## Goal

Evaluate an agent's run by giving a judge agent tools to read its workspace and trace, so each requirement gets a met or not-met verdict backed by evidence.

## How it works

1. Write the task's requirements as a numbered checklist, each one specific enough to check, such as 'saves the plot to out/accuracy.png'.
2. Run the agent under test on the task, and keep its final workspace (the files it wrote) and its trace of steps and tool calls.
3. Give the judge agent read-only tools over the workspace and trace: list and read files, search, and run a file in a sandbox.
4. Run the judge with the Agent judge prompt, one requirement at a time. It gathers evidence with its tools, then returns met or not met with the evidence it relied on.
5. Collect the verdicts into a report: the share of requirements met, and for each failure, the evidence.

## Prompts

### Agent judge prompt

```markdown
You are checking whether another agent's work meets one requirement. You can
inspect its workspace and its trace with your tools; you cannot change them.

<task>{{task}}</task>
<requirement>{{requirement}}</requirement>

Gather evidence before deciding: read the relevant files, search the trace,
and run code if that is the only way to know. Then respond in JSON:
{"verdict": "met" | "not_met", "evidence": "file paths, commands and output you relied on"}
```

## Stop rule

Stop after every requirement has a verdict, or the judge has used 15 tool calls on one requirement; then record that requirement as unverified rather than guessing.

## Requirements

- Give the judge read-only access; a judge that can edit the workspace can change what it is judging.
- Run any code the judge executes in a sandbox with a timeout.
- Require every verdict to cite evidence: a file path and line, a command and its output, or a step in the trace.
- Judge each requirement in its own call, so one failure does not color the rest.
- Add a test with a stub judge and a fake workspace missing out/accuracy.png; assert that requirement's verdict is not met and its evidence names the missing path.

Prompt templates

Pointwise

Pointwise judge prompt
You are grading one reply from a customer-support assistant. Judge it only
against the rubric. Length and confident tone are not quality.
<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<assistant_reply>{{output}}</assistant_reply>
First explain in two or three sentences how the reply meets or misses each
criterion. Then give one integer score from 1 to 5 as defined in the rubric.
Respond in JSON: {"reasoning": "...", "score": 1-5}

Pairwise

Pairwise judge prompt
Two assistants answered the same customer message. Decide which reply is
better against the rubric. The order of the replies means nothing, and
a longer reply is not a better one.
<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<reply_1>{{first}}</reply_1>
<reply_2>{{second}}</reply_2>
Explain your comparison in two or three sentences, then decide.
Respond in JSON: {"reasoning": "...", "winner": "1" | "2" | "tie"}

Jury

Juror prompt
You are one of several independent graders. Judge the reply only against
the rubric.
<rubric>{{rubric}}</rubric>
<customer_message>{{input}}</customer_message>
<assistant_reply>{{output}}</assistant_reply>
Explain your judgement in one or two sentences, then decide whether the
reply passes. Respond in JSON: {"reasoning": "...", "verdict": "pass" | "fail"}

Agent-as-a-Judge

Agent judge prompt
You are checking whether another agent's work meets one requirement. You can
inspect its workspace and its trace with your tools; you cannot change them.
<task>{{task}}</task>
<requirement>{{requirement}}</requirement>
Gather evidence before deciding: read the relevant files, search the trace,
and run code if that is the only way to know. Then respond in JSON:
{"verdict": "met" | "not_met", "evidence": "file paths, commands and output you relied on"}

Related patterns

Composes well with:

Sources

  1. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (Zheng et al., 2023)
  2. Replacing Judges with Juries: Evaluating LLM Generations with a Panel of Diverse Models (Verga et al., 2024)
  3. Agent-as-a-Judge: Evaluate Agents with Agents (Zhuge et al., 2024)

From the Agentic Atlas by Joran Kikke · Edit on GitHub · Suggest a correction