Datasets:
|
Download README.md from micro1-inc/ContractBench: direct link, hf CLI and curl.
- Browser
- Download file 8.43 kB
-
https://huggingface.co/datasets/micro1-inc/ContractBench/resolve/main/README.md
- Command line
-
hf download hf://datasets/micro1-inc/ContractBench/README.md
-
curl -L -o README.md https://huggingface.co/datasets/micro1-inc/ContractBench/resolve/main/README.md
8.43 kB
| pretty_name: ContractBench | |
| license: cc-by-4.0 | |
| task_categories: | |
| - text-generation | |
| language: | |
| - en | |
| tags: | |
| - legal | |
| - contract-redlining | |
| - docx | |
| - tracked-changes | |
| - llm-judge | |
| - agents | |
| - harbor | |
| - benchmark | |
| size_categories: | |
| - n<1K | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: test | |
| path: data/tasks.parquet | |
| # ContractBench | |
| ContractBench measures how well an AI agent reviews and redlines a commercial contract the way an in-house attorney | |
| would: deciding where to intervene, what to change, what to leave alone, when to ask the counterparty a question, and | |
| when to escalate a point to its own side instead of deciding it. Every task is a real Word document, a set of grounding | |
| documents (the represented side's commercial context and, in most scenarios, its playbook), and a brief. The agent | |
| works directly in the `.docx` with tracked changes and comments, and is graded against pass-or-fail criteria written by | |
| the attorney who reviewed the same contract. | |
| **Benchmark Report**: https://www.ivo.ai/research/ivo-micro1-contractbench and https://www.micro1.ai/benchmark/ivo-micro1-contract-bench | |
| **Methodology and Runner**: https://github.com/micro1-research/contract-bench | |
| This repository holds the **public set** of the benchmark: 210 tasks from 21 scenarios, each a | |
| complete, runnable [Harbor](https://github.com/laude-institute/harbor) task. A private set of 140 tasks from 14 further | |
| scenarios is held out; the leaderboard below reports model scores on both sets. | |
| ## Leaderboard | |
| | Model | Private score (140 held-out tasks) | Public score (210 tasks) | Full benchmark (350 tasks) | Completion rate (all 350 tasks) | | |
| | --- | ---: | ---: | ---: | ---: | | |
| | Grok 4.7 | 58.3% | 58.3% | 58.3% | 99.5% | | |
| | Opus 5.5 | 58.3% | 58.0% | 58.1% | 80.8% | | |
| | Kimi K3 | 56.7% | 57.4% | 57.1% | 100.0% | | |
| | Gemini 3.8 Flash | 55.4% | 54.8% | 55.0% | 99.8% | | |
| | GLM-5.3 | 55.4% | 54.8% | 55.0% | 95.2% | | |
| | DeepSeek V4 Pro | 49.1% | 47.9% | 48.4% | 99.5% | | |
| | GPT-6 Astra | 45.3% | 45.8% | 45.6% | 100.0% | | |
| ## Design | |
| A scenario is one contract negotiation: a contract, the two parties, the represented side's commercial context and, | |
| in most scenarios, its playbook. Each scenario yields ten tasks. | |
| - **Turn 1 (opening redline).** Five attorneys independently reviewed the same clean contract for the same side, each | |
| producing a redline and a rubric set. The five tasks share one input; a model's Turn 1 redline is graded against all | |
| five rubric sets, so the benchmark scores it against the range of defensible attorney approaches rather than one | |
| reference. | |
| - **Turn 2 (response).** Five more tasks start from one of those Turn 1 redlines, now seen from the other side: the | |
| model represents the counterparty and responds to an existing markup, accepting, rejecting, countering or | |
| introducing new edits. | |
| | Dimension | Coverage in this set | | |
| | --- | --- | | |
| | Agreement types | MSA: 4 scenarios; IP Licensing: 5 scenarios; Research Partnership: 4 scenarios; Marketing Agreement: 4 scenarios; Commercial Lease: 4 scenarios | | |
| | Playbook | none: 3; single-agreement: 11; multi-contract: 7 | | |
| | Jurisdiction | US: 18; UK: 3 | | |
| | Tasks | 210 (105 Turn 1, 105 Turn 2) | | |
| | Rubric items | 3,521 | | |
| ## What a task directory contains | |
| ``` | |
| tasks/<task name>/ | |
| task.toml Harbor task definition: name, description, metadata, container and verifier settings | |
| instruction.md the brief the agent receives: who it represents, the redlining toolkit, the turn, the grounding files | |
| environment/ | |
| Dockerfile python:3.12-slim with the redlining toolkit; copies app/ and skills/ into the image | |
| app/contract.docx the Word document to redline (Turn 2: the counterparty's tracked-change markup) | |
| app/grounding/ the represented side's commercial context and playbook, as PDF or Word files | |
| skills/contract-redliner/ the scripts the agent uses to read the contract and write tracked changes, comments and escalations | |
| tests/ | |
| test.sh, judge.py, ... the grader (validity gate, change list, judge panel) | |
| rubrics.json the attorney's rubric items for this task | |
| baseline/contract.docx the input, kept for the grader's diff | |
| references/<task name>.docx the attorney's own redline for the task (see references/README.md) | |
| data/tasks.parquet one row per task (the dataset viewer) | |
| registry.json the Harbor dataset manifest | |
| leaderboard.md, leaderboard.csv | |
| ``` | |
| ### Task names | |
| `<agreement>-<party>-<counterparty>-t<turn>-<attorney>`, for example `ip-whithill-hartsong-t1-a` and | |
| `ip-whithill-hartsong-t2-c`. | |
| - `agreement`: `msa`, `ip`, `rpa` (research partnership), `mktg`, `lease`. | |
| - The two party words name the scenario; the Turn 1 side comes first, so both turns of a scenario share the prefix. | |
| - `t1-a` to `t1-e` are the five attorneys' Turn 1 tasks. A Turn 2 task carries the letter of the Turn 1 redline it | |
| answers: `t2-c` starts from the redline of attorney C. `task.toml` records this as `responds_to`. | |
| ### Metadata in task.toml | |
| `[metadata]` holds the scenario, agreement type, jurisdiction, playbook level, turn, side, the parties, the author | |
| string the agent must use, the attorney letter, `responds_to`, a numeric `expert_id` for the attorney who wrote the | |
| redline and rubric set (the same number identifies the same attorney across tasks; the mapping to people is private), | |
| the rubric counts by required action and priority, the total rubric weight, and the split. | |
| ## Rubrics and grading | |
| Each attorney completed the redline before writing roughly 10 to 20 rubric items for it. A rubric item names the | |
| contract section, the **required action** (Edit, Preserve, Comment or Escalate; on Turn 2, Edit splits into Reject, | |
| Counter and New Edit, and Preserve into Accept and Leave Untouched), a **priority** (High, Medium or Low, weighted 3, 2 | |
| or 1), an **evaluation dimension** (Issue Prioritization, Negotiation Restraint, Situational Judgment, Escalation | |
| Judgment or Standard Position Execution), the condition the redline must satisfy, and the attorney's justification. | |
| Grading runs in `tests/`: | |
| 1. A **validity gate** diffs the returned document against the input and rejects a deliverable that changed text | |
| outside tracked changes or altered the counterparty's markup. | |
| 2. A **change list** is built from the document: the model's edits by section, how each counterparty change was | |
| handled, the model's comments and escalations, and the resulting text of each section. | |
| 3. A **panel of three judge models** from different providers (Claude Opus 4.8, GPT-5.5 and Gemini 3.5 Flash) reads | |
| that record and grades every rubric item Pass or Fail; a strict majority decides. | |
| 4. The **task score** is the earned rubric weight divided by the total rubric weight. | |
| A rollout that reaches the token limit or fails the gate receives no score and counts against the model's completion | |
| rate. | |
| ## Running the benchmark | |
| The tasks run with Harbor (0.18 or later) and Docker. Git LFS must be installed: the Word and PDF files are stored | |
| with LFS, and without it the task images fail to build on purpose rather than run on placeholder files. | |
| Run the whole set straight from this repository: | |
| ```bash | |
| harbor run --repo https://huggingface.co/datasets/micro1-inc/ContractBench@v1.0 -d contractbench-public@1.0 \ | |
| -a <agent> -m <model> --env-file .env | |
| ``` | |
| Or download it first and run from the local copy: | |
| ```bash | |
| hf download micro1-inc/ContractBench --repo-type dataset --local-dir ContractBench | |
| harbor run -p ContractBench/tasks -a <agent> -m <model> --env-file .env | |
| ``` | |
| `.env` holds the provider keys for the agent and for the judge panel: `ANTHROPIC_API_KEY` (required by the grader), | |
| `OPENAI_API_KEY` and `GEMINI_API_KEY` (a missing panel member is dropped from the vote). Use `-i '<glob>'` to run a | |
| subset of tasks, for example `-i 'msa-*-t1-*'`. Each trial's `reward.json` holds the task score; the redlined document | |
| is captured as the trial's artifact. | |
| ## Anonymization | |
| All contracts, grounding documents and redlines are fictional material written by attorneys for this benchmark; the | |
| parties, people and events in them are invented. All personal identifiers of the attorneys who produced the redlines | |
| and rubrics have been stripped from the files and the metadata. Each attorney is recorded only as a numeric | |
| `expert_id`, which identifies the same attorney across tasks. | |