An evidence-grounding benchmark for AI summaries of spoken proceedings.
Interactive write-up and demo -> mohithgajjela.com/field-03-gavel
Every sentence a model writes about an oral argument is traced back to the transcript turns that support it, or flagged when nothing does. Then the detector doing that tracing is itself measured, against errors whose ground truth is known exactly.
Runs entirely on a local Ollama install. No API keys, no paid inference, no credentialed data.
40 Supreme Court oral arguments · 10,239 speaker turns · 1,064 benchmark claims
383 grounded controls · 681 planted errors across 8 error classes
Summarisation metrics measure the wrong thing. A summary can score well on ROUGE while attributing a statement to the wrong speaker, dropping a hedge, or reversing an outcome, because ROUGE only asks whether the wording looks familiar. If you care whether a claim is true of the source, n-gram overlap cannot tell you.
The usual alternative is to have a model check faithfulness. That immediately raises the question this project is actually about: how do you know the checker works? Point it at model-written summaries and you have no ground truth, because the "clean" summaries already contain hallucinations you did not label. Every precision number you compute is contaminated.
Gavel's answer is to build a control set that is grounded by construction, plant errors into it with an exact ledger, and report what the detector does on both halves, including the numbers that are unflattering.
Track A — planted errors, known ground truth. Each control claim is generated from exactly one transcript turn, then has to pass a deterministic gate (correct speaker surname present, high lexical overlap with the source turn, sane length) and an entailment check by a model that is not the detector. Surviving claims get exactly one error planted in them, from one of eight classes. The detector never sees the ledger and never learns which variant it is judging.
Track B — organic hallucination. Local models write bench reports from the arguments with nothing planted. Every resulting sentence is aligned to transcript turns and judged for support, contradiction and speaker identity, then scored against ROUGE on the same observations, so surface overlap and factual support can be compared directly rather than assumed to agree.
| Class | What changes |
|---|---|
SPEAKER_SWAP |
The claim is attributed to a different justice |
NEGATION_FLIP |
A negation is inserted or removed |
NUMBER_SWAP |
A number, date or citation is altered |
PARTY_SWAP |
Petitioner and respondent are exchanged |
QUOTE_DRIFT |
A quoted phrase is reworded while kept in quotes |
HEDGE_STRIP |
Hedging is removed, turning a maybe into an assertion |
OUTCOME_FLIP |
The stated disposition is reversed |
FABRICATION |
A plausible claim with no support anywhere in the transcript |
Speaker misattribution is deliberately over-weighted. It is the error class that audio grounding can catch and a text-only pipeline structurally cannot.
Detector: llama3.1:8b. Evidence: hybrid BM25 + nomic-embed-text dense
retrieval fused with reciprocal rank fusion, top-5 turns per claim.
| Value | |
|---|---|
| Recall | 0.974 (95% CI 0.959-0.983) |
| Precision | 0.706 |
| F1 | 0.819 |
| False-positive rate on grounded controls | 0.721 |
| ROC AUC on support score | 0.783 |
Recall of 0.97 on its own is a misleading headline, which is why the false positive rate sits next to it. The detector flags almost every planted error and also flags most claims that were grounded by construction. It is closer to a system that says "flagged" than to one that discriminates.
| Decision rule | Precision | Recall | F1 | FPR on clean |
|---|---|---|---|---|
| Pre-registered (flag PARTIAL/UNSUPPORTED/CONTRADICTED/bad attribution) | 0.706 | 0.974 | 0.819 | 0.721 |
| Strict (flag UNSUPPORTED/CONTRADICTED/bad attribution) | 0.997 | 0.439 | 0.610 | 0.003 |
| Contradiction only | 1.000 | 0.095 | 0.167 | 0.000 |
Dropping PARTIALLY_SUPPORTED from the flag set moves precision from 0.71 to
1.00 and the false-positive rate from 0.72 to 0.003, at the cost of more than
half the recall. Same model, same judgements, one threshold.
Thresholds are selected on a held-out half of the cases and reported on the other half without retuning: dev F1 0.811, test F1 0.827.
| Class | n | Recall |
|---|---|---|
| Fabricated claim | 348 | 1.000 |
| Speaker misattribution | 116 | 0.983 |
| Negation flip | 119 | 0.966 |
| Hedge stripped | 36 | 0.944 |
| Number / citation swap | 30 | 0.867 |
| Outcome flip | 17 | 0.824 |
| Party role swap | 10 | 0.700 |
| Quotation drift | 5 | 1.000 |
Shuffling the retrieved turns is the control that separates "the judge is reading the evidence" from "the judge has a prior".
| Evidence | Recall | FPR on clean | Anchor hit rate |
|---|---|---|---|
| Hybrid BM25 + dense, RRF | 0.947 | 0.829 | 0.627 |
| Shuffled (control) | 1.000 | 1.000 | 0.027 |
The anchor hit rate collapses from 0.63 to 0.03, so retrieval is finding the right turn. But recall barely moves, which says the judge is not depending on that evidence nearly as much as it should. Reported rather than buried, because it is the single most informative number about this pipeline's limits.
Retrieval ablations are close together (BM25-only F1 0.830, dense-only 0.820, hybrid 0.811), so on this corpus the hybrid stack is not earning its complexity.
The detector assigns a severity to every flag. Rows are planted severity, columns are what it said:
| truth ↓ / pred → | MINOR | MAJOR | CRITICAL |
|---|---|---|---|
| MINOR | 29 | 5 | 0 |
| MAJOR | 111 | 33 | 1 |
| CRITICAL | 163 | 218 | 103 |
Severity accuracy 0.249. The model detects that something is wrong and then systematically under-rates how bad it is: 381 of 484 critical errors are graded down. A flag alone is not a triage signal.
The first version of this benchmark reported severity accuracy of 0.330. That number was an artifact.
The judge is asked for JSON. Local 8B models emit JSON that is almost valid, and the failure modes are systematic. Across the 1,409 judge responses in the run cache:
- 343 (24%) parsed as strict JSON
- 1,052 (75%) failed for exactly one reason: the model wrote evidence ids the
way the prompt displays them,
"evidence": [E1, E3], which is not JSON - 14 (1%) failed because
whycontained an unescaped quote, which happens whenever the model quotes the sentence it is auditing
The original parser gave up on all of those and fell back to regexing the
support label out, hardcoding severity: "MAJOR" and an empty evidence
list. So on three quarters of the benchmark the reported severity was not the
model's judgement at all, it was a default that happened to match the plurality
truth label often enough to look like a result.
Repairing the known defects and scavenging fields individually took parse recovery from 24% to 99.0% and dropped the parse-failure rate from 0.719 to 0.026. Detection precision, recall and AUC did not move at all, which is the correct outcome: that path never touched the support label. Severity accuracy fell from 0.330 to 0.249, because it is now measuring the model instead of measuring a constant.
The fix is in src/judge.js; the measurement of it is in the docstring there.
- Node 20+ (no npm dependencies, at all)
- Ollama running locally
- ~12GB free disk for the corpus, embeddings and response cache
ollama pull llama3.1:8b
ollama pull gemma3:4b
ollama pull nomic-embed-textnpm run fetch # rebuild data/ from the public Oyez API
npm run fetch:audio # also grab the one argument mp3 the demo player uses
npm run prep # 01 select 40 arguments, normalise to a common shape
npm run embed # 02 embed every turn, int8-quantised
npm run claims # 03 build the grounded control set
npm run audit # 03b measure the gate before trusting it
npm run experiment # 04 Track A: plant errors, judge, ablate
npm run trackb # 05 Track B: organic summaries
npm run bundle # 06 assemble the demo bundle
npm run analysis # 07 operating points, held-out threshold, severity
npm run page # build the interactive page into web/dist/
npm test # 36 unit tests, no model calls, runs in under a secondEvery model call is cached on disk by a hash of (model, prompt, options), so
an interrupted run resumes for free and a second run of the whole pipeline
makes zero inference calls. That is what makes the analysis stages cheap to
iterate on: re-running Track A against the cache takes about a second.
Useful knobs: GAVEL_N (corpus size), CLAIMS_PER_CASE, PER_CLAIM,
TOPK, TRACKB_CASES, TRACKB_MODELS, DETECTOR_MODEL, VERIFIER_MODEL,
GEN_CONC, OLLAMA_HOST.
scripts/fetch_data.js rebuild data/ from Oyez
pipeline/ numbered stages, each one reads and writes results/
src/judge.js prompt construction + the tolerant response parser
src/perturb.js the eight error classes and the exact ledger
src/retrieve.js BM25, dense cosine, reciprocal rank fusion
src/metrics.js ROUGE, Wilson intervals, Pearson, confusion counts
web/build_page.js renders results/demo_bundle.json into one static file
test/smoke.js unit tests for perturbation, parsing and metrics
Nothing under data/, results/ or .cache/ is committed. scripts/fetch_data.js
rebuilds the first, the pipeline rebuilds the rest.
- One local 8B detector is not a stand-in for frontier models. Every number
here describes
llama3.1:8bspecifically. - 40 arguments, not the full archive. Wide confidence intervals on the small error classes: quotation drift has n=5, party swap n=10.
- Planted errors isolate a failure mode cleanly but are not a model of how hallucination actually arises. That is what Track B is for, and Track B is the noisier half.
- Severity labels are model-judged against a rubric, not human consensus.
- The shuffled-evidence control shows the judge is not leaning on retrieval as much as the architecture implies. This is a real weakness, not a footnote.
Transcripts, metadata and audio come from Oyez, a free public archive of Supreme Court oral arguments run by IIT Chicago-Kent College of Law, fetched from its public API at run time and not redistributed here.
Code is MIT licensed. See LICENSE.