Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
id: string
bucket: string
contracts: list<item: string>
child 0, item: string
state_tokens: int64
questions: null
_meta: struct<id: string, doc_id: string, source: string, group_id: string, variant: string, split: string, (... 55 chars omitted)
child 0, id: string
child 1, doc_id: string
child 2, source: string
child 3, group_id: string
child 4, variant: string
child 5, split: string
child 6, bucket: string
child 7, state_tokens: int64
child 8, contracts: int64
state: string
to
{'state': Value('string'), 'questions': Json(decode=True), '_meta': {'id': Value('string'), 'doc_id': Value('string'), 'source': Value('string'), 'group_id': Value('string'), 'variant': Value('string'), 'split': Value('string'), 'bucket': Value('string'), 'state_tokens': Value('int64'), 'contracts': Value('int64')}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1827, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 613, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
id: string
bucket: string
contracts: list<item: string>
child 0, item: string
state_tokens: int64
questions: null
_meta: struct<id: string, doc_id: string, source: string, group_id: string, variant: string, split: string, (... 55 chars omitted)
child 0, id: string
child 1, doc_id: string
child 2, source: string
child 3, group_id: string
child 4, variant: string
child 5, split: string
child 6, bucket: string
child 7, state_tokens: int64
child 8, contracts: int64
state: string
to
{'state': Value('string'), 'questions': Json(decode=True), '_meta': {'id': Value('string'), 'doc_id': Value('string'), 'source': Value('string'), 'group_id': Value('string'), 'variant': Value('string'), 'split': Value('string'), 'bucket': Value('string'), 'state_tokens': Value('int64'), 'contracts': Value('int64')}}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1879, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
state string | questions unknown | _meta dict |
|---|---|---|
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: 2ThemartComInc_19990826_10-12G_EX-10.10_6700288_EX-10.10_Co-Branding Agreement_ Agency Agreement =====
CO-BRANDING AND ADVERTISING AGREEMENT
THIS CO-BRANDING AND ADVERTISING AGREEMENT (the "Agreement") is m... | {
"c000_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"2ThemartComInc_19990826_10-12G_EX-10.10_6700288_EX-10.10_Co-Branding Agreement_ Agency Agreement\" in this file. Does one party have the right to terminate or is consent or notice required of the counterparty if su... | {
"id": "packed-contracts-v0/alone/0000",
"doc_id": "packed-contracts-v0/alone/0000",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0000",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 6568,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ABILITYINC_06_15_2020-EX-4.25-SERVICES AGREEMENT =====
EXHIBIT 4.25 INFORMATION IN THIS EXHIBIT IDENTIFIED BY [ * * * ] IS CONFIDENTIAL AND HAS BEEN EXCLUDED BECAUSE IT IS BOTH (I) NOT MATERIAL AND (II) WOUL... | {
"c001_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ABILITYINC_06_15_2020-EX-4.25-SERVICES AGREEMENT\" in this file. Is consent or notice required of a party if the contract is assigned to a third party?",
"label": true,
"src": "cuad_presence_found"
},
"... | {
"id": "packed-contracts-v0/alone/0001",
"doc_id": "packed-contracts-v0/alone/0001",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0001",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 5431,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ADIANUTRITION,INC_04_01_2005-EX-10.D2-RESELLER AGREEMENT =====
Exhibit 10d-2
RESELLER AGREEMENT
BY AND BETWEEN
PIVX CORPORATION
AND
DETTO TECHNOLOGIES
This Reseller Agreement is entered as of this... | {
"c002_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ADIANUTRITION,INC_04_01_2005-EX-10.D2-RESELLER AGREEMENT\" in this file. Does the contract contain a license granted by one party to its counterparty?",
"label": true,
"src": "cuad_presence_found"
},
"c... | {
"id": "packed-contracts-v0/alone/0002",
"doc_id": "packed-contracts-v0/alone/0002",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0002",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 5750,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ADUROBIOTECH,INC_06_02_2020-EX-10.7-CONSULTING AGREEMENT =====
Exhibit 10.7
CONSULTING AGREEMENT
Aduro Biotech, Inc., with a place of business at 740 Heinz Avenue, Berkeley, CA 94710 ("Aduro") and IREYA B.... | {
"c003_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ADUROBIOTECH,INC_06_02_2020-EX-10.7-CONSULTING AGREEMENT\" in this file. Can a party terminate this contract without cause (solely by giving a notice and allowing a waiting period to expire)?",
"label": true,... | {
"id": "packed-contracts-v0/alone/0003",
"doc_id": "packed-contracts-v0/alone/0003",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0003",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 2476,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ADUROBIOTECH,INC_06_02_2020-EX-10.7-CONSULTING AGREEMENT(1) =====
Exhibit 10.7
CONSULTING AGREEMENT
Aduro Biotech, Inc., with a place of business at 740 Heinz Avenue, Berkeley, CA 94710 ("Aduro") and IREYA... | {
"c004_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ADUROBIOTECH,INC_06_02_2020-EX-10.7-CONSULTING AGREEMENT(1)\" in this file. Is there a restriction on a party’s soliciting or hiring employees and/or contractors from the counterparty, whether during the contract ... | {
"id": "packed-contracts-v0/alone/0004",
"doc_id": "packed-contracts-v0/alone/0004",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0004",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 2479,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ALCOSTORESINC_12_14_2005-EX-10.26-AGENCY AGREEMENT =====
Exhibit 10.26
AGENCY AGREEMENT
THIS AGENCY AGREEMENT, dated November 9, 2005 ("Agreement"), between General Electric Capital Corporation, a Delaware... | {
"c005_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ALCOSTORESINC_12_14_2005-EX-10.26-AGENCY AGREEMENT\" in this file. Can a party terminate this contract without cause (solely by giving a notice and allowing a waiting period to expire)?",
"label": true,
"... | {
"id": "packed-contracts-v0/alone/0005",
"doc_id": "packed-contracts-v0/alone/0005",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0005",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 2441,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: AMERICASSHOPPINGMALLINC_12_10_1999-EX-10.2-SITE DEVELOPMENT AND HOSTING AGREEMENT =====
EXHIBIT 10.2
SITE DEVELOPMENT AND HOSTING AGREEMENT
This SITE DEVELOPMENT AND HOSTING AGREEMENT (the "Agreement") d... | {
"c006_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"AMERICASSHOPPINGMALLINC_12_10_1999-EX-10.2-SITE DEVELOPMENT AND HOSTING AGREEMENT\" in this file. Is there a restriction on the ability of a party to compete with the counterparty or operate in a certain geography ... | {
"id": "packed-contracts-v0/alone/0006",
"doc_id": "packed-contracts-v0/alone/0006",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0006",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 3909,
"contracts": 1
} |
Contract review file: 1 commercial contracts filed with the SEC, in no particular order.
===== Contract 1 of 1: ASHWORTHINC_01_29_1999-EX-10.(D)-PROMOTION AGREEMENT AND NANTZ COMMUNICATIONS, INC. =====
EXHIBIT 10(d)
PROMOTION AGREEMENT ASHWORTH, INC., JAMES W. NANTZ III AND NANTZ COMMUNICATIONS, INC. THIS AGREEMENT i... | {
"c007_presence_found": {
"type": "noul",
"instructions": "Consider only the contract titled \"ASHWORTHINC_01_29_1999-EX-10.(D)-PROMOTION AGREEMENT AND NANTZ COMMUNICATIONS, INC.\" in this file. Is consent or notice required of a party if the contract is assigned to a third party?",
"label": true,
"s... | {
"id": "packed-contracts-v0/alone/0007",
"doc_id": "packed-contracts-v0/alone/0007",
"source": "packed_cuad",
"group_id": "packed-contracts-v0/alone/0007",
"variant": "clean",
"split": "development",
"bucket": "alone",
"state_tokens": 4970,
"contracts": 1
} |
"Contract review file: 1 commercial contracts filed with the SEC, in no particular order.\n\n===== C(...TRUNCATED) | {"c008_presence_found":{"type":"noul","instructions":"Consider only the contract titled \"AULAMERICA(...TRUNCATED) | {"id":"packed-contracts-v0/alone/0008","doc_id":"packed-contracts-v0/alone/0008","source":"packed_cu(...TRUNCATED) |
"Contract review file: 1 commercial contracts filed with the SEC, in no particular order.\n\n===== C(...TRUNCATED) | {"c009_presence_found":{"type":"noul","instructions":"Consider only the contract titled \"ArconicRol(...TRUNCATED) | {"id":"packed-contracts-v0/alone/0009","doc_id":"packed-contracts-v0/alone/0009","source":"packed_cu(...TRUNCATED) |
Packed contracts
A long context test for decision models: pack several real contracts into one review file and ask about every contract in it, not one needle.
121 commercial contracts from CUAD, each with the questions of Kev's long-document contract benchmark: two "does the contract contain this clause?" questions, a clause-category choice and, where the governing law is a common one, a jurisdiction choice. Labels are CUAD's lawyer annotations. The same contracts are asked alone, then packed into review files of 16k, 32k and 64k tokens, holding about 3, 7 and 14 contracts each. Because every contract is also asked alone, accuracy at each length pairs with the same model's score on the contract by itself.
Packing hurts far less here than on packed-complaints, where a 64k input holds about 246 short complaints: here it holds about 14 long, distinctively named contracts.
Reference scores
Accuracy over all 1,773 questions, scored with Kev's own scorer. Runs are from the code repo; none of them trained on CUAD.
| Model | Alone | 16k (3) | 32k (7) | 64k (14) |
|---|---|---|---|---|
| Kev-0.8B 1.0 | 0.709 | 0.683 | 0.639 | 0.620 |
Self-taught on complaints (fresh-32k, mean of 2 runs) |
0.712 | 0.732 | 0.694 | 0.667 |
Self-taught, plus ContractNLI NDAs (fresh-32k-ndas) |
0.729 | 0.735 | 0.708 | 0.701 |
Same, with Kev-27B as the teacher (fresh-32k-ndas-kev27b) |
0.744 | 0.733 | 0.710 | 0.732 |
Trained on real complaint labels (labels-32k) |
0.714 | 0.718 | 0.694 | 0.691 |
Contents
One suite, packed-contracts-v0/, in Kev's format (manifest.json + development.jsonl), scored with kev.benchmark --suite.
index.json maps each record to its length and contracts.
| Length | Review files | Contracts per file |
|---|---|---|
| alone | 121 | 1 |
| 16k | 37 | about 3 |
| 32k | 17 | about 7 |
| 64k | 8 | about 14 |
207 records in all: a long file's questions are split into groups that share the file, so Kev's scorer fits in GPU
memory; every question is still answered on its own. A record is one review file (state) and its questions, each
naming its contract by title:
{"state": "Contract review file: 1 commercial contracts filed with the SEC, in no particular order.\n\n===== Contract 1 of 1: 2ThemartComInc_19990826_..._Co-Branding Agreement_ Agency Agreement =====\n...",
"questions": {"...": {"type": "noul",
"instructions": "Consider only the contract titled \"2ThemartComInc_..._Co-Branding Agreement_ Agency Agreement\" in this file. Does one party ...",
"label": true}, "...": "..."}}
How it was built
- Contracts. CUAD v1 (
theatticusproject/cuad@ a3c393f), at most 7,500 tokens each. Only the contracts that Kev's long-document benchmark (longdoc-v1) assigns to its development partition are used, dealt with Kev's own function, so its locked test contracts are never included. Contracts from one company never share a file. - Questions and labels. Kev's longdoc-v1 builder (
scripts/build_longdoc_v1.py@ a0255ce), with CUAD's lawyer annotations as labels. No model is involved in labelling. - Packing. Whole contracts packed first-fit into review files filling 70–93% of their nominal length under the Qwen3.5 tokenizer, in a fresh random order at every length.
Licence and credit
CC BY 4.0, as CUAD. Changes from CUAD: contracts selected as above, set in Kev's review-file layout, packed into files of 16k–64k tokens, and given Kev's questions.
- CUAD: Dan Hendrycks, Collin Burns, Anya Chen and Spencer Ball, "CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review", NeurIPS 2021 Datasets and Benchmarks; The Atticus Project. CC BY 4.0.
- Kev by Jared Palmer (Apache-2.0): the review-file layout, the question wording and the partition dealing.
- Downloads last month
- 33