The CUAD dataset
The Contract Understanding Atticus Dataset is a legal AI benchmark: 510 commercial contracts annotated across 41 clause categories (the CUAD v1 distribution ships the contracts and annotations as JSON). Each annotation carries the clause text span plus an expert Yes/No answer for whether the clause type is present.
What we extract per contract
contract_name,contract_type(NDA, license, service, etc.), party names.- Per clause category:
answer(Yes/No/NA), annotatedtextspan, character offsets.
Parsing reference: ingest/load_cuad.py in this repo.
The synthetic law-firm layer (Faker)
Faker (Python) generates deterministic, obviously-fictional records. We fix a random seed so every rebuild is reproducible and board reviewers see stable data.
| Entity | Representative fields | Purpose in the demo |
|---|---|---|
client | client_id, name, industry, region, contact | Owns matters; drives PII masking |
employee | employee_id, name, title, practice, role | Attorneys, paralegals, compliance officers |
matter | matter_id, client_id, name, confidentiality_level, opened_on, lead_attorney | The confidentiality boundary |
matter_assignment | matter_id, employee_id, assignment_role | Working assignments (for reporting) |
matter_authorization | matter_id, employee_id, access_level, valid_from, valid_to | Source of truth for row access |
contract_attachment | matter_id, contract_id, executed_on | Links a CUAD contract to a fictional matter |
access_approval | matter_id, employee_id, approved_by, approved_on | Shows governance workflow |
Logical relationships
Contracts and the business layer meet at a bridge, because a contract can serve more than one matter and a matter can hold more than one contract.
client 1---* matter *---* contract (via contract_attachment)
matter 1---* fact_clause *---1 dim_contract
matter 1---* matter_authorization *---1 employee
matter 1---* matter_assignment *---1 employee
contract 1---* fact_clause *---1 dim_clause_category
| Schema | Object | Grain / notes |
|---|---|---|
| RAW | raw_cuad_contracts, raw_cuad_clauses | VARIANT JSON as landed; no logic |
| RAW | raw_synthetic_* | Faker CSV/JSON staging |
| CORE | dim_client, dim_employee, dim_matter, dim_contract, dim_clause_category | Conformed dimensions |
| CORE | fact_clause | One row per (contract, clause category) |
| CORE | bridge_matter_contract | Resolves the many-to-many |
| CORE | matter_authorization | Row access mapping table |
| MARTS | mart_matter_risk, mart_high_risk_register | Board-facing outputs |
Full DDL: sql/02_data_model.sql.
Data-quality checks
Every load ends with referential-integrity and completeness assertions. Failures are surfaced, never silently dropped.
-- Orphaned clauses (no matching contract)
SELECT f.contract_id, COUNT(*)
FROM core.fact_clause f
LEFT JOIN core.dim_contract c USING (contract_id)
WHERE c.contract_id IS NULL
GROUP BY 1;
-- Matters with no authorized attorney (governance gap)
SELECT m.matter_id
FROM core.dim_matter m
LEFT JOIN core.matter_authorization a USING (matter_id)
WHERE a.matter_id IS NULL;
-- Clause coverage vs CUAD's 41 categories
SELECT COUNT(DISTINCT clause_category_id) AS categories_present
FROM core.fact_clause;
-- Contracts attached to more than one matter (expected for the bridge)
SELECT contract_id, COUNT(DISTINCT matter_id) AS matters
FROM core.bridge_matter_contract GROUP BY 1 HAVING matters > 1;
Attribution & disclaimers
- CUAD: The Atticus Project, CC BY 4.0 — linked on every page footer and in the raw tables.
- Contract-to-matter assignments are fictional and exist only to demonstrate the data model.
- No personal data of real people is used; all individuals are synthetic.