Skip to content

Worked example · Evaluation

Fine-tuning a small model for Swiss contract law.

A second worked example — same method as the FINMA report, a different domain: answering questions about the Swiss Code of Obligations (OR) with a citation to the exact article. Including a real mistake we hit on the way, and how the ablation caught it.

The setup

Four systems, one open model.

Same Apertus-8B, quantized identically to 4-bit, served identically. The only variable is the weights. Scored deterministically — no LLM judge.

A

Base

The open model, as shipped.

B

+ Retrieval

Base model with BM25 retrieval over the statute.

C

Fine-tuned

LoRA-tuned on the task, no retrieval.

D

Fine-tuned + retrieval

The full system.

The production bar is both at once — the answer correct and the correct article cited. A right answer with a wrong or missing citation is a failure, because in legal work it is one.

The result

Fine-tuning plus retrieval is the best system.

172 human-verified questions (98 German, 74 French, 10 contract-law topics). Brackets are 95% confidence intervals.

Answer correct Answer + citation (production bar)
A · Base
39%
4.1%
B · + Retrieval
54.7%
38.4%
C · Fine-tuned
46.5%
2.9%
D · Fine-tuned + retrieval the full system
70.3%
52.3%
0%25%50%75%100%
The production bar (red) is near-zero without retrieval (A, C), reaches 38.4% with retrieval alone (B), and peaks at 52.3% only when fine-tuning and retrieval combine (D) — the same shape as the FINMA result, on a different body of law.
Metric A · base B · +RAG C · tuned D · tuned+RAG
Answer + citation (production bar) 4.1% 38.4% 2.9% 52.3%
Answer correct 39.0% 54.7% 46.5% 70.3%
Citation correct 7.0% 69.8% 5.8% 62.2%
Emits the required format 1.2% 0.0% 89.5% 70.9%

The mistake worth publishing

We didn't get 52% on the first try.

The first fine-tune was trained the obvious way — on questions and their answer + citation, without retrieved context. On its own it looked great. With retrieval added, it collapsed.

Naive fine-tune + RAG
8.1%worse than B
Retrieval-aware + RAG
52.3%
Arm D on the production bar. The naive model — shown retrieved passages it never saw in training — reverted to terse answers and dropped the citation line, scoring below the base model with retrieval (38.4%). Training format compliance under retrieval fell to 16%.

Q. Is a prior agreement excluding liability for gross negligence valid? (gold: no, Art. 100)

Naive fine-tune + RAG
ANSWER: nein

Right answer, no citation → fails

Retrieval-aware + RAG
ANSWER: nein
SOURCE: OR Art. 100

Passes

The cause is a training/inference distribution mismatch: a model that will be served with retrieval must be trained with retrieval. We rebuilt the fine-tuning set so every example appears both plain and with retrieved context — the gold article guaranteed present — retrained, and the production bar went from 8.1% to 52.3%. That is exactly the kind of failure a Pilot's ablation catches before it reaches production. We measure so we don't ship it.

The honest limits

What this doesn't claim.

An evaluation you can trust is one that names where it's weak.

List-answer questions score near zero, in every arm. Extracting a complete multi-item set and citing it is the hardest sub-task here and the obvious next target — the same weak spot the FINMA report flagged.

French trails German (D: 42% FR vs 60% DE), tracking the training mix (271 DE vs 123 FR items). More balanced data closes it; the number is honest about where the model is weak today.

Format compliance is 71%, not 100%. The retrieval-aware fine-tune still drops the citation on some items — far better than the naive 16%, not perfect. It's a floor: a larger, more balanced training set moves it further.

FAQ

About this report.

Is this the same method as the FINMA report?
Yes — deliberately. Same four-way ablation, same deterministic scoring, same base model, on a different sector (legal) and a different document type (a statute, not circulars). Reproducing the finding on a second body of law is the point: the method generalises.
Why publish a mistake you made?
Because it's the most useful part. Our first fine-tune was trained without retrieval context and collapsed when retrieval was added — worse than the base model. That's exactly the kind of failure a real Pilot's ablation is designed to catch before it reaches production. We fixed it by training the model the way it's served; the report shows both.
How is this scored — is there an LLM judge?
No LLM judge anywhere. The Code of Obligations numbers every provision, so a correct citation is exactly checkable. Answer accuracy is string/number matching against a verified gold answer; citation is an exact article-number match. Every number is recomputed from frozen run records.

Want this on your task?

Bring one workflow and the documents behind it. We'll build the evaluation set and run this ablation — including the failure modes it catches — on your data, in your jurisdiction.