LIVE · Thursday 3 December

Best Model for Classifying Contract Clauses: DeBERTa, LegalBERT, TF-IDF or an LLM on CUAD, by Situation

Fine-tuned DeBERTa led the CUAD-SL clause benchmark at 87.8%, but rules, a TF-IDF model or a prompted LLM fit teams with small budgets, few labels or changing taxonomies better.

By Thomas6 min read

The best model for classifying contract clauses is a fine-tuned DeBERTa-large when your clause labels are fixed and you can label a few thousand examples. In the CUAD-SL benchmark of November 2025, it scored 87.8% weighted accuracy across 23 clause types, against 83.7% for a TF-IDF baseline and 67.2% for zero-shot GPT-4. Teams with few labels or a changing taxonomy should test a prompted LLM, which costs about $3.50 a month for 100,000 clauses on gpt-6-luna at list prices with the label definitions cached. No current LLM has been benchmarked on the same labels, so every choice needs a test on your own contracts and human legal review.

Four different tasks are called clause classification, and their results do not transfer

The published figures each measure a different task, and a model that is strong on one task can be weak on another.

  • Clause-type labeling gives one category to a passage that has already been cut out of a contract. This is what the CUAD-SL benchmark measures.
  • Multi-label assignment gives a passage every category that applies. CUAD's original annotations allow this, and CUAD-SL removes it.
  • Whole-contract extraction finds relevant text in a full contract. CUAD's authors note that labeled clauses make up only about 10% of a typical contract.
  • Legal risk identification, as ContractEval defines it, asks a model to find the clause that answers a review question or to reply that no clause exists.

This guide covers the first two tasks. Teams that need the last two should test models on a ContractEval-style task as well.

The evidence comes from one comparative study and two supporting ones

The main comparison is the study by Eoin O'Connell and colleagues in Artificial Intelligence and Law. It built CUAD-SL from CUAD, the Atticus Project's 510 contracts with 13,101 expert-labeled clauses, published under CC BY 4.0. With a legal expert, the authors merged CUAD's 41 categories into 23 single labels. They dropped the roughly 90% of segments that carried no label.

The trained models led clearly. DeBERTa large scored 87.8%, RoBERTa large 86.4%, the TF-IDF baseline 83.7% and BERT base 78.9%. Zero-shot GPT-4, which received only the label names, scored 67.2%. The exception came on the rarest class. GPT-4 scored 85.7% on Price Restrictions, a class with only 7 examples, while DeBERTa scored 57.1%.

Two other studies fill in the picture. Amrita Singh and colleagues found in 2026 that LEGAL-BERT scored 82.5 macro-F1 on LEDGAR's 100 provision types, against 83.6 for RoBERTa-large. The authors report that legal models reduced errors on rare classes. On CUAD's original extraction task, its authors found that ten times more labeled data raised RoBERTa-base's AUPR by 15 points, while pretraining on 8GB of contracts added about 3.

The CUAD-SL split was stratified by class rather than by contract, so near-duplicate text from one contract can sit on both sides of the split. The paper reports no confidence intervals or calibration. Neither has been measured for any of these models on contract clauses, and no study has tested GPT-5 or GPT-6 models on the CUAD-SL labels.

Stable labels favour a fine-tuned encoder, and changing labels favour a prompted LLM or option scorer

Four questions decide the choice: how stable your labels are, how many labeled examples you have, how much traffic you expect, and how costly a missed clause is.

Your situation Start with Why Check before you rely on it
Stable labels, thousands of examples Fine-tuned DeBERTa-large Top CUAD-SL score, 87.8% Recall on rare classes
Stable labels, small budget TF-IDF + linear model 83.7% with no GPU Errors on unusual wording
Few examples or rare classes Prompted LLM with definitions GPT-4 led on the rarest class Accuracy on common classes
Labels change often Prompted LLM or option scorer No retraining for a new label Consistency across label edits
A few fixed-wording clauses Rules or keyword matching Simple and inspectable Coverage of drafting variants

The six options differ in accuracy, data needs and licence terms.

  1. A fine-tuned DeBERTa-large is the default when labels are stable. Microsoft's deberta-v3-large checkpoint is MIT-licensed and has 304 million backbone parameters. The CUAD-SL paper does not state which DeBERTa version it used.
  2. A legal-domain encoder such as LEGAL-BERT is worth testing next to DeBERTa. It has 110 million parameters and was pretrained on 12GB of legal text, including 76,366 US contracts. Its CC BY-SA 4.0 licence has share-alike terms that your legal team should read.
  3. A TF-IDF model with a linear classifier is the cheapest option to train and explain. The CUAD-SL version used one-to-three-word n-grams, an SGD classifier and balanced class weights.
  4. A prompted LLM suits teams without labeled data or with frequent label changes. The CUAD-SL authors suggest that written definitions and expert-chosen examples should improve on their zero-shot result, which has not yet been measured.
  5. An option scorer returns a probability for each label in a list that you supply, so a new label needs no retraining. Parsec's TOD is one example. It is released as Apache-2.0 LoRA adapters on Google's gemma-4-12B-it, which stays under Gemma 4 terms. Parsec lists $0.30 per 1,000 decisions. Parsec has published no contract-clause result for TOD.
  6. Rules can be enough for clauses with fixed wording. Zero-shot GPT-4 scored 100% on Governing Law in CUAD-SL, which suggests that some clause types are simple to recognize.

A worked example shows that labeling costs more than inference

The example assumes 100,000 clauses a month, 150 tokens per clause and a 1,500-token prompt that defines all labels. It also assumes a 10-token answer and list prices, with reasoning tokens left out. For the encoder, it assumes 3,000 training labels and one always-on GPU endpoint.

Option Monthly inference One-off labeling First-month total
gpt-6-luna, definitions cached about $3.50 none about $3.50
gpt-5-mini, no caching about $43 none about $43
gpt-4.1, no caching about $338 none about $338
DeBERTa on one T4 endpoint $360 about £1,500 $360 plus about £1,500

The LLM figures come from OpenAI's list prices. Luna costs $0.10 per million input tokens, $0.01 cached and $0.50 output. GPT-5 mini costs $0.25 input and $2.00 output, and GPT-4.1 costs $2.00 and $8.00. The T4 price is Hugging Face's $0.50 an hour, or $360 a month. The labeling estimate uses the CUAD-SL authors' figure of £0.50 per label, based on £15 an hour and 30 seconds per clause.

Two costs are left out of the table. Whether one T4 can serve this volume at acceptable latency has not been measured. The cost of reviewing errors has not been measured either. For a legal team, one missed indemnity clause can matter more than the whole difference in inference costs.

A test on your own contracts, split by contract, settles the choice

Each option needs the same test on your own contracts, because no published benchmark covers today's models on a shared label set.

  1. Label a sample of clauses from your own contracts, and split it by contract so that no contract appears in both training and test sets.
  2. Include passages that carry no label, so that each model must be able to answer "none of these".
  3. Train the TF-IDF baseline first, then DeBERTa-large or LEGAL-BERT, and prompt one or two current LLMs with definitions and examples.
  4. Compare macro-F1 and the recall for your highest-risk clause types, not only overall accuracy.
  5. Set a confidence threshold that sends unsure clauses to a reviewer, and record how many clauses fall below it.
  6. If you also need risk identification, run ContractEval's MIT-licensed harness on 4,128 contract-and-question pairs from 102 CUAD test contracts, and report those results separately. In that benchmark, GPT 4.1 mini scored an F1 of 0.644, and the authors judged most models to perform at about a junior legal assistant's level.

Sources

More in Research

All Research →