Calibrating a judge for legal work

How we built a legal evaluation environment and calibrated its LLM judge against lawyer preferences.

Henry Mao

It's becoming increasingly common for us to do a first pass with AI before asking lawyers for advice, but can you really trust an AI's legal advice?

Over the last month, I partnered with Legal Benchmarks to explore this question. Legal Benchmarks' community of lawyers contributes legal requests, examples of AI failures, and tasks for model evaluation. I helped improve their task definitions, environment, and graders for an updated leaderboard.

The strongest frontier model, Astra, achieved a Criterion Pass² rate of 88%. With the new evaluation complete, I want to share how we designed it and some of the lessons I learned along the way.

Legal Benchmarks model leaderboard
  • Anthropic
  • Meta
  • OpenAI
  • Qwen
  • DeepSeek
  • Google
  • Z.ai
  • xAI
  • Moonshot AI
  • MiniMax
  • Mistral

Visit the leaderboard

Criterion Pass²
Criteria passed in both attempts (Pass²) divided by all criteria in tasks with two assessable attempts. Each criterion has equal weight.
Form
Share of form checks passed, averaged over attempts.
Evaluated on . Includes targeted regrades after criterion fixes.

The challenge of tacit knowledge

When I first started designing legal AI tasks, I had an "engineer-brain" instinct: if law is code for humans, couldn't we just reduce law to code and create unit tests to make it verifiable? Why not just write contracts in something like Prolog? It turns out that's a naive understanding of a lawyer's job.

Anna Guo, founder of Legal Benchmarks, taught me that even simple legal queries, like asking for a contract’s effective date, can require nuance: “when a contract is signed, the date it starts to be enforceable and when it is effective can all be different dates.”

Much of this knowledge is tacit: practitioners learn it from their seniors and through real-life cases, and it can be hard to spell out. To make the problem even more wicked, the right legal response often goes beyond a binary yes-or-no answer. It depends on context, risks, and other qualifications.

That nuance makes a deterministic legal verifier hard to build. Coding environments such as SWE-Gym and SWE-smith use executable tests to check proposed solutions. Our verifier needs to apply a lawyer's tacit judgment when evaluating an agent's answer.

Given these challenges, how would one define a task to test an AI's legal capabilities?

Task formulation

In Legal Benchmarks, we formulate a task as follows:

  1. An agent receives a lawyer’s request as a prompt, which may come with source files.
  2. The agent works through the provided context in a workspace and submits an answer, which may include output files.
  3. We grade the answer on two metrics, substance and form, defined below.

Tasks include contract drafting and document extraction. We run them in the LB Harness, our shared environment for evaluating models on legal work.

The task and the LB Harness
Prompt
Agent
bash · read · write
edit · glob · grep
Files
Answer + output files
Judge
  • Pass: criterion 1
  • Pass: criterion 2
  • Fail: criterion 3
The agent uses these tools to read source files and write output files, then submits its answer to the judge. The checklist illustrates a verdict for each criterion. Every attempt starts in a fresh workspace.

The Legal Benchmarks team and I explored different tool and harness setups. Choosing the right affordances matters because harnesses can have a large impact on model performance.

One choice for benchmark design is to make the harness as close as possible to an end-user application, such as Claude Cowork or Codex. While this is useful for measuring real user experience, differences in tools and document handling make it harder to isolate a model's legal capabilities.

For this benchmark, we decided to focus on legal interpretation and reasoning. I built the LB Harness based on the setup from Harvey LAB, using the Tardigrade framework. I gave every model the same document reader, with OCR for scans and preserved edit markers. Each model gets a simple filesystem with basic shell commands via Just Bash and no network access.

We run each task in 2 fresh attempts, each with a time limit of 15 minutes. The LB Harness includes a clock that shows the remaining time in subsequent model requests.

To measure reliability, we follow τ-bench’s Passᵏ definition: the probability of completing a task successfully in every one of k independent attempts. Task Pass² applies this to whole tasks: the share of tasks that satisfy every substance criterion in both attempts. Criterion Pass² applies the same requirement to each criterion: we count a criterion only if it passes in both attempts, then divide that count by the total number of criteria. Form is scored separately.

With the LB Harness defined, the next step was to design a grading mechanism that captured what lawyers considered an acceptable answer.

Designing the judge

We first had to define what a good answer meant:

  • Substance covers legal correctness, completeness, depth of reasoning, and whether the answer addresses the request. An answer can reach the right conclusion and still fail if it leaves out the reasoning or qualifications a lawyer needs.
  • Form covers how the work is presented: its clarity, structure, and usability as a professional deliverable.

The simplest approach would be to give a judge these definitions and ask it to assign a score to each answer. Instead, inspired by CheckEval, we break our evaluation into a list of predicates. This structures the judge's output as a binary vector. When all elements of this vector are true, the answer passes the task.

We applied that approach to substance and form, expressing each requirement as a pass/fail criterion. Together, these criteria form the task's checklist. The leaderboard lets you compare Task Pass² and Criterion Pass² for substance. Form is the share of form checks passed, averaged over attempts.

Turning lawyer feedback into checklists

Legal Benchmarks already had binary substance criteria, alongside lawyer-written rubrics, open-ended reviews, and human decisions on cases escalated after models disagreed on prior runs. Some criteria bundled several requirements, repeated a check, or referred to evidence without attaching it for the judge.

My goal was to turn these semi-structured inputs into checks that an LLM judge could use reliably. Unlike a human who can fill in gaps when a criteria is underspecified, an LLM judge needs explicit expectations and the reference files necessary to reach a reliable verdict.

From a compound criterion to separate checks

Compound criterion

Identifies the missing start date and asks the client to confirm it.
Split

Separate checks

  • Identifies the missing start date.
  • Asks the client to confirm the start date.
The original requirements are preserved, and each check can now pass or fail independently.

We worked toward a few principles for these criteria:

  • Atomic. Each criterion should ask for one decision, with a clear pass/fail boundary. Compound criteria should be split into smaller ones where doing so preserves their meaning.
  • Self-contained. Each criterion should spell out what counts as a pass, so the judge can evaluate the answer using a fixed set of reference files.
  • Non-duplicative. Criteria should cover distinct requirements without checking the same result twice. Different requirements can still fail together.

To make this transformation scalable, I built meta-verifiers to check criteria against these principles. I then asked a frontier model to propose rewrites that followed them.

This sounded straightforward until I showed the initial transformation results to a lawyer. They rejected several rewrites where making the criteria cleaner changed their meaning. In one case, a rewrite replaced a required address in the criteria with placeholder text. It became clear that keeping an expert in the loop was necessary for crafting good verifiers.

What worked much better was separating mechanical transformations, such as straightforward atomic splits, from changes that required legal judgment, such as deciding whether a reference supported a required value. Even apparently mechanical rewrites had changed content, so we used a dedicated split checker and had engineers review the criteria diff.

The remaining changes needed lawyer review. To make the most of their limited time, I used model disagreement to flag uncertain cases for human escalation, borrowing from active learning.

From lawyer feedback to structured criteria
Lawyer inputs
Mechanical checks
Propose
Review
Refine
Structured criteria
Mechanical checks come first. Lawyers then review substantive changes and model disagreements, with their feedback shaping the next round of proposals.

The loop ran over several rounds, with each lawyer review informing the next proposals.

Screening the models

The next step was to choose an LLM to act as our judge. We screened 5 different models as potential judge candidates, using lawyer-labeled answers from Legal Benchmarks. Each review paired an AI answer with one substance criterion and a lawyer's PASS or FAIL decision about whether the answer satisfied that criterion. The reviewing lawyers were different from the lawyers who authored the tasks.

The review set contained 107 answer–criterion pairs across 31 tasks. We focused on difficult cases: answers where model judges disagreed and answers that came close to satisfying the requirements. These were useful places to look for weaknesses in a judge because a small omission or an ambiguous qualification could change the verdict. The scores below measure agreement with the lawyers on this selected set.1

What the judge was evaluated on
AI answer
One substance criterion
Reference files
Same inputs
PASS or FAIL
PASS or FAIL
Compare verdicts
Agreement with lawyer labels
Each review asks whether one answer satisfies one substance criterion. The lawyer's verdict is the reference label; each candidate judge produces its own verdict from the answer, criterion, and reference files.

I tested the candidate judges with the same baseline instruction and compared their verdicts with the lawyer labels. A judge could disagree in either direction: it could reject an answer the lawyer considered sufficient, or accept one the lawyer considered incomplete. PASS recall measures how often it agrees with the lawyer on a PASS case, and FAIL recall measures how often it agrees on a FAIL case. Our main measure, balanced accuracy, is the average of those two recalls. This gives both kinds of decision equal weight even though the review set contains more FAIL labels.

Screening judge models
107 lawyer-labeled cases across 31 tasks · baseline instruction
Model screening on the full clean lawyer-labeled review set
Judge configurationBalanced accuracy Mean of both recallsPASS recall Matches lawyer PASSFAIL recall Matches lawyer FAIL
GPT-5.6 Sol Effort: high68.1%67.6%68.6%
GLM 5.3 Flash Effort: high65.6%87.4%43.8%
Kimi K3 Effort: low where supported65.4%85.1%45.7%
Gemini 3.8 Flash Effort: low where supported63.8%78.4%49.3%
Gemini 3.7 Flash Effort: low where supported59.8%81.1%38.6%
Baseline judgments on the same difficult answer–criterion cases. Reasoning effort is listed per configuration; the small review set leaves substantial uncertainty in the ranking.

Sol had the highest measured balanced accuracy, but the two recalls show why the choice of judge was less straightforward than that ranking suggests. GLM agreed with more of the lawyer-PASS decisions, while Sol agreed with more of the lawyer-FAIL decisions. In the disagreement analysis, GLM sometimes credited an answer for providing the main fact even when it omitted a required citation or qualification. Sol's stricter reading helped it catch those omissions, but it also rejected more answers that the lawyers had accepted.

GLM had the next-highest balanced accuracy after Sol, alongside its stronger PASS recall. That made it a promising starting point for calibration: it recognized many of the answers lawyers considered sufficient, and the disagreement analysis gave us a specific behavior to work on.

Its open weights also made it attractive for future reproducibility. We chose GLM for those reasons, then tested whether we could optimize its system prompt to catch omissions it was overlooking.

Refining the prompt

The disagreement cases suggested that GLM needed a more explicit rule for handling partially satisfied criteria. I added an instruction to require evidence for every part of the criterion, without filling in gaps for the answer. The aim was to catch incomplete answers while preserving its ability to recognize the answers lawyers had approved.

For this experiment, I split the same review pool into development and held-out tasks.1 The prompt variants were written before scoring them on the development set. I selected the variant with the highest balanced accuracy that met a minimum PASS recall requirement, then compared it with baseline GLM and Sol on the held-out tasks. All three configurations below used high reasoning effort.

Comparing the tuned judge
49 held-out cases across 23 tasks · high reasoning effort
Baseline GLM, tuned GLM, and Sol on matching held-out lawyer-reviewed cases
Judge configurationBalanced accuracy Mean of both recallsPASS recall Matches lawyer PASSFAIL recall Matches lawyer FAIL
Sol · comparison judge65.7%47.1%84.4%
GLM · baseline instruction75.5%84.3%66.7%
GLM · revised instruction77.7%80.4%75.0%
All rows use the same answer–criterion cases held out from prompt selection. Compare GLM’s two instructions to assess tuning; Sol provides a reference on this subset of the earlier screen.

The revised instruction helped GLM catch more lawyer-FAIL cases, with a smaller loss in PASS recall. Baseline GLM already led Sol on this held-out subset, so tuning accounts for only the additional gain over baseline. Sol still caught more lawyer-FAIL cases, but rejected more than half of the lawyer-PASS cases. Its stricter judgments had helped on the development tasks and hurt on the held-out tasks; neither judge dominated across both sets.

Agreement between models alone would have hidden this tradeoff: in an earlier comparison, two judges agreed most of the time but still produced meaningfully different pass rates.2

I also experimented with two ways of calling the judge: one criterion per call, or a list of verdicts for all criteria in a task. We found no measurable accuracy advantage for either approach against the lawyer labels. Batching reduced the number of requests, but produced more lenient verdicts and was less reliable on long checklists. We chose one criterion per call.

Results

I ended up with 1,032 criteria after splitting and reviewing the requirements. I also turned open-ended lawyer-written descriptions of form into explicit checklists for how the work should be presented.

I then ran the model leaderboard with these criteria and the calibrated judge. A few results stood out:

  • Similar Task Pass² rates hid different failure patterns. Astra had a Criterion Pass² rate of 87.9%, compared with 77.2% for Qwen Flash, yet both had the same Task Pass² rate. Qwen Flash also passed more whole attempts. This suggests more near misses from Astra and a spikier mix of complete answers and larger misses from Qwen Flash.
  • The top score carried a steep cost premium. Opus's estimated collection cost per attempt was about 24 times Qwen Flash's, for a gain of 11.5 percentage points in Task Pass². Qwen's lower cost came with slower completion and lower form scores. Reliability, speed, and presentation each matter when weighing these tradeoffs.
  • Faster did not mean cheaper. Astra averaged 92 seconds per attempt against Fable's 180, yet its estimated collection cost per attempt was about 51% higher. Latency and cost need to be measured separately for the workflow being evaluated.3

I also looked through selected answers to understand what the models got wrong:

  • The best models still missed requirements in detailed drafts. A model could correctly draft a negotiated royalty term but leave its financial risk unexplained in the cover memo. Another left old cross-references in the final document. Getting the main terms right did not ensure that the accompanying advice and document edits were complete.
  • Lower-scoring models struggled with basic extraction and finishing the work. Examples included reporting the wrong commitment amount, omitting a required party's role, and supplying figures unsupported by the source document. In one run, repeated document reads exhausted the tool-call allowance before the model returned an incomplete answer. These mistakes weren't exclusive to weaker models: a top performer also misread a count as an area measurement and still passed the relevant comparison check.

You can follow the results on the Legal Benchmarks leaderboard.

If you're working on evaluating models for legal tasks or are interested in our dataset, you can reach me at contact@clavia.ai.

Footnotes

  1. The labels come from earlier legal AI application outputs on the same task set, rather than the harness submissions scored in this leaderboard. The review set covers 44 distinct criteria, with 37 PASS and 70 FAIL labels. For the prompt experiment, 58 examples from 8 tasks went into development; the held-out sample is shown in the prompt table. Each answer-versus-criterion case has one lawyer label. Repeated judge calls do not create additional independent labels. 2

  2. In an earlier set of GLM 5.3 Flash's own submissions, graded with the whole-checklist judge, GLM and Sol agreed on 93.4% of 925 verdicts, yet GLM’s criterion pass rate was 5.7 percentage points higher. That comparison had no human labels and is separate from the lawyer calibration sample.

  3. Estimated collection cost is total spend at recorded list rates divided by 122 attempts, including retries and abandoned runs but excluding grading. Time measures the final recorded sessions, including tools and retries. Comparisons use rounded means.