legal-clausesContract clause types
Labels a single contract provision with its clause type, such as governing law, notices or confidentiality.
Data: Public data: LEDGAR (clauses from SEC filings)
Trained on Jeff v1.2. Will be retrained on v1.3. Roadmap
Use it when
- You have a contract split into provisions and want each one labelled with a clause type.
- Your contracts are commercial or employment agreements written in English, like those filed with the US SEC.
- You can use the 100 LEDGAR clause types, or a subset of them, as your options.
Not a good fit when
- Your contracts are not in English, or follow a legal system very different from the US. All training text comes from US SEC filings.
- You need legal advice or a judgement on whether a clause is fair or enforceable. The adapter only names the clause type.
- You pass a whole contract at once. It was trained on one provision at a time.
- You need your own clause types. Training used the LEDGAR labels only.
Request format
The state is an object with these fields, in this order. Only provision changes from request to request, so it comes last and the rest can be prepared in advance.
| State field | Changes per request | What goes in it |
|---|---|---|
document | No | One sentence about the document the provision comes from. In training this was always "A commercial contract filed with the U.S. Securities and Exchange Commission (SEC)". |
provision | Yes | The text of one contract provision. |
| Question | Type | What it decides |
|---|---|---|
clause_type | Choice | Which type of clause the provision is, judged by its main topic. Options: 100 LEDGAR clause types, each with a snake_case key such as governing_laws and a one-line description. The full list is LEDGAR in descriptions.py in the source. |
- Use the option keys and descriptions from descriptions.py; the adapter was trained on them.
- Several clause types are close in meaning (for example assignments and assigns). Expect probability to be shared between them.
- Use the instructions below word for word; the adapter was trained mostly on them.
General rules for every request are in the request format guide.
Example
The same request three ways. It assumes a Jeff server on your machine with this adapter loaded (see Install).
from jeff import Client
from jeff.client import choice_question
jeff = Client("http://localhost:8765", model="legal-clauses")
state = {
"document": "A commercial contract filed with the U.S. Securities and Exchange Commission (SEC)",
"provision": "This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of laws principles.",
}
answers = jeff.ask(state, {
"clause_type": choice_question(
{
"governing_laws": "Governing law: which state's or country's law governs the contract.",
"notices": "Notices: how formal notices must be given, and to which addresses.",
"confidentiality": "Confidentiality: keeping information secret and limits on using or disclosing it.",
"terminations": "Termination: how and when the contract or employment can be ended, and what follows.",
"assignments": "Assignments: whether and how a party may transfer its rights or duties under the contract to someone else.",
"severability": "Severability: if one provision is invalid, the rest of the contract remains in force.",
"entire_agreements": "Entire agreement: the contract is the whole agreement and replaces all earlier agreements on the subject.",
"indemnifications": "Indemnification: one party must compensate and defend the other against losses and claims.",
"counterparts": "Counterparts: the contract may be signed in separate copies, including electronic signatures, which together form one agreement.",
"waiver_of_jury_trials": "Waiver of jury trial: the parties give up the right to a jury trial in disputes.",
"amendments": "Amendments: how the contract can be amended, usually only in writing signed by the parties.",
},
"Which type of clause is this contract provision? Choose the clause type that best matches the main topic of the provision.",
),
})
print("clause_type", answers.choice("clause_type").key)import { Client, choiceQuestion } from '@jeff/client';
const jeff = new Client({ url: 'http://localhost:8765', model: 'legal-clauses' });
const state = {
document: 'A commercial contract filed with the U.S. Securities and Exchange Commission (SEC)',
provision: 'This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of laws principles.',
};
const answers = await jeff.ask(state, {
clause_type: choiceQuestion(
{
governing_laws: 'Governing law: which state\'s or country\'s law governs the contract.',
notices: 'Notices: how formal notices must be given, and to which addresses.',
confidentiality: 'Confidentiality: keeping information secret and limits on using or disclosing it.',
terminations: 'Termination: how and when the contract or employment can be ended, and what follows.',
assignments: 'Assignments: whether and how a party may transfer its rights or duties under the contract to someone else.',
severability: 'Severability: if one provision is invalid, the rest of the contract remains in force.',
entire_agreements: 'Entire agreement: the contract is the whole agreement and replaces all earlier agreements on the subject.',
indemnifications: 'Indemnification: one party must compensate and defend the other against losses and claims.',
counterparts: 'Counterparts: the contract may be signed in separate copies, including electronic signatures, which together form one agreement.',
waiver_of_jury_trials: 'Waiver of jury trial: the parties give up the right to a jury trial in disputes.',
amendments: 'Amendments: how the contract can be amended, usually only in writing signed by the parties.',
},
'Which type of clause is this contract provision? Choose the clause type that best matches the main topic of the provision.',
),
});
console.log('clause_type', answers.clause_type.key);curl -s http://localhost:8765/v1/systemone \
-H 'content-type: application/json' \
-d '{
"model": "legal-clauses",
"state": {
"document": "A commercial contract filed with the U.S. Securities and Exchange Commission (SEC)",
"provision": "This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of laws principles."
},
"questions": {
"clause_type": {
"type": "choice",
"instructions": "Which type of clause is this contract provision? Choose the clause type that best matches the main topic of the provision.",
"criteria": {
"governing_laws": "Governing law: which state'\''s or country'\''s law governs the contract.",
"notices": "Notices: how formal notices must be given, and to which addresses.",
"confidentiality": "Confidentiality: keeping information secret and limits on using or disclosing it.",
"terminations": "Termination: how and when the contract or employment can be ended, and what follows.",
"assignments": "Assignments: whether and how a party may transfer its rights or duties under the contract to someone else.",
"severability": "Severability: if one provision is invalid, the rest of the contract remains in force.",
"entire_agreements": "Entire agreement: the contract is the whole agreement and replaces all earlier agreements on the subject.",
"indemnifications": "Indemnification: one party must compensate and defend the other against losses and claims.",
"counterparts": "Counterparts: the contract may be signed in separate copies, including electronic signatures, which together form one agreement.",
"waiver_of_jury_trials": "Waiver of jury trial: the parties give up the right to a jury trial in disputes.",
"amendments": "Amendments: how the contract can be amended, usually only in writing signed by the parties."
}
}
}
}'Response
{
"model": "legal-clauses",
"answers": {
"clause_type": {
"type": "choice",
"probabilities": {
"governing_laws": 0.9995311141955281,
"notices": 0.0001556233523719579,
"confidentiality": 0.0000320994245441589,
"terminations": 0.00005575684053902212,
"assignments": 0.000055541675953795374,
"severability": 0.000058855819563845234,
"entire_agreements": 0.000047198962382674635,
"indemnifications": 0.00002217638050006831,
"counterparts": 0.000014224856910469614,
"waiver_of_jury_trials": 0.000012494141511863846,
"amendments": 0.000014914350194014476
},
"choice": "governing_laws",
"confidence": 0.9994842256150809
}
},
"usage": {
"input_tokens": 405,
"output_tokens": 0,
"orders": 1
}
}Results
On this adapter's held-out test set, never trained on. Measured 2026-10-01. All adapters
| Test set | Test rows | Qwen3.5-0.8B untrained | Jeff v1.2 0.8B alone | Jeff v1.2 0.8B + adapter |
|---|---|---|---|---|
legal-clauses | 9,895 | 12.5% · 0.094 | 66.0% · 0.032 | 85.7% · 0.011 |
legal-clauses9,895 test rows- Qwen3.5-0.8B untrained
- 12.5% · 0.094
- Jeff v1.2 0.8B alone
- 66.0% · 0.032
- Jeff v1.2 0.8B + adapter
- 85.7% · 0.011
Each cell: accuracy · calibration error (ECE; lower is better, 0 is perfect).
How sure is it, and is it right?
Jeff gives every answer a probability. Each dot is a group of test rows with similar confidence: across, how sure the model said it was; up, how often it was right. Dots on the diagonal mean the stated confidence can be taken at face value.
When this adapter says it is about 90% sure, it is right about 91% of the time (1,310 test rows).
Point at a dot for its numbers. Bigger dots hold more rows.
| Model | Calibration error (ECE) | Brier score | Log loss |
|---|---|---|---|
| Qwen3.5-0.8B untrained | 0.094 | 0.985 | 4.487 |
| Jeff v1.2 0.8B alone | 0.032 | 0.479 | 1.523 |
| Jeff v1.2 0.8B + adapter | 0.011 | 0.216 | 0.541 |
All three: lower is better, 0 is perfect. Brier score and log loss also reward being right.
Where it gets things wrong
applicable_lawsread asgoverning_laws: 42 rowsdefined_termsread asdefinitions: 32 rowstax_withholdingsread aswithholdings: 30 rowsintegrationread asentire_agreements: 27 rowswithholdingsread astax_withholdings: 27 rows
The five commonest mistakes with the adapter, out of 9,895 test rows.
| Right answer | Test rows | Accuracy with the adapter |
|---|---|---|
governing_laws | 569 | 98.9% |
counterparts | 483 | 100.0% |
notices | 418 | 97.6% |
severability | 403 | 98.8% |
entire_agreements | 375 | 99.2% |
amendments | 222 | 89.6% |
survival | 217 | 99.1% |
headings | 216 | 97.7% |
compliance_with_laws | 207 | 98.1% |
general | 199 | 43.2% |
Show all 100 answers
| Right answer | Test rows | Accuracy with the adapter |
|---|---|---|
governing_laws | 569 | 98.9% |
counterparts | 483 | 100.0% |
notices | 418 | 97.6% |
severability | 403 | 98.8% |
entire_agreements | 375 | 99.2% |
amendments | 222 | 89.6% |
survival | 217 | 99.1% |
headings | 216 | 97.7% |
compliance_with_laws | 207 | 98.1% |
general | 199 | 43.2% |
assignments | 194 | 89.2% |
taxes | 186 | 83.3% |
expenses | 182 | 87.4% |
terms | 176 | 75.6% |
waivers | 165 | 74.5% |
confidentiality | 162 | 95.1% |
indemnifications | 152 | 90.8% |
further_assurances | 151 | 96.7% |
insurances | 131 | 96.9% |
litigations | 128 | 95.3% |
payments | 125 | 87.2% |
binding_effects | 125 | 69.6% |
definitions | 119 | 89.9% |
use_of_proceeds | 119 | 98.3% |
remedies | 117 | 84.6% |
terminations | 117 | 88.9% |
base_salary | 112 | 98.2% |
withholdings | 106 | 70.8% |
waiver_of_jury_trials | 105 | 98.1% |
no_conflicts | 102 | 92.2% |
warranties | 97 | 64.9% |
disclosures | 97 | 88.7% |
successors | 94 | 62.8% |
representations | 94 | 64.9% |
adjustments | 88 | 93.2% |
authorizations | 88 | 68.2% |
fees | 88 | 81.8% |
change_in_control | 87 | 93.1% |
vesting | 86 | 95.3% |
no_waivers | 83 | 81.9% |
financial_statements | 82 | 98.8% |
cooperation | 82 | 82.9% |
benefits | 81 | 72.8% |
consents | 81 | 70.4% |
miscellaneous | 78 | 46.2% |
interpretations | 74 | 62.2% |
tax_withholdings | 74 | 45.9% |
effective_dates | 74 | 86.5% |
organizations | 73 | 84.9% |
participations | 70 | 97.1% |
brokers | 69 | 98.6% |
death | 66 | 95.5% |
closings | 64 | 100.0% |
intellectual_property | 64 | 98.4% |
solvency | 64 | 98.4% |
no_defaults | 63 | 93.7% |
subsidiaries | 63 | 96.8% |
capitalization | 63 | 98.4% |
construction | 63 | 66.7% |
authority | 62 | 58.1% |
releases | 60 | 91.7% |
erisa | 58 | 100.0% |
duties | 58 | 84.5% |
integration | 58 | 44.8% |
modifications | 55 | 36.4% |
applicable_laws | 52 | 5.8% |
forfeitures | 52 | 90.4% |
defined_terms | 52 | 34.6% |
vacations | 52 | 96.2% |
liens | 49 | 89.8% |
disability | 48 | 87.5% |
agreements | 48 | 50.0% |
employment | 47 | 74.5% |
arbitration | 46 | 95.7% |
non_disparagement | 46 | 100.0% |
transactions_with_affiliates | 45 | 97.8% |
titles | 45 | 62.2% |
enforceability | 44 | 45.5% |
sales | 44 | 77.3% |
specific_performance | 43 | 81.4% |
existence | 42 | 81.0% |
enforcements | 42 | 38.1% |
publicity | 41 | 95.1% |
interests | 41 | 85.4% |
consent_to_jurisdiction | 33 | 66.7% |
positions | 32 | 62.5% |
effectiveness | 31 | 64.5% |
records | 30 | 96.7% |
jurisdictions | 29 | 34.5% |
submission_to_jurisdiction | 28 | 50.0% |
indemnity | 28 | 42.9% |
approvals | 25 | 52.0% |
anti_corruption_laws | 23 | 95.7% |
venues | 20 | 25.0% |
costs | 15 | 53.3% |
sanctions | 14 | 78.6% |
powers | 13 | 38.5% |
qualifications | 5 | 20.0% |
assigns | 4 | 0.0% |
books | 2 | 50.0% |
Harder test
On clauses whose wording is unlike any training clause (test-novel.jsonl), the adapter is right 83.2% of the time, against 85.7% on the full test set. This is the stricter number.
| Test | Test rows | Qwen3.5-0.8B untrained | Jeff v1.2 0.8B alone | Jeff v1.2 0.8B + adapter |
|---|---|---|---|---|
clauses whose wording is unlike any training clause (test-novel.jsonl) | 7,343 | 12.0% · 0.089 | 64.5% · 0.039 | 83.2% · 0.012 |
clauses whose wording is unlike any training clause (test-novel.jsonl)7,343 test rows- Qwen3.5-0.8B untrained
- 12.0% · 0.089
- Jeff v1.2 0.8B alone
- 64.5% · 0.039
- Jeff v1.2 0.8B + adapter
- 83.2% · 0.012
Each cell: accuracy · calibration error (ECE; lower is better, 0 is perfect).
Against Qwen3.8-27B
More accurate, 36× faster than Qwen3.8-27B alone.
Gain over Qwen3.8-27B alone: +12.8 points [+9.2, +16.4] (95% interval).
On 500 sampled test rows on an Apple M4 Max, 128 GB: Qwen3.8-27B alone was right 75.0% of the time at 16.53 s per query on average; with Jeff and this adapter answering first, it was right 87.8% at 466 ms.
This task's threshold is 0: Jeff stays ahead of Qwen3.8-27B without passing anything on, so it answered every query itself. Each task's threshold is the fastest one that still beats Qwen3.8-27B alone by at least 1 point on that task's calibration rows.
| Route | Mean | Median | 95th percentile | Typical prompt |
|---|---|---|---|---|
| Qwen3.8-27B alone | 16.53 s | 16.33 s | 19.72 s | 2,610 tokens |
| Jeff + adapter, its own answer | 466 ms | 460 ms | 513 ms | 2,577 tokens |
Time per query, prompt to answer. Jeff's row is its own answer, before any hand-off. Typical prompt: the median prompt length in tokens.
This task's threshold 0.00: accuracy 87.8%, 35.5× faster, 0.0% sent on to Qwen3.8-27B.
Below the threshold, Jeff passes the query on to Qwen3.8-27B. Horizontal axis: the threshold, from 0 (Jeff answers everything) to 1 (Qwen3.8-27B answers everything). The dot and the vertical line mark the this task's threshold. On this task's 500 sampled rows; speed-up is Qwen3.8-27B's mean time divided by the route's mean time. Point at a chart to read any threshold.
How it was trained
- Training rows
- 69,809
- Steps
- 1,091
- Training time
- 230 min
- Size as saved
- 41.5 MB
One pass over the data (1 epoch) on one NVIDIA RTX PRO 6000. Run 0.8b-legal-clauses-20260930-0126.
Source: jeff-finetunes/adapters/BASELINE.md
Data card
Reproduced. Re-measured by the maintainers on a fixed 300-row sample of the test set, on a different machine and software (Apple M4 Max, MLX), within about 1.5 points of the full-test-set result. What the levels mean
- Test set, so anyone can check the numbers
- Calibration rows, the rows its threshold is chosen on
- QA report, sanitised: the data-quality checks run before training
- How the test set was held out
- The official LEDGAR test split, as distributed in LexGLUE; never trained on.
- Training data
- Built from public data sets, listed under Data and licence.
- The source data sets are public (listed under Data and licence). A script to rebuild our rows from them will follow.
Data and licence
The adapter is released under Apache-2.0. It was trained on:
- LEDGAR (LexGLUE ledgar configuration)Licence: CC-BY-4.0
Provisions are from public SEC EDGAR filings (Tuggener et al. 2020). Option descriptions were written by hand from the label names.
Changelog
- 0.1.0 · 2026-09-30Trained on Jeff v1.2 (LoRA rank 16, one epoch). Results on the Results page. Published on Hugging Face as v1.2, with its test and calibration sets.
Comments
Comments open when JeffHub launches. They will live in the registry repository's GitHub Discussions, one thread per adapter; you sign in with GitHub, and JeffHub stores no accounts.
