Apply to my task
arXiv:2610.28886 ★ 82 Oct 20, 2026

SANE: Automatically Generating Tests for an LLM Judge Tailored to Its Specific Criterion

Key result

The same text edit means different things for different judges: a format change doesn’t touch a faithfulness judge but breaks a professionalism judge. The SANE method lets you automatically build tests for your specific judge (a large language model (LLM) that scores by your criterion). The tests show which text changes it doesn’t react to, even though it should. The agent reads the judge’s prompt and scale, decides what exactly it must be able to tell apart, and invents edits targeting those capabilities. Each edit comes with an expected score change. Then three independent checks throw out defective tests. A recipe is accepted if 6 of 10 pairs pass.

01

TL;DR

SANE is an agentic framework that takes a description of your LLM judge (prompt, scale, sample inputs) and invents “perturbation” tests on its own. A perturbation is a controlled edit to the text with a known expected outcome. For example: “we added implicit rudeness without profanity — the toxicity score must not drop.” The agent works from six fixed requirements for judges. It figures out what exactly this judge must be able to do, invents edits that target those capabilities, generates before/after pairs and checks that the tests make sense in the first place.

The key finding: off-the-shelf universal tests (“change the format,” “paraphrase,” “make it longer”) mean different things for different judges. Formatting doesn’t matter for a faithfulness judge but is critical for a professionalism judge. An added detail lowers a conciseness score but raises a completeness score. So a fixed test set either misses or checks the wrong thing. As a result, the judge looks reliable while in reality it ignores changes that should move its score.

The method tackles this in a few steps. First the agent pins down the judge’s capabilities. Then, for each capability, it invents an edit and the expected change in score. Next it generates test pairs on your examples. Finally, separate independent checks (three calls, majority wins) weed out defective tests.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

INPUT: judge description + its prompt/output format + 3–5 typical inputs

STEP 1: Identify the judge’s capabilities → a list of “what it must be able to tell apart”
STEP 2: Apply the 6 requirements to each capability → “recipes”: edit + expected score relation
STEP 3: Generate test pairs (before/after) on your examples → ~10 pairs per recipe
STEP 4: Test checking (separate calls, 3 independent, majority):
        A — does the recipe match the judge’s goal?
        Z — was the edit actually made in the text?
        I — does the expected relation apply to this pair?
STEP 5: A recipe is accepted if ≥ 6 of 10 pairs pass A+Z+I
STEP 6: Run the judge on the accepted pairs → a violated expectation = a judge defect

Steps 1–3 — one prompt (or one agent). Steps 4 and 6 — separate requests.

The six fixed requirements: monotonicity, subadditivity, repeatability, robustness, dynamic range, calibration.

03

Example in Practice

Task: You’ve set up an LLM judge that rates replies from support agents at an online marketplace (think Amazon or Etsy) on “professionalism” from 1 to 5. It’s already scoring in production automation. You need to find out whether it’s blind to polite but condescending delivery like “let me explain this like you’re in kindergarten,” with no profanity or insults.

Prompt:

You are an LLM-judge test engineer. Design a set of metamorphic tests for the judge below.

<ScorerSpec>
The judge rates the professionalism of a marketplace support agent’s reply.
Scale 1–5: 5 — polite, to the point, with a solution; 1 — rude, unprofessional.
</ScorerSpec>

<ScorerImplementation>
Judge prompt: “Rate the professionalism of the agent’s reply from 1 to 5. Return only the number.”
Output format: a single integer.
</ScorerImplementation>

<Examples>
1. “Hi there! Your refund has been processed, the money will arrive within 3 business days. Have a great day!”
2. “Your order is delayed because of the warehouse. We’ve already passed this to the logistics team and will get back to you by tonight.”
3. “Check your account page, it’s all there.”
</Examples>

Follow the procedure from the template: capabilities → recipes per the six requirements → test pairs → A/Z/I check.
Pay special attention to capabilities like “implicit condescension without profanity.”

Result: The model will produce a list of the judge’s capabilities (for example: detecting rudeness, implicit condescension, passive aggression, the effect of writing format). For each capability it will propose several recipes with the expected score relation and generate before/after pairs. Each pair comes with A/Z/I checks. You run your judge on the pairs and see where the expectation is violated. Most likely those will be the tests on implicit disrespect and on formatting.

04

Why It Works

The weakness. Average agreement with human ratings tells you nothing about how the judge reacts to specific changes. Universal tests don’t know what your judge is actually for. So they check the wrong things and miss defects. Hand-crafting tests for every judge is slow and subjective.

The LLM’s strength. The model is good at two things. First, reading a criterion description and reasoning about which text properties should move the score and in which direction. Second, plausibly “editing” text: adding a jab, removing a detail, paraphrasing. It’s also decent at checking someone else’s output on a narrow question.

How the method uses this. The six requirements act as scaffolding: you don’t have to reinvent them. The model only “translates” them into the language of your criterion. Three narrow checks (A, Z, I) cut out the junk: irrelevant recipes, edits that aren’t actually in the text, and pairs where the expectation doesn’t apply. What remains is the situation where a violated expectation can be counted as a judge defect, not a test defect.

Control knobs: - Pairs per recipe (n) → fewer for a quick check, more for stability. The paper uses n = 10 and a threshold of 6. - Recipe acceptance threshold → stricter gives fewer but cleaner tests. The paper’s appendix tested thresholds from 5 to 10, and the conclusions hold. - Noise tolerance (ε) → tuned to your judge’s spread across repeated runs. Without it you get false alarms. - Independent checks → better to run the oracles as separate chats or calls, not one long request. - The capability list → add your own where you know there’s a weak spot (“implicit condescension”).

05

Prompt Template

Prompt 1 — test generation:

<Role>
You are an LLM-judge test engineer. Your job is to invent tests that check
whether the judge reacts to changes that affect its criterion.
</Role>

<Inputs>
  <ScorerSpec>{criterion_and_scale_description}</ScorerSpec>
  <ScorerImplementation>{judge_prompt_and_output_format}</ScorerImplementation>
  <Examples>{3-5_typical_inputs}</Examples>
</Inputs>

<BehavioralRequirements>
  1. Monotonicity: more of the expressed property → score no lower (or no higher, if the scale is inverted).
  2. Subadditivity: the effect of several changes together must not exceed the sum of their individual effects.
  3. Repeatability: the same input → the same score.
  4. Robustness: immaterial changes (format, paraphrase) → the score doesn’t change.
  5. Dynamic range: the judge distinguishes weak, average and strong texts instead of hugging one end of the scale.
  6. Calibration: scores match the actual level of quality.
</BehavioralRequirements>

<Procedure>
  Step 1. Identify {number_of_capabilities} capabilities that this particular judge must have.
          Base them on ScorerSpec and ScorerImplementation. One sentence each.
  Step 2. For each capability, apply the requirements from BehavioralRequirements.
          For each applicable requirement, write a recipe:
            - Recipe: what edit we make to the text
            - ExpectedRelation: how the score should change
              (for example: s_after ≥ s_before − ε; s_after = s_before ± ε)
          If a requirement doesn’t apply to a capability — skip it and explain in one line.
  Step 3. For each recipe, create {n} test pairs based on Examples:
            - base_text
            - perturbed_text (edit highlighted)
  Step 4. Output a summary table: capability | recipe | expected relation | pairs.
</Procedure>

<OutputRules>
  Edits must be real and visible in the text.
  Change nothing except what the recipe specifies.
  Don’t invent recipes unrelated to the judge’s criterion.
</OutputRules>

Prompt 2 — the oracle (run separately, 3 independent times, majority wins):

<Role>You are an independent reviewer of tests for an LLM judge.</Role>

<Input>
  <ScorerSpec>{criterion_and_scale_description}</ScorerSpec>
  <Recipe>{recipe}</Recipe>
  <ExpectedRelation>{expected_relation}</ExpectedRelation>
  <BaseText>{original_text}</BaseText>
  <PerturbedText>{modified_text}</PerturbedText>
</Input>

<Questions>
  A (Alignment): do the recipe and expected relation match the judge’s goal? yes/no + reason.
  Z (Realization): does the modified text actually perform the edit from the recipe? yes/no + reason.
  I (Applicability): does the expected relation apply to this specific pair? yes/no + reason.
</Questions>

Return JSON: {"A": ..., "Z": ..., "I": ...}

Fill in: - {criterion_and_scale_description} — how you describe to the judge what to rate; - {judge_prompt_and_output_format} — the judge’s verbatim prompt and the shape of its answer; - {3-5_typical_inputs} — real samples of your data; - {number_of_capabilities} — usually 4–6; - {n} — number of pairs per recipe (10 in the paper).

A pair is accepted only if all three answers are “yes.” A recipe is accepted if more than half of its pairs pass (6 of 10).

🚀 Quick start — paste into the chat:

Here’s the SANE template. Adapt it to my task: I want to test an LLM judge that {what the judge rates}.
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask about the judge’s criterion and scale, its verbatim prompt, its answer format and a couple of real sample inputs. That’s because the whole method is built on tailored recipes: without the judge’s details, the model will produce generic tests, which is exactly what the method is trying to replace.

06

Limitations

⚠️ The original is code, not a chat: the authors implemented the method as a harness (orchestrating the agent and the oracles). You can reproduce the logic in a chat or agent, but running hundreds of pairs through a judge will take a small script or some automation. An LLM can help you build that script.

⚠️ Only for people who have a judge: the method tests an LLM evaluator (scorer). You don’t need it for regular chat replies.

⚠️ It finds defects but doesn’t fix them: the output is a list of violated expectations. How to rewrite the judge’s prompt is up to you.

⚠️ The reviewer is an LLM too: the oracles (three independent model calls) can be wrong. The visible part of the paper has no human check of the oracles. On a sample of 20–30 pairs, it’s better to look yourself.

⚠️ One baseline and one “agent” model: they compared against one competitor (JRH) and with one generator model (Claude Opus 5). Agreement with the human ranking of judges was shown only for faithfulness.

⚠️ Definitions of the six requirements: the available text of the paper gives them only briefly. The wording in the template above is my interpretation based on the names. Check it against the authors’ appendix if you need precision.

⚠️ Noise: judges are stochastic, so expectations are set with a tolerance ε. Without a tolerance you’ll get false alarms.

07

How They Studied It

The idea was to check whether an agent can replace the human who hand-writes test recipes. The team took five judges: faithfulness, fluency, coherence, professionalism and toxicity. The data was 1,200 examples from four sources (news, interviews, meetings). They compared against JRH — an open suite where the recipes were written by people in advance. Both systems got the same model (Claude Opus 5) and ran with no human involvement, to keep the comparison fair.

The result: SANE found 108 unique validated recipes versus 7 for JRH and produced 3.7 times more verified test families. It found judge defects in all five domains. JRH found nothing on either professionalism or toxicity: its fixed recipes (format, paraphrase, verbosity) simply aren’t about that. To check the tests, they used a panel of three GPT-5.2 calls with majority voting. That had a noticeable effect: defective tests were filtered out before the judge was ever run.

The main check — does the ranking of 11 judge models on SANE tests match the human ranking on FaithBench? SANE’s Spearman correlation came out at 0.852, JRH’s at 0.100. The practical takeaway: tests written for the judge’s criterion give a signal, while universal tests barely do.

08

Adaptations and Extrapolations

🔧 Technique: add your own “weak spots” to the capability list → sharper tests for your pain point

In Step 1, add specifics:

Step 1. Identify 5 capabilities of the judge. Be sure to include:
  - detecting implicit condescension without profanity
  - reacting to sarcasm
  - reacting to bureaucratic boilerplate instead of actual help

The model won’t “forget” the niche risks of your business. This speeds up finding defects exactly where you already suspect a problem.

🔧 Technique: a “three independent calls” oracle → a cheap check for any LLM-generated data

The principle from the paper: the check is done by a separate call, not the same one that generated the output. Three independent runs, majority wins. You can take any LLM-generated batch (test dialogues, synthetic reviews, knowledge-base examples) and run each item through a prompt like “was the task done correctly: yes/no + reason.” The junk gets filtered out before you start building anything on top of it.

09

Resources

  • Paper: SANE: Automated Scorer-Specific Metamorphic Testing for LLM Judges
  • Authors: Ethan Ludwick (Cisco Systems), Yu-Chung Hsiao (Anduril Industries). A short version was accepted to the NeurIPS 2026 TAE (Trust-AI-Eval) workshop
  • Comparison: Judge Reliability Harness (JRH, Dev et al., 2026)
  • Data: LLM-AggreFact (AggreFact-CNN, AggreFact-XSum, TofuEval-MediaS, TofuEval-MeetB), FaithBench
  • Foundation: CheckList (Ribeiro et al., 2020), metamorphic testing (Chen et al., 1998)

Research digest

Key result

The same text edit means different things for different judges: a format change doesn’t touch a faithfulness judge but breaks a professionalism judge. The SANE method lets you automatically build tests for your specific judge (a large language model (LLM) that scores by your criterion). The tests show which text changes it doesn’t react to, even though it should. The agent reads the judge’s prompt and scale, decides what exactly it must be able to tell apart, and invents edits targeting those capabilities. Each edit comes with an expected score change. Then three independent checks throw out defective tests. A recipe is accepted if 6 of 10 pairs pass.

Principle

The process: judge capabilities → edit recipes → before/after pairs → checking → running the judge. First the model writes down what the judge must be able to do. For example, “notice implicit condescension without profanity.” Then for each capability it takes six ready-made requirements: monotonicity, subadditivity, repeatability, robustness, dynamic range, calibration. It translates them into the language of your criterion. The result is a recipe: what we edit in the text and how the score should move. The six requirements are the scaffolding, and the model writes the content for it by looking at your judge. Think of a doctor and lab tests. A primary care doctor doesn’t send everyone for the same panel. They look at the complaints and order what will check the specific suspicion.

Why it works

Average agreement with humans says nothing about how the judge reacts to edits. A judge can broadly match human ratings and still miss a condescending tone. Universal tests (“paraphrase,” “make it longer”) don’t know what your judge is for. They check the wrong thing. The paper shows this with examples: format doesn’t matter for a faithfulness judge but is critical for professionalism. An added detail cuts the conciseness score and raises the completeness score. An LLM is good at two things. It reads the criterion description and understands which text properties move the score and in which direction. And it edits text plausibly: adds a jab, removes a detail. It’s also decent at checking someone else’s output on a narrow question. The junk gets cut by three narrow questions: does the recipe match the judge’s goal, was the edit actually made, does the expectation apply to this pair. Each question is a separate call, and the majority of three decides. That’s why a violated expectation can be counted as a judge defect, not a botched test.

When to apply

Automated text evaluation by an LLM judge → especially when the judge is already in production and its scores drive decisions (moderation, support quality, answer selection), and you’re not sure it notices subtle changes. A great fit when the criterion is subtle: tone, professionalism, completeness. For criteria like “factual correctness” tests can be built too, but universal ones go wrong less often there. NOT a fit if you’re just chatting with a model. The method tests the evaluator, not regular replies. It finds defects but doesn’t fix the judge’s prompt.

Mini recipe

1. Put together a file on the judge: criterion, scale, verbatim prompt, answer format. 2. Take 3–5 real examples: actual texts from your task, not made-up ones. 3. Run the generation prompt: ask for 4–6 judge capabilities and recipes per the six requirements. Add your own weak spot, for example “implicit condescension.” 4. Order 10 pairs per recipe: before/after, edit highlighted, nothing else changes. 5. Send the pairs for checking: separate chats or calls, three times per pair. Questions: A (recipe is relevant), Z (edit was made), I (expectation applies). A pair passes only if the majority answers “yes” on all three. 6. Keep the recipes where 6 of 10 pairs passed: toss the rest. 7. Tune the noise tolerance (ε): run the judge on one text several times and look at the spread. Without a tolerance you’ll get false alarms. 8. Run the judge on the accepted pairs: wherever the expectation is violated, that’s a defect. Eyeball a sample of 20–30 pairs — the oracles can be wrong too.

Examples

[BAD]: `Paraphrase this agent’s reply and check that the judge’s score didn’t change` [GOOD]: `You are an LLM-judge test engineer. The judge rates the professionalism of a marketplace support agent’s reply from 1 to 5. Its prompt: “Rate the professionalism of the agent’s reply from 1 to 5. Return only the number.” Identify 5 capabilities it must have. Be sure to include “polite but condescending delivery without profanity.” For each capability, invent a text edit and the expected score change. Make 10 before/after pairs on my examples: [3 agent replies]` What you’ll get: the recipe “added the phrase ‘let me explain this like you’re in kindergarten’ to a polite reply,” expectation “the score must drop.” If the judge gave both texts a 5, it’s blind to that kind of delivery. The universal “paraphrase” test would never have caught it.

In plain words

We increasingly put models in charge of judging other models’ work, blindly trusting their high correlation with humans. That’s total nonsense: an average score across the board doesn’t show how the evaluator reacts to sneaky, targeted manipulation. Your LLM judge may happily slap a top score on a support reply where the writer tucked in hidden rudeness, just because the wording stayed technically polite. The SANE framework exposes this blindness: it automatically breaks the judge exactly where it’s supposed to hold the line.

It’s like hiring a strict bouncer who’s great at turning away drunks in sweatpants but waves in a polite psycho with an axe under his coat, just because the guy wore a tie. Regular benchmarks march the usual crowd past the door, while SANE invents the perfect troublemakers itself. It carefully changes one detail in the text and watches the reaction: if an agent belittled a customer with “let me explain this like you’re in kindergarten,” and the judge didn’t dock points for professionalism — your referee is unfit for duty.

The approach is built on metamorphic testing: the agent studies your judge’s prompt, pulls out the task context through 6 system requirements and generates controlled perturbations. The model creates pairs of texts before and after where the score shift is 100% predictable. Add hidden toxicity — the score must drop; trim the fluff without losing substance — the rating shouldn’t sag. If the judge fumbles these shifts, the system instantly catches the logic bug.

The experiment covered support and toxicity, but the principle is universal. Whether you’re grading junior devs’ code, checking legal contract summaries or screening job candidates’ résumés — anywhere an LLM hands down a verdict, you need a custom audit. Coming up with tricky examples like these by hand for every new prompt is an unbearable, soul-crushing slog, and standard public tests simply don’t know your specifics.

Bottom line: stop worshipping abstract “90% agreement with annotators” — check the cause and effect. Either you put the evaluator through adaptive stress tests like SANE and find every hole before deployment, or your customers will quickly figure out that the algorithm is easy to fool with pretty, smooth-sounding nonsense.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on SANE: Automatically Generating Tests for an LLM Judge Tailored to Its Specific Criterion arXiv:2610.28886

Sign in to apply this study New accounts get 50 free credits.