Zoeb Nomi Email

Eval harness · legal RAG

Does the cited opinion support the claim?

Strict citation prompting lifted citation precision from 0.981 to 0.994 on 25 questions; recall stayed at 0.760 because retrieval, not the model, was the limit. CrossSource is the open harness behind that number: when a legal RAG system cites a court opinion, does the opinion support the claim?

0.981 → 0.994

citation precision

v0.1 · n = 25

0.760

citation recall, both prompts

capped by retrieval

15 / 15

judge vs hand-grade

blind, stratified

Items150
Opinions45
Topics15
Rater kappa0.98 / 0.84
Released20 Oct 2026 v0.3

§1 · Why

Invented citations get lawyers sanctioned.

In Mata v. Avianca, lawyers were sanctioned for filing a brief full of citations an AI invented. Citation hallucination is the failure legal and tax AI most has to stop before a practitioner relies on an answer. It is the same failure I work on in production. CrossSource is the public, reproducible version of that work: a dataset where every item traces to an exact passage in a public opinion, a written labelling protocol, and an evaluation pipeline anyone can run.

§2 · Method

Five stages, question to verdict.

v0.1 pipeline: two configurations, baseline (citation formatting only) and strict (explicit citation-discipline rules).

  1. 01

    Golden set

    25 human-authored questions · verified ground-truth chunks

  2. 02

    Corpus

    22 public-domain US opinions · 16 Supreme Court, 2 federal circuit, 4 state · ~350-word chunks

  3. 03

    Retrieve

    BM25 · top-5

  4. 04

    Generate

    Claude · mandatory inline doc_id:chunk_id cites

  5. 05

    Judge

    claim-level precision, recall, faithfulness, relevance · LLM judge, validated by hand

v0.3 dataset
150 items: 75 qa_citation, 75 citation_check: over 45 public US opinions from CourtListener (27 federal circuit, 18 state supreme court, 2018 or later), across 15 legal topics.
Provenance
Every item carries its opinion ID, URL, the exact passage and the cited authority.
Labelling
A written protocol, LABELING_PROTOCOL.md v1.1. Items are model-drafted and model-checked; no human labelled every item.
Agreement
Two blind, independent model raters: Cohen's kappa 0.98 on citation_check, 0.84 on qa_citation.
Adjudication
Every disagreement plus a 10% audit sample, 30 items in all, adjudicated by me with a third independent model rater. 27 of 30 matched the recommended label.
v0.1 corpus
22 public-domain US court opinions (16 Supreme Court, 2 federal circuit, 4 state), sourced from Harvard Law School's Caselaw Access Project, chunked to ~350 words.
v0.1 retrieval
BM25, top-5.
v0.1 generation
Claude with mandatory inline citations in doc_id:chunk_id format.
v0.1 golden set
25 human-authored questions with verified ground-truth supporting chunks.
v0.1 configurations
baseline (citation formatting only) vs strict (explicit citation-discipline rules in the prompt).
v0.1 scoring
claim-level citation precision and recall, faithfulness, and answer relevance: scored by an LLM judge, validated by hand (below).

§3 · Findings

Prompting bought precision, not recall.

Flip the prompt. Precision and wrong-passage failures move. Recall and missing authority do not: they belong to retrieval.

Fig. 1Which layer owns the failure

0.981 0.994 0.970 1.000

Citation precision

0.994

axis starts at 0.970

Failures · one square each

7 failures · strict

wrong passage · promptmissing authority · retrievalabsent under strict

Right document, wrong passagetied to the prompt

1

Missing authoritytraces to retrieval

6

Wrong document

0

Unsupported claim

0

0.760

citation recall

unchanged · retrieval cap

1.000

faithfulness

both prompts

0.960

answer relevance

baseline 0.980

3 → 1

wrong-passage cites

baseline → strict

CrossSource v0.1, Tables 2 and 3 · n = 25Toggle the prompt: only the prompt changes
Table 2. v0.1 (n = 25): baseline vs. strict
DimensionBaselineStrict
Citation precision0.9810.994
Citation recall0.7600.760
Faithfulness1.0001.000
Answer relevance0.9800.960
Table 3. v0.1 (n = 25): failure taxonomy by configuration
Error typeBaselineStrict
Right document, wrong passage31
Missing authority66
Wrong document00
Unsupported claim00
Table 1. v0.3 sanity run on a 30-item sample (not a full run)
ModelCitation precisionCitation recallcitation_check accuracy
claude-sonnet-5-50.9190.7181.00
gpt-5-mini0.7630.7180.93
The v0.1 finding that still stands (n = 25)

Citation-discipline prompting buys precision: wrong-passage citations drop 3 → 1, precision rises 0.981 → 0.994. It cannot buy recall: 0.760 in both configurations, capped by retrieval, because every missing-authority failure traces to retrieval, not generation. Knowing which layer owns the failure is the entire point of separating the metrics.

§4 · The judge

Checking the judge exposed a bug.

In v0.1, I hand-graded a blind, stratified sample of the judge's citation-precision verdicts: 100% agreement (15/15). That validation pass also surfaced a genuine harness defect: consecutive citations produced punctuation-only claim spans that the judge initially mislabeled as failures. Fixing it changed the metrics.

Fig. 2One answer through the harness

5 steps · click through

The model answers a legal question and cites its sources inline.

The spans drawn are placeholders, not real answer text.

v0.1 validation pass: stratified blind sample, hand-graded.

The lesson

That is the lesson worth paying for: an unvalidated eval reports wrong numbers with full confidence, precisely the failure mode the eval exists to catch.

§5 · Limits

What the numbers cannot carry.

  1. 01

    n = 25. The v0.1 finding rests on 25 questions over 22 opinions.

  2. 02

    Table 1 is a sanity run on a 30-item v0.3 sample, not a full run.

  3. 03

    No human labelled every item. v0.3 items are model-drafted and model-checked.

  4. 04

    Adjudication covers 30 items: every disagreement plus a 10% audit. 27 of 30 matched.

§6 · For any agent step

The same discipline, anywhere.

The same discipline I use on production systems and on anything I build:

  1. 01

    Instrument the pipeline

  2. 02

    Keep provenance for every item, so any score traces back to a passage

  3. 03

    Build a failure taxonomy instead of a single score

  4. 04

    Check the judge against people before trusting it

  5. 05

    Separate precision from recall, so you know whether to fix the prompt or the retrieval

Contact

Facing a problem that has to be right? Talk to me.