Dataset Viewer
Auto-converted to Parquet Duplicate
contract_id
large_stringlengths
48
99
text
large_stringlengths
18.7k
60.4k
n_chars
int32
18.7k
60.4k
gold
dict
RaeSystemsInc_20001114_10-Q_EX-10.57_2631790_EX-10.57_Co-Branding Agreement
CO-BRANDING AGREEMENT (FORM) This CO-BRANDING AGREEMENT (the "Agreement") is made and entered into as of Nov 5, 1999, (the "Effective Date") by and between NETTAXI Online Communities, Inc., a Delaware corporation with principal offices at 2165 S. Bascom Avenue, Campbell, ...
44,596
{ "defined_terms": [ { "term": "Impressions", "location": "1.3" }, { "term": "Intellectual Property Rights", "location": "1.4" }, { "term": "NETTAXI Brand Features", "location": "1.5" }, { "term": "NETTAXI Pages", "location": "1.6" }, ...
EMERALDHEALTHTHERAPEUTICSINC_06_10_2020-EX-4.5-CONSULTING AGREEMENT - DR. GAETANO MORELLO N.D. INC.
Exhibit 4.5 CONSULTING AGREEMENT - DR. GAETANO MORELLO N.D. INC. THIS AGREEMENT made effective the 10 day of January 2019 (the "Effective Date"), BETWEEN: EMERALD HEALTH NATURALS, INC., a company having its registered and records office at 7860 Venture Street, Burnaby, BC V5A 1V3 ("Emerald" or the "Company") AND:...
21,966
{ "defined_terms": [ { "term": "Confidential Information", "location": "6.2" }, { "term": "Affiliate", "location": "8.6" }, { "term": "Board", "location": "8.6" }, { "term": "Change of control", "location": "8.6" }, { "term": "C...
HYDRONTECHNOLOGIESINC_03_31_1997-EX-10.47-SPONSORSHIP AGREEMENT
SPONSORSHIP AGREEMENT THIS SPONSORSHIP AGREEMENT ("Agreement") is made and entered into as of this 1st day of January, 1997, by and between HYDRON TECHNOLOGIES, INC., a New York corporation with its principal offices located at 1001 Yamato Road, Suite 403, Boca Raton, Florida 33431, ("Hydron") and MIAMI DOLPH...
30,387
{ "defined_terms": [ { "term": "Sunscreen/Skin Care Category", "location": "2.2" }, { "term": "League Sponsor", "location": "5.3" }, { "term": "Renewal Option Fee", "location": "10.4" }, { "term": "Disaster Recovery Plan", "location": "10.5" ...
TRUENORTHENERGYCORP_02_08_2007-EX-10.1-DEVELOPMENT AGREEMENT
EXHIBIT 10.1 DEVELOPMENT AGREEMENT THIS DEVELOPMENT AGREEMENT ("Agreement"), made and entered into effective as of January 1, 2007 (the "Effective Date"), by and between BP AMERICA PRODUCTION COMPANY ("BP"), a Delaware corporation, with an office at 501 Westlake Park Boulevard, Houston, Texas 77079, and TRUE NORTH EN...
45,196
{ "defined_terms": [ { "term": "Additional Well", "location": "1.1" }, { "term": "AFE", "location": "1.3" }, { "term": "Agreement", "location": "1.4" }, { "term": "BP", "location": "1.5" }, { "term": "BP Interests", "locat...
IbioInc_20200313_8-K_EX-10.1_12052678_EX-10.1_Development Agreement
Exhibit 10.1 NOTE: Certain information indicated with [***] in this document has been omitted from this exhibit because it is both (i) not material and (ii) would be competitively harmful if publicly disclosed. MASTER JOINT DEVELOPMENT AGREEMENT This Master Joint Development Agreement ("Agreement") is between iBio Inc....
31,981
{ "defined_terms": [ { "term": "Designated Executive", "location": "2.2" }, { "term": "Renewal Option Fee", "location": "10.4" }, { "term": "Disaster Recovery Plan", "location": "10.5" }, { "term": "Confidential Information", "location": "10....
KIROMICBIOPHARMA,INC_05_11_2020-EX-10.23-CONSULTING AGREEMENT
"Exhibit 10.23 Corporate Address Fannin South Professional Building, Suite 140 7707 Fannin Street Ho(...TRUNCATED)
19,832
{"defined_terms":[{"term":"Confidential Information","location":"2"},{"term":"Renewal Option Fee","l(...TRUNCATED)
IdeanomicsInc_20160330_10-K_EX-10.26_9512211_EX-10.26_Content License Agreement
"CONTENT LICENSE AGREEMENT\n\nTHIS CONTENT LICENSE AGREEMENT (this \"Agreement\"), dated as of Decem(...TRUNCATED)
42,272
{"defined_terms":[{"term":"Mobile Sites","location":"1"},{"term":"Share Consideration","location":"1(...TRUNCATED)
WaterNowInc_20191120_10-Q_EX-10.12_11900227_EX-10.12_Distributor Agreement
"Exhibit 10.12 EXCLUSIVE DISTRIBUTOR AGREEMENT THIS EXCLUSIVE DISTRIBUTOR AGREEMENT (this \"Agreemen(...TRUNCATED)
49,822
{"defined_terms":[{"term":"Affiliate","location":"body"},{"term":"Change of Control","location":"bod(...TRUNCATED)
ArtaraTherapeuticsInc_20200110_8-K_EX-10.5_11943350_EX-10.5_License Agreement
"Exhibit 10.5 CERTAIN CONFIDENTIAL INFORMATION CONTAINED IN THIS DOCUMENT, MARKED BY […***…], HA(...TRUNCATED)
39,755
{"defined_terms":[{"term":"CRO","location":"1.2"},{"term":"FDA","location":"1.2"},{"term":"Field","l(...TRUNCATED)
ReedsInc_20191113_10-Q_EX-10.4_11888303_EX-10.4_Development Agreement
"RECIPE DEVELOPMENT AGREEMENT This Recipe Development Agreement (this \"Agreement\") is made between(...TRUNCATED)
29,556
{"defined_terms":[{"term":"Applicable Laws and Regulations","location":"body"},{"term":"Company Inte(...TRUNCATED)
End of preview. Expand in Data Studio

ContractScrub-style synthetic stand-in (unofficial re-implementation)

This is not the ContractScrub dataset and is not affiliated with its authors. The official gold set (tri-fair-lab/contract_scrub) was unreleased as of 2026-10-02. The numbers below come from a scripted synthetic benchmark and cannot be compared with the paper's Table 2.

What this repo contains: a re-implementation of the scoring and per-category prompt structure of ContractScrub: A benchmark for final review of legal contracts (Bang et al., arXiv:2608.20204), run on a stand-in benchmark of 44 CUAD contracts with errors injected by script, and one model run.

Related repos

Repo Role
arthrod/contractscrub-repro-trackio Space: Trackio dashboard for the published model run
theatticusproject/cuad Source of the 44 contract texts (CUAD v1)
arthrod/sec-ex10-exhibits Sibling legal corpus: SEC EX-10 material contracts as Markdown (CUAD's contracts are also EX-10 exhibits)
arthrod/neurotic_docx_bench Sibling legal benchmark: DOCX redline/conversion bench over contracts
arthrod/docx-corpus Sibling corpus: classified web .docx documents

Configs

All configs have a single test split.

Config Rows What one row is
benchmark (default) 44 One contract: full text + gold issues for all nine categories (same content as benchmark/benchmark.jsonl)
gold_items 980 One gold issue, flattened (contract, category, fields) — easiest to filter in the viewer
model_outputs 396 One (contract, category) model response from the published run (44 × 9; same as results/raw_outputs.jsonl)
results 20 Scores per category and macro, for exact and term_only scoring (same as results/results.json)

The JSONL/JSON originals are kept because scrub/score.py and tests/ read them; the parquet files are built from them by a deterministic conversion and carry the same content.

Schema

benchmark

Column Type Description
contract_id string CUAD file stem (filer, filing date, form, exhibit number, agreement type)
text string Full contract text with the injected clauses appended (18,663–60,445 chars, median 37,857)
n_chars int32 len(text)
gold struct One list per category. defined_terms, undefined_capitalized_terms, uncapitalized_defined_terms, incorrectly_capitalized_terms_in_context, unused_defined_terms: list<{term, location}>; terms_defined_multiple_times: list<{term, location1, location2}>; incorrect_section_article_paragraph_references, incorrect_party_references: list<{location, wrong, correct}>; inconsistent_terms: list<{section1, section2}>

gold_items

Column Type Description
contract_id string Joins to benchmark.contract_id
category string One of the nine categories
item_idx int32 Position within that contract's category list
term, location, location1, location2, wrong, correct, section1, section2 string (nullable) The item's fields; only the fields used by that category are set

Gold items per category: defined_terms 555, undefined_capitalized_terms 88, unused_defined_terms 88, incorrectly_capitalized_terms_in_context 44, terms_defined_multiple_times 44, inconsistent_terms 44, incorrect_section_article_paragraph_references 41, uncapitalized_defined_terms 39, incorrect_party_references 37.

model_outputs

Column Type Description
contract_id string Joins to benchmark.contract_id
category string The category prompt that produced this output
output string Raw model text (sometimes fenced in a ```json block)
n_items_parsed int32 Items recovered by scrub/eval_lib.parse_json_objects (0 if unparseable)

results

Column Type Description
model string nvidia/Gemma-4-26B-A4B-NVFP4
scoring string exact (all fields) or term_only (Appendix C ablation)
category string A category, or MACRO (9 categories)
precision, recall, f1 float64 Pooled over the 44 contracts
tp, fp, fn, n_gold int32 Counts (null on the macro rows)

Examples

benchmark (text truncated, first two items per category):

{
  "contract_id": "RaeSystemsInc_20001114_10-Q_EX-10.57_2631790_EX-10.57_Co-Branding Agreement",
  "text": "CO-BRANDING AGREEMENT  (FORM)\n\n This CO-BRANDING AGREEMENT (the \"Agreement\") is made and entered into as of Nov 5, 1999, (the \"Effective Date\") by and between NETTAXI Online Comm…",
  "n_chars": 44596,
  "gold": {
    "defined_terms": [{"term": "Impressions", "location": "1.3"}, {"term": "Intellectual Property Rights", "location": "1.4"}],
    "undefined_capitalized_terms": [{"term": "Acceptance Authority", "location": "11.1"}, {"term": "Vendor Handbook", "location": "11.2"}],
    "uncapitalized_defined_terms": [{"term": "Intellectual Property Rights", "location": "3.4"}],
    "incorrectly_capitalized_terms_in_context": [{"term": "Impressions", "location": "11.3"}],
    "unused_defined_terms": [{"term": "Renewal Option Fee", "location": "11.4"}, {"term": "Disaster Recovery Plan", "location": "11.5"}],
    "terms_defined_multiple_times": [{"term": "Confidential Information", "location1": "6.2", "location2": "11.6"}],
    "incorrect_section_article_paragraph_references": [{"location": "11.7", "wrong": "7.1", "correct": "8.1"}],
    "incorrect_party_references": [{"location": "11.8", "wrong": "Inc., a Delaware corporation with principal offices at 2165 S. Bascom Avenue", "correct": "NETTAXI Online Communities"}],
    "inconsistent_terms": [{"section1": "11.9", "section2": "11.10"}]
  }
}

gold_items:

{"contract_id": "RaeSystemsInc_…_Co-Branding Agreement", "category": "terms_defined_multiple_times", "item_idx": 0, "term": "Confidential Information", "location": null, "location1": "6.2", "location2": "11.6", "wrong": null, "correct": null, "section1": null, "section2": null}
{"contract_id": "RaeSystemsInc_…_Co-Branding Agreement", "category": "inconsistent_terms", "item_idx": 0, "term": null, "location": null, "location1": null, "location2": null, "wrong": null, "correct": null, "section1": "11.9", "section2": "11.10"}

model_outputs and results:

{"contract_id": "RaeSystemsInc_…_Co-Branding Agreement", "category": "undefined_capitalized_terms", "output": "```json\n{\"undefined_capitalized_terms\": [{\"term\": \"Acceptance Authority\", \"location\": \"11.1\"}, {\"term\": \"Vendor Handbook\", \"location\": \"11.2\"}, {\"term\": \"Goods\", \"location\": \"11.8\"}, …", "n_items_parsed": 5}
{"model": "nvidia/Gemma-4-26B-A4B-NVFP4", "scoring": "exact", "category": "defined_terms", "precision": 0.1647, "recall": 0.3694, "f1": 0.2278, "tp": 205, "fp": 1040, "fn": 350, "n_gold": 555}

Usage

from datasets import load_dataset

bench = load_dataset("arthrod/contractscrub-repro", "benchmark", split="test")
gold = load_dataset("arthrod/contractscrub-repro", "gold_items", split="test").to_polars()
print(gold.group_by("category").len())

Results (synthetic gold; not comparable to the paper)

On this stand-in, Gemma 4 26B (NVFP4) finds 47% of 980 scripted items (macro recall 0.472). The paper reports 0.365 for Gemma 4 26B on its lawyer-written gold. The two figures measure different things.

Precision (0.172) and F1 (0.238) are reported for completeness but are not meaningful here: the CUAD contracts contain pre-existing errors that the paper's lawyers annotated and this gold does not, so a correct flag of a real error counts as a false positive.

Category Gold items Recall (exact) Recall (term-only) Gold determinable?
defined_terms 555 0.369 0.995 yes
undefined_capitalized_terms 88 0.909 0.977 yes
uncapitalized_defined_terms 39 0.179 0.513 yes
incorrectly_capitalized_terms_in_context 44 0.727 0.773 disputed
unused_defined_terms 88 0.909 0.977 yes
terms_defined_multiple_times 44 0.159 0.795 partly (23 of 44 items name one location twice)
incorrect_section_article_paragraph_references 41 0.000 0.000 no
incorrect_party_references 37 0.081 0.108 no
inconsistent_terms 44 0.909 1.000 yes

Term-only macro recall over the paper's eight term-only categories (its Table 5 has no Inconsistent Language row) is 0.642.[^1] Defined Terms rises from 0.369 exact to 0.995 term-only mostly because the gold records "body" where the prompt tells the model to answer "P" or "Recitals" (see below).

[^1]: Averaging all nine categories, as results.json does, gives 0.682.

Of the 396 outputs, 3 do not parse as JSON (python scrub/score.py); the n_unparsed_outputs: 256 in results.json counted every output that did not begin with {, including fenced JSON that parses.

Limitations: known defects of the synthetic gold

  • Section references: the "correct" section is chosen at random from the contract, so the right answer cannot be determined from the text; the 0.000 recall is an artifact, not a measurement.
  • Party references: the injected clause swaps in the other party with no contextual basis that makes the swap detectable. The extracted "other party" string can also be a fragment of the recitals rather than a party name (first contract: wrong = "Inc., a Delaware corporation with principal offices at 2165 S. Bascom Avenue").
  • Capitalised in context: the injected clause uses the term generically in lower case and mentions the capitalised form only to say it remains governed by the agreement; it contains no such error.
  • Defined multiple times: when the original definition is not found, both gold locations are the injected clause; 23 of the 44 items name one location twice and cannot be matched under exact scoring.
  • Locations: gold uses "body" for anything before the first numbered heading and bare numbers inside schedules, contradicting the prompt's location rules.
  • Placement: every injected clause is appended after the original text, after the signature block and schedules, as a new numbered section; each contract receives the same fixed sentences.
  • Contracts are 44 CUAD agreements chosen by seed, not the paper's 44.
  • Model and decoding: nvidia/Gemma-4-26B-A4B-NVFP4 (FP4 quantisation) on vLLM, temperature 0.0; the paper used Google's endpoint and temperature 0.6.
  • Prompts are paraphrased from the paper's Appendix G, not verbatim: Undefined Capitalized Terms has 8 exclusions against the paper's 7 and drops "References to agreement sections, exhibits, and schedules"; Terms Defined Multiple Times drops "A term that is merely repeated with the same meaning is NOT an error" and adds a sentence not in the paper; Incorrect References drops the "list each reference as a SEPARATE item" rule and changes the example; the location rules drop the "Attachment X Section Y" rule; an AGREEMENT: trailer is added.

Reproduce

# 1. Re-score the published outputs, no GPU (prints the table above and the diagnostics)
python scrub/score.py --benchmark benchmark/benchmark.jsonl --raw results/raw_outputs.jsonl

# 2. Regenerate the benchmark from CUAD v1 (theatticusproject/cuad, full_contract_txt/)
python scrub/make_synthetic.py --help

# 3. Re-run the model (one A100 80 GB; the published run took 11 minutes, 288 s of generation)
VLLM_USE_FLASHINFER_SAMPLER=0 python scrub/run_eval.py --benchmark benchmark/benchmark.jsonl \
    --out-dir results --model nvidia/Gemma-4-26B-A4B-NVFP4

Versions: requirements.txt (vllm 0.29.0, trackio 0.37.1, huggingface_hub 1.31.0). The published run used Hugging Face Jobs, flavor a100-large, image ghcr.io/astral-sh/uv:python3.12-bookworm, running scrub/job_bootstrap.py with HF_TOKEN passed as a job secret. kv_cache_dtype is forced to bfloat16 because the NVFP4 checkpoint requests an FP8 KV cache the Triton backend did not support on the first (A10G) attempt.

Contents

  • SCORING.md: walkthrough of the deterministic multiset scoring
  • scrub/prompts.py: the nine categories and prompt assembly (paraphrased from the paper's Appendix G)
  • scrub/eval_lib.py: parsing, normalisation, location canonicalisation, multiset scoring
  • scrub/make_synthetic.py: the stand-in benchmark generator
  • scrub/run_eval.py, scrub/job_bootstrap.py: the model run
  • scrub/score.py: re-scoring without a GPU
  • tests/: checks that score.py re-derives every number in results.json and that the docs keep their corrections
  • benchmark/benchmark.jsonl, results/: the benchmark, raw outputs and results (also as parquet under data/, see Configs)

Attribution and licences

  • Contract text: CUAD v1, The Atticus Project, CC BY 4.0, modified here by scripted error injection.
  • Category definitions and prompt text: adapted from Bang et al., arXiv:2608.20204, CC BY-NC-SA 4.0.
  • Licence for this repo's code and data: not yet set.
@misc{contractscrub2026, title={ContractScrub: A benchmark for final review of legal contracts},
  author={Bang and others}, year={2026}, eprint={2608.20204}, archivePrefix={arXiv}}
@article{hendrycks2021cuad, title={CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review},
  author={Hendrycks, Dan and Burns, Collin and Chen, Anya and Ball, Spencer}, journal={NeurIPS}, year={2021}}
Downloads last month
199

Paper for arthrod/contractscrub-repro