docclass-pilot / README.md
Lucius-Morningstar's picture
KANBAN-084: pilot dataset (stratified type×subtype slice of docclass-merged v5)
c37469e verified
|
Raw
History Blame Contribute Delete
5.18 kB
---
license: cc-by-4.0
task_categories:
- text-classification
language:
- en
tags:
- legal
- insurance
- contracts
- merger-agreements
- corporate-records
- correspondence
- document-classification
- evaluation
- llm-mailroom
pretty_name: "Docclass Pilot Sample (stratified type x subtype slice of docclass-merged v5)"
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: train
path: parquet/default/train/train-*.parquet
- split: test
path: parquet/default/test/test-*.parquet
- config_name: ground_truth
data_files:
- split: train
path: parquet/ground_truth/train/train-*.parquet
- split: test
path: parquet/ground_truth/test/test-*.parquet
---
# Docclass Pilot Sample
Deterministic stratified pilot slice of
[Lucius-Morningstar/docclass-merged](https://huggingface.co/datasets/Lucius-Morningstar/docclass-merged) **v5**
(KANBAN-084, built 2026-08-24): every doc type and every subclass stratum
present in the parent contributes at least one row; each stratum contributes
at most `3` rows, selected by ascending sha256(filename) within the
stratum (content-addressed order — decorrelated from the md5-keyed family
split rule; rebuilds are byte-identical).
## Coverage
| doc_type | rows | subclasses covered |
|---|---:|---|
| `contract` | 78 | 26 (Affiliate_Agreements, Agency Agreements, Co_Branding, Collaboration, Consulting Agreements, Development, Distributor, Endorsement, Franchise, Hosting, IP, Joint Venture, Joint Venture _ Filing, License_Agreements, Maintenance, Manufacturing, Marketing, Non_Compete_Non_Solicit, Outsourcing, Promotion, Reseller, Service, Sponsorship, Strategic Alliance, Supply, Transportation) |
| `corporate_record` | 11 | 5 (articles_of_incorporation, bylaws, other, powers_of_attorney, rights_instrument) |
| `correspondence` | 24 | 8 (attorney_demand, demand, email, letter, meeting_request, memo, notice, press_release) |
| `insurance_claim` | 12 | 4 (carrier, inpatient, outpatient, pde) |
| `merger_agreement` | 13 | 5 (all_cash, all_stock, mixed_cash_stock, mixed_cash_stock_election, other) |
Total: **138 rows** across 48 subclass strata / 5 doc types (100% of strata present in the parent).
## Configs (KANBAN-079 separation-of-concerns doctrine)
* **default** (blind): `filename`, `doc_text`, `prompt`, `metadata`. What the
Mailroom pipeline agents see. ZERO answer-key columns.
* **ground_truth**: `filename` + `expected` (doc_type) + `expected_subclass`
+ promoted GT fields — the six legacy enrichment keys plus the 13
`InsuranceClaimExtraction` keys for the insurance_claim rows (null on other
classes). Join 1:1 on `filename`; scorers use standard split joins.
```python
from datasets import load_dataset
blind = load_dataset("Lucius-Morningstar/docclass-pilot", "default")
keys = load_dataset("Lucius-Morningstar/docclass-pilot", "ground_truth")
```
This is separation of concerns, NOT encryption — the Hub is public; anyone
may load the ground_truth config explicitly.
## Provenance
* Parent: [Lucius-Morningstar/docclass-merged](https://huggingface.co/datasets/Lucius-Morningstar/docclass-merged)
@ revision `407bf55c993a006689aa1b6e03e57c428c852e98` (v5: adds the
insurance_claim class).
* Claims source: [Lucius-Morningstar/cms-desynpuf-insurance-claims](https://huggingface.co/datasets/Lucius-Morningstar/cms-desynpuf-insurance-claims)
(CMS DE-SynPUF 2008-2010 Sample 1 rendered EOBs, produced by
[Exios66/claims-data-eda](https://github.com/Exios66/claims-data-eda),
verbatim-GT contract aligned to llm-mailroom's InsuranceClaimExtraction).
* Splits: inherited from the family single-source rule
(`md5(filename) % 10 == 0 -> test`). Claims-side note: the claims repo had
keyed its own placement on record_id; at v5 fusion the FAMILY rule won,
moving 65/400 rows — the pilot inherits the reconciled family splits.
* Builder: `scripts/datasets/build_docclass_pilot.py` in
[Exios66/llm-entity-extraction](https://github.com/Exios66/llm-entity-extraction).
## Honest gaps
* Heuristic ground truth on the legacy four classes (family labeler; see the
parent card). Claims GT is exact-but-synthetic (verbatim renderer contract).
* SynPUF claims are PAID claims only: `coverage_determination` is always
"approved", `denial_reasons` always empty, `adjuster` always null, single
line of business (`health`). Fully synthetic data — evaluation substrate,
not epidemiology (CMS caveat).
* Family scope is FIVE doc classes: contract, merger_agreement, correspondence,
corporate_record, insurance_claim. court_opinion and compliance_filing were
removed from the dataset family's scope by human directive (2026-08-23) —
no upstream corpora exist. This does NOT change llm-mailroom's runtime taxonomy.
* PII: legacy Enron-derived correspondence rows may contain real names and
addresses (inherited from the parent; disclosed there too). Claims rows use
deterministic pseudonyms.
## Citation
```bibtex
@misc{docclass_pilot_2026,
title = {Docclass Pilot Sample (KANBAN-084)},
author = {Lucius-Morningstar},
year = {2026},
url = {https://huggingface.co/datasets/Lucius-Morningstar/docclass-pilot}
}
```