Celebrating 25 years of DDD's Excellence and Social Impact.
TABLE OF CONTENTS
    Annotate Legal Documents

    How to Annotate Legal Documents for AI: Entity Extraction, Clause Tagging, and Contract Intelligence

    Udit Khanna

    Legal document annotation is the labeling work that turns contracts, filings, and legal correspondence into training and evaluation data for AI: identifying the parties, dates, and obligations in a document (entity extraction), classifying which type of clause a given passage is (clause tagging), and structuring the result so a downstream system can answer questions about risk, obligations, and non-standard terms (contract intelligence). 

    This blog covers what legal document annotation actually involves: entity extraction and why it is harder than the general-domain version, clause tagging and the taxonomy question, contract intelligence as the layer built on top of both, and the annotator expertise and quality discipline the work requires. Text annotation services and model evaluation services are the two capabilities most directly involved.

    Key Takeaways

    • Legal annotation is a different task, not a harder version of a familiar one. Contracts nest exceptions inside exceptions, define terms far from where they are used, and encode meaning in cross-references a generic extractor has no way to resolve.
    • Entity extraction in contracts means extracting relationships, not just names. Who owes what to whom, under what conditions, is the actual unit of value, and it depends on connecting entities across clauses rather than tagging them in isolation.
    • Clause tagging requires a taxonomy before it can use annotators. CUAD’s 41 categories are a proven reference point, not a universal answer, and building a taxonomy from your actual document set and use case is the step most programs skip.
    • Contract intelligence is a third layer, not a byproduct of the first two. Extracting entities and tagging clauses does not, by itself, flag that a clause is unusual, missing, or riskier than the standard version, which is the judgment most legal AI use cases actually need.
    • Annotator background is not a nice-to-have here. Distinguishing standard boilerplate from a negotiated deviation, or catching a defined term used inconsistently across fifty pages, requires legal training, and skipping it produces labels that look complete and are quietly wrong.

    Entity Extraction: Relationships, Not Just Names

    General-domain entity extraction identifies people, organizations, dates, and amounts as isolated spans of text. Contracts need more than that, because the value of a contract entity is almost always relational: not just that a party and a date exist, but that this party owes this obligation to that party by this date, contingent on a condition defined two sections earlier. An indemnification clause naming both parties is not useful as two tagged entities. It is useful as a structured relationship: who indemnifies whom, for what categories of loss, subject to what caps and exclusions, and how that interacts with the liability clause elsewhere in the document that sets a cap the indemnification clause may or may not be subject to.

    This relational requirement is why contract entity extraction schemas typically define entity types that are already relationships in miniature: obligations (party, action, trigger, deadline), rights (party, entitlement, condition), and defined terms (term, definition, first use location, all subsequent uses). Annotating these accurately requires reading the clause in the context of the document’s other clauses, not scanning it in isolation, which is the core reason this work moves slower and needs more expertise than general entity tagging.

    One structural detail worth making explicit: the labeled corpus this work produces typically splits into a training set that fine-tunes the extraction model and a held-out evaluation set that measures it, and that split has to happen at the contract level, not the clause level. Splitting by clause lets related clauses from the same agreement land on both sides of the divide, which quietly leaks the very cross-references and defined-term relationships the model is supposed to be learning to resolve on its own.

    Clause Tagging and the Taxonomy Question

    What CUAD’s Taxonomy Gets Right

    CUAD’s 41 categories (termination rights, change of control, exclusivity, non-compete, cap on liability, governing law, and others) work as a taxonomy because they were built by lawyers around the questions lawyers actually ask when reviewing a contract for a transaction, not around clause types that are easy to distinguish computationally. That distinction matters: a taxonomy built for annotation convenience tends to group clauses that look similar on the page but carry different legal weight, while a taxonomy built around review questions groups clauses by what a reviewer needs to know, even when the underlying language varies widely.

    Why Your Taxonomy Still Needs to Be Your Own

    CUAD’s categories are a strong reference point and a poor default. A procurement contract review program and an M&A due diligence program need different category sets because they’re answering different questions, and forcing a general-purpose taxonomy onto a specific use case produces categories that are either too coarse to be useful or too fine to label consistently. Building the taxonomy is a joint exercise between the people who will use the extracted data and the annotation team, run before large-scale labeling starts, with the CUAD categories as a starting vocabulary rather than a fixed spec.

    Boilerplate Versus Negotiated Language

    A clause tagging schema that only identifies clause type misses a distinction that often matters more: whether a given clause is standard boilerplate or a negotiated deviation from it. The same clause type (limitation of liability, indemnification, termination) can be market-standard in one contract and materially unusual in another, and the unusual version is typically the one worth a reviewer’s attention. Mature annotation programs tag both the clause type and this boilerplate-versus-negotiated status against a defined baseline, which requires annotators who know what standard actually looks like for the relevant contract category.

    Contract Intelligence: The Layer Built on Top

    Entity extraction and clause tagging produce structured facts about a document. Contract intelligence is the further judgment layer: flagging a clause as unusually favorable or unfavorable relative to market standards, identifying a clause category that’s conspicuously absent from a contract where it would normally appear, detecting inconsistent use of a defined term across a long document, and surfacing cross-references that do not resolve to what they claim to reference. None of this falls out automatically from accurate entity and clause labels. It requires a further annotation pass, explicitly designed around the judgments the downstream use case needs, with its own guidelines and its own calibration process, because these are comparative and risk judgments rather than straightforward classification.

    Missing-clause detection deserves particular attention because it inverts the usual annotation task: instead of labeling what’s present, annotators confirm what should be present given the contract type and is not, which requires a reference model of what a complete contract of that category normally contains. This is exactly the kind of judgment that separates legal-trained annotators from general-domain ones, and exactly the kind of value a contract review system cannot deliver without it.

    Why Annotator Expertise and Quality Discipline Matter Here Specifically

    The failure modes in legal annotation are quiet rather than obvious. An annotator without a legal background can tag a clause as a standard limitation of liability provision while missing a carve-out buried in a subordinate clause that removes the cap for exactly the category of loss most likely to occur, producing a label that is technically about the right clause and substantively wrong about what it means.

    Here is what that looks like on the page. Consider a limitation of liability clause reading, in illustrative form: “In no event shall either party’s aggregate liability exceed the fees paid in the preceding twelve months.” Read alone, that is a standard, easy-to-tag cap. A subordinate clause two pages later adds: “The foregoing limitation shall not apply to claims arising from a party’s gross negligence, willful misconduct, or breach of the confidentiality obligations in Section 9.” An annotator without legal training tags the cap clause correctly and never connects it to the carve-out, because the two clauses share no vocabulary and sit pages apart. The label is accurate about the sentence and wrong about what the contract actually does: the cap does not apply to the loss category most likely to occur in a data-handling dispute, which is precisely the scenario a downstream risk flag needs to catch.

    Calibration for this work follows the same discipline as other subjective annotation: written guidelines with worked examples, measured inter-annotator agreement, adjudication for disagreements. The measurement itself needs to fit the label type: categorical clause tags calibrate well against Cohen’s kappa, while taxonomies with more than two annotators or with intentionally missing labels typically call for Krippendorff’s alpha instead, since it was built to handle both cases and Cohen’s kappa was not. But the guideline authors and the annotators both need legal training for the worked examples to actually capture the judgment calls that matter. In our experience, the highest-value single intervention in a legal annotation program is not more QA volume; it is pairing annotation guidelines with a lawyer who reviews disputed calls, because the disputes are almost always exactly the substantive judgment calls a generic QA process would wave through.

    Confidentiality and Privilege: The Question Legal Buyers Should Ask First

    Everything above assumes executed agreements leaving your document management system and reaching an annotation team, and for a legal buyer, that assumption should never pass without scrutiny. Contracts carry confidential commercial terms, personal data, and in some cases, material connected to legal advice, so the annotation program has to be designed around confidentiality from the first document transferred, not retrofitted after a security questionnaire.

    Four controls belong in any legal annotation engagement. First, contractual protections: a vendor NDA and data processing agreement that cover every individual with document access, not just the entity, with confidentiality obligations that survive the engagement. Second, minimization before transfer: documents should be scoped to what the taxonomy actually needs, with names, personal data, and commercially sensitive figures redacted or pseudonymized where the annotation task does not require them; a clause tagging program rarely needs real counterparty names to teach a model what an exclusivity clause looks like. Third, environment controls: annotation should happen in secure facilities with access-controlled workstations, no local storage or removal of documents, role-based access limited to the assigned team, and full audit logs of who touched which document. Fourth, independently audited security: certifications such as SOC 2 Type 2 and ISO 27001, and GDPR compliance where personal data of EU individuals is involved, are the baseline evidence that the controls exist in practice rather than on paper.

    Privilege deserves its own sentence of caution. Whether sharing specific material with a third-party vendor could affect privilege or work-product protection depends on the material, the jurisdiction, and how the engagement is structured, and that assessment belongs with your own counsel before any transfer. The practical pattern that keeps programs safe is simple: annotation corpora are built from executed commercial agreements and templates, not from advice, litigation material, or attorney communications, and anything in the gray zone stays out of scope until counsel clears it. For material that cannot leave a controlled perimeter at all, on-premises or client-environment annotation, where the team works inside your infrastructure under your access controls, is the established alternative to shipping documents out. For government-connected or export-controlled material, an all-US citizen workforce option operating under US-based delivery adds a further layer.

    How Digital Divide Data Can Help

    Whether a legal AI program builds this capability internally or with a partner, the same components decide the outcome: a taxonomy built for the actual use case, annotators with the legal background to make the judgment calls correctly, and a calibration process built around disputed cases rather than volume. Producing those is the work we do.

    The taxonomy and extraction layer: text annotation teams build entity extraction and clause tagging schemas around your actual contract categories and review questions, with CUAD-style taxonomies as a starting reference rather than a fixed answer.

    The judgment layer: model evaluation services build and maintain the held-out evaluation sets and adjudication process that keep boilerplate-versus-negotiated calls and missing-clause detection consistent across annotators and across time.

    If your program can show its taxonomy, its annotator qualification standard, and its adjudication process for disputed clause calls, this capability exists. If it cannot, that is the starting point. Talk to an expert.

    Conclusion

    Legal document annotation looks, from a distance, like a specialized instance of text labeling. Up close, it is a different discipline: entities that only mean something as relationships, clause taxonomies that have to be built around review questions rather than borrowed wholesale, and a contract intelligence layer that requires annotators to make the same comparative judgments a lawyer makes when something looks off. CUAD proved this is buildable, at real cost and with real expertise, and it remains the clearest evidence of what the work actually requires: not faster labeling, but the right people doing it.

    The test for any legal AI program is direct: when your system flags a clause as unusual or misses one that a lawyer would have caught, can you trace that back to a taxonomy decision or an annotator’s judgment call you can inspect? If the answer is no, the system’s risk flags are guesses with a confidence score.

    References

    Hendrycks, D., Burns, C., Chen, A., & Ball, S. (2021). CUAD: An expert-annotated NLP dataset for legal contract review. In Proceedings of NeurIPS 2021 Datasets and Benchmarks Track. https://arxiv.org/abs/2103.06268

    Frequently Asked Questions

    Q1. Can we just fine-tune a general-purpose LLM on our contracts without a formal annotation program?

    You can generate a demo that looks promising and a production system that quietly misses the clauses that matter, and the gap between those two often is not visible until a missed carve-out or an unflagged deviation causes a real problem. A general-purpose model can identify contract structure reasonably well out of the box (headings, parties, obvious dates) because that pattern is common in its pretraining data. It has no reliable way to know your organization’s definition of a market-standard liability cap or which clause categories your review process actually cares about, because those are use-case-specific judgments that live in a taxonomy and in annotator expertise, not in general language patterns. The annotation program is what encodes those judgments into something the model can learn from.

    Q2. How large does a legal annotation taxonomy need to be? CUAD has 41 categories.

    Sized to your review questions, not to CUAD’s count. CUAD’s 41 categories reflect the breadth of a general M&A due diligence review; a program focused on vendor procurement contracts or on a single risk category (data processing terms, for instance) needs a fraction of that, built deep rather than wide. The design test is whether each category maps to a specific action a reviewer takes when they see it: escalate, approve, or flag for negotiation. Categories that do not change what happens next are taxonomy overhead, not signal, regardless of how legally distinct they are in the abstract.

    Q3. What inter-annotator agreement should we expect on legal clause tagging, and is it lower than general text tasks?

    Expect it to vary sharply by category, more than most general text tasks, because some legal distinctions are genuinely more contestable than others, even among experienced lawyers. Clear categorical questions (is a governing law clause present) typically calibrate to high agreement on a straightforward Cohen’s kappa. Comparative judgments (is this indemnification clause market-standard or a negotiated deviation) calibrate lower, not because annotators are being careless but because reasonable lawyers can disagree at the margin. The useful response is not to force artificial consensus on the comparative categories; it’s to measure agreement per category, expect and plan for lower agreement on judgment-heavy ones, and route genuine disputes to adjudication by someone with the authority to make the call rather than averaging disagreement away.

    Q4. Our contracts span multiple jurisdictions. Does that change the annotation approach?

    Significantly, it’s a common place where programs underestimate the work. A clause that’s boilerplate in one jurisdiction’s market standard can be unusual, or even unenforceable, in another, which means “market-standard” as a label needs a jurisdiction dimension, not just a clause-type dimension. The practical approach is to define standard-language baselines per jurisdiction where legal practice materially differs, and to make sure annotator qualification covers the relevant jurisdictions rather than assuming legal training in one jurisdiction transfers cleanly to judgments about another. Skipping this produces a system that confidently flags jurisdiction-standard clauses as unusual, or worse, misses genuinely unusual ones because the baseline it learned came from the wrong jurisdiction.

    Q5. How do we validate that our contract intelligence system’s risk flags are actually accurate, not just plausible-sounding?

    Build a held-out evaluation set where the ground truth was determined by lawyers reviewing the same contracts independently, then measure the system’s flags against that set the same way you’d measure any classifier: precision on what it flags, recall on what a lawyer would have flagged that it missed. The recall side is the one programs skip most often, because it requires a lawyer to review contracts the system judged clean and confirm nothing was missed, which is more expensive than checking the system’s own flags, but it’s the only way to catch a system that looks accurate because it flags real issues while silently missing others. Refresh this evaluation set periodically as contract templates and market standards evolve, since a baseline of what’s “standard” has a shelf life.

    Get the Latest in Machine Learning & AI

    Sign up for our newsletter to access thought leadership, data training experiences, and updates in Deep Learning, OCR, NLP, Computer Vision, and other cutting-edge AI technologies.

    Scroll to Top