Blog

Improving Qwen3.8-27B on Harvey LAB with 500 Legal Tasks

We trained Qwen3.8-27B on 500 legal-work tasks using Group Relative Policy Optimization (GRPO). On 150 public Harvey Legal Agent Benchmark (LAB) tasks, the judge-averaged all-pass rate increased from 11.4% to 16.3%.

A legal deliverable can address most issues and still miss a required qualification or leave a document inconsistent. We used individual rubric checks to reward partial progress during training, then measured how often the model satisfied the entire rubric.

  • Base Qwen3.8-27B
  • After GRPO

Judge-averaged all-pass

Base Qwen3.8-27B: 11.4%
After GRPO: 16.3%

Both judges all-pass

Base Qwen3.8-27B: 8.4%
After GRPO: 12.7%

All-pass rate (%)

Figure 1. Per-attempt all-pass rates across 150 tasks, with three attempts per model.

We trained on 500 legal assignments from AfterQuery. Each includes source documents and a pass/fail rubric, but no reference answer. The training set spans 25 practice areas and includes 248 analysis tasks, 132 drafting tasks, and 120 review tasks.

Pie chart of 500 training tasks across 25 legal practice areas, led by corporate M&A with 52 tasks and intellectual property with 42.
Figure 2. Training tasks by legal practice area.

Turning rubric checks into a training signal

For each task, the model generated four attempts using tools to inspect documents and produce a deliverable. Claude Sonnet 4.6 and GPT-5.5 graded each output. We averaged their criterion-pass fractions into a score, p, and used p² as the reward.

p = (judge 1 criterion fraction + judge 2 criterion fraction) / 2
reward = p²

Partial credit distinguishes an output that misses one requirement from one that misses most of them. Squaring the score rewards an equal increase in rubric coverage more strongly near full completion.

GRPO updates the model using each attempt’s reward relative to the other attempts on the same task. Each update was configured for 64 task groups, or 256 rollouts, with Medium reasoning and a constant learning rate of 10⁻⁴, without warmup.

Measuring complete success on Harvey LAB

We evaluated both models with the official Harvey LAB agent, tools, skills, and scoring code. Both used Medium reasoning, temperature 1, and the same two judges.

The comparison covers 150 tasks with three attempts per model per task, giving 900 outputs scored by both judges.

Judge-averaged all-pass averages the two judges’ independent decisions on whether every criterion passed. Both-judges all-pass requires both judges to pass every criterion. Mean criterion pass averages the fraction of requirements passed by each judge.

Table 1. Public Harvey LAB comparison
MetricBaseTrainedChange
Judge-averaged all-pass11.4%16.3%+4.9 pp
Both-judges all-pass8.4%12.7%+4.2 pp
Mean criterion pass88.1%89.2%+1.1 pp

Related articles