Legal Agreement AI

Scoreboard

Every experimental condition on the same frozen test set (90 synthetic requests, 3 seeds for LLM conditions, local qwen2.5:7b via Ollama). Means over requests. Full tables with 95% bootstrap CIs and paired tests are in eval/results/ and the README.

Experiment 1 — does a SKILL.md playbook beat a vanilla LLM?

Conditionsuccessfield accuracyask recallhallucinated clause ratedefect recallfalse alarm on cleanroute correctchecklist compliancetotal tokens
S00.070.890.590.050.440.800.360.821,201
S10.060.770.720.010.420.900.420.824,654
S20.220.950.760.000.710.980.500.966,037
S30.060.760.720.000.470.870.370.824,424
S40.030.780.550.010.370.950.360.781,965
S50.060.890.570.040.320.930.250.875,920
S0s0.060.910.460.090.160.720.340.821,174

S0 vanilla · S1 skill content as a long system prompt · S2 focused SKILL.md (model loads ≤ 3 files) · S3 comprehensive SKILL.md · S4 skill written by the model · S5 S2 on qwen2.5:3b · S0s S0 on qwen2.5:3b.

Experiment 1 scoreboard chart

Experiment 2 — does an agent harness beat a single LLM call?

Conditionsuccesspass^3defect recallfalse alarm on cleanroute correctescalation precisionescalation recallask recalltotal tokenslatency s
H-det0.440.440.790.000.891.000.780.6900
H00.230.120.740.970.500.560.770.794,28728
H10.290.210.651.000.530.540.970.764,53029
H20.130.020.830.540.490.710.570.6233,36553
H30.240.130.930.240.750.720.880.6142,32277
H40.150.070.940.350.550.530.910.6146,08186
H3b0.350.260.900.100.810.880.720.512915

With a local 7B model the agent harnesses do not beat a single call, and rules-first decomposition (H-det) beats both: see docs/experiment2-results.md.

H-det rules + retrieval, no LLM · H0 single call · H1 fixed pipeline · H2 ReAct agent with tools · H3 H2 + validation/reflection loop · H4 H3 + compliance-checker and router agents + human-review interrupt · H3b LLM extracts requests, A* assembles clauses.

Experiment 2 scoreboard chart Experiment 2 cost versus quality

Experiment 3 — does a stronger retrieval pipeline help?

Benchmark · metricR1R2R3R4R4eR4qR5
Synthetic library · nDCG@100.1920.2840.4390.5110.5190.4540.536
Synthetic library · Recall@50.3710.2390.4220.3580.3610.3410.488
ACORD · nDCG@100.5540.5740.5500.5810.6060.609–
LegalBench-RAG-mini · recall @ 8k chars0.4080.3380.2700.3450.3660.3210.631
Grounding evalR0R1R4R5
hallucinated rate1.000.020.010.01
citation accuracy–0.490.620.61
ask recall0.000.340.520.56
Grounding by retrieval condition Graph expansion at equal budget

LLM judge (reviewer notes)

# LLM judge: reviewer note quality

Judge llama3.1:8b (generator family: qwen2.5), 18 test requests sampled with a fixed seed (20%), seed-1 runs, binary rubric, reasons before verdicts, condition names hidden. Score = share of the five questions answered true. Brackets: 95% bootstrap CIs over requests. Length bias: Spearman rho between note length (words) and score.

| Condition | judge score | q1_parties | q2_requests | q3_problems | q4_route | q5_no_invention | mean words | length rho |
|---|---|---|---|---|---|---|---|---|
| S0 | 0.37 [0.28, 0.44] | 0.00 | 0.06 | 0.61 | 0.44 | 0.72 | 10 | -0.27 |
| S1 | 0.41 [0.30, 0.52] | 0.28 | 0.00 | 0.61 | 0.72 | 0.44 | 14 | 0.11 |
| S2 | 0.34 [0.24, 0.43] | 0.17 | 0.06 | 0.61 | 0.61 | 0.28 | 25 | 0.35 |
| S3 | 0.30 [0.19, 0.42] | 0.11 | 0.00 | 0.67 | 0.44 | 0.28 | 12 | -0.05 |
| S4 | 0.37 [0.27, 0.47] | 0.06 | 0.00 | 0.67 | 0.61 | 0.50 | 10 | 0.06 |
| S5 | 0.27 [0.19, 0.33] | 0.06 | 0.00 | 0.56 | 0.44 | 0.28 | 16 | -0.13 |
| S0s | 0.30 [0.19, 0.41] | 0.06 | 0.11 | 0.56 | 0.39 | 0.39 | 11 | -0.23 |
| H-det | 0.38 [0.27, 0.50] | 0.44 | 0.00 | 0.56 | 0.56 | 0.33 | 15 | 0.02 |
| H0 | 0.41 [0.30, 0.52] | 0.28 | 0.06 | 0.61 | 0.61 | 0.50 | 25 | 0.02 |
| H1 | 0.37 [0.22, 0.51] | 0.28 | 0.06 | 0.56 | 0.56 | 0.39 | 24 | 0.13 |
| H2 | 0.39 [0.24, 0.53] | 0.33 | 0.11 | 0.56 | 0.50 | 0.44 | 14 | -0.33 |
| H3 | 0.38 [0.23, 0.52] | 0.33 | 0.11 | 0.56 | 0.50 | 0.39 | 15 | -0.33 |
| H4 | 0.38 [0.23, 0.52] | 0.33 | 0.11 | 0.56 | 0.50 | 0.39 | 15 | -0.33 |
| H3b | 0.47 [0.36, 0.58] | 0.50 | 0.06 | 0.67 | 0.61 | 0.50 | 15 | 0.00 |

Human spot-check: `human_spotcheck.csv` holds the same notes with the judge verdicts hidden behind blind ids. A team member fills the five human_* columns (1/0); then `python eval/judge.py --kappa eval/results/judge/human_spotcheck.csv` reports Cohen's kappa between judge and human (plan section 7). This step needs a person and has not been done.