Legal AI Governance

AI Contract Obligation Extraction Accuracy Testing Guide

Build a reproducible gold-set test for AI contract obligation extraction with field metrics, abstention, calibration, human review, drift, and acceptance.

Direct answer

Test AI contract obligation extraction with a locked, versioned gold set that labels obligation text, party, action, date, amount, condition, and citation. Compare normalized predictions using exact and declared partial-match rules, then report precision, recall, F1, field accuracy, abstention, confidence calibration, and error counts by document and obligation strata. Add blinded human review, reproducible evidence, drift comparisons, and risk-tiered acceptance gates. No single accuracy threshold is universal.

Definitions

Contract obligation

A governed statement in a contract that requires, permits, restricts, or conditions an action, payment, delivery, notice, approval, report, renewal, or other performance by an identified party.

Gold set

A locked, versioned collection of representative contract excerpts and adjudicated labels that serves as the reference population for evaluating an extraction system without changing the answer key after seeing model results.

Obligation record

One evaluation unit linking an obligation proposition to its source span and structured fields such as party, action, date, amount, condition, and citation.

Exact match

A match in which the normalized predicted field or obligation record equals the corresponding gold value under the published normalization and identity rules.

Partial match

A match in which a prediction overlaps the gold value or captures a materially correct portion under a declared rule, such as token overlap for text or component agreement for dates, amounts, parties, conditions, and citations.

Abstention

An explicit system outcome stating that the model will not provide a field or obligation prediction because the evidence, confidence, support, or policy does not justify an automated result.

Confidence calibration

The degree to which predicted confidence corresponds to observed correctness for a defined prediction population, label definition, time period, and confidence binning method.

Evaluation stratum

A declared subgroup used to sample and report results separately, such as contract type, language, clause family, scan quality, jurisdiction, page length, amendment state, or obligation risk.

Drift

A material change in input populations, label distributions, model behavior, confidence, error mix, or reviewer workload compared with a versioned baseline.

Acceptance gate

An organization-approved decision rule that combines measured results, evidence quality, risk tier, exclusions, human-review capacity, residual error, and intended use for a specific release or workflow.

Field definitions

Gold-set identity and provenance

evaluation_record_id
Stable identifier for the obligation or field instance used in scoring.
Type: string
Requiredness: required
Validation: Unique within the evaluation version and immutable after publication.
Owner: evaluation owner
source_document_id
Stable identifier for the contract, amendment, schedule, exhibit, or source file.
Type: string
Requiredness: required
Validation: Resolves to an authorized source record and is never derived only from display title.
Owner: repository owner
source_citation
Reproducible page, paragraph, clause, span, Bates range, or stable locator for the evidence.
Type: string
Requiredness: required
Validation: Must identify the source location and remain usable after rerun.
Owner: annotation lead
gold_label_version
Version of the annotation instructions, schema, adjudication policy, and answer key.
Type: string
Requiredness: required
Validation: Must resolve to an immutable release with change notes.
Owner: evaluation owner

Obligation and extracted fields

obligation_text
The source proposition that creates, permits, restricts, or conditions performance.
Type: text with source span
Requiredness: required when an obligation is present
Validation: Preserve raw text, normalized text, span or citation, and whether it is a source assertion or derived interpretation.
Owner: annotator or extraction system
party
The identified subject, counterparty, beneficiary, or role responsible for the obligation.
Type: controlled party reference
Requiredness: required when stated
Validation: Separate named party, alias, role, and unresolved party; do not infer identity without evidence.
Owner: annotation lead
action
The required, permitted, prohibited, or conditional action and its object.
Type: text plus controlled action class
Requiredness: required when an obligation is present
Validation: Preserve modality and distinguish action from condition, exception, and commentary.
Owner: annotation lead
date_amount_condition
Due date or range, amount and currency, trigger or frequency, condition, exception, and relevant unknown states.
Type: structured composite fields
Requiredness: required when stated; otherwise explicit not-stated or unresolved
Validation: Keep raw expression, normalized value, precision, unit, source evidence, and uncertainty.
Owner: contract operations owner

Scoring and review state

match_type
Exact, partial, unmatched, not-applicable, or unresolved result for a declared field or record comparison.
Type: controlled vocabulary
Requiredness: required
Validation: Must reference the matching-rule version and the compared gold and predicted values.
Owner: evaluation owner
confidence
Model-reported confidence for the field or record with its scale and meaning.
Type: number plus scale metadata
Requiredness: required when provided
Validation: Do not treat as probability unless calibration evidence supports that interpretation.
Owner: model owner
abstention_reason
Reason the system declined to produce a prediction, such as ambiguity, unsupported source, missing context, or policy.
Type: controlled vocabulary plus note
Requiredness: required for abstentions
Validation: Must distinguish abstention from parser failure, omission, and an empty obligation result.
Owner: model owner
human_review_outcome
Reviewer decision, correction, escalation, adjudication status, and remaining uncertainty.
Type: review record
Requiredness: required for reviewed items
Validation: Preserve reviewer role, timestamp, evidence, correction reason, and instruction version.
Owner: review lead

Controlled vocabulary guidance

Match status
Examples: exact, partial, unmatched, abstained, not-applicable, unresolved, parser-failure
Governance: Keep exact and partial outcomes separate; every partial rule must name the field, evidence requirement, normalization version, and approved partial floor.
Error taxonomy
Examples: missed-obligation, hallucinated-obligation, wrong-party, wrong-action, wrong-date, wrong-amount, wrong-condition, wrong-citation, boundary, normalization, duplicate, merge-split, cross-reference, unsupported-source, permission-provenance, parser, reviewer-disagreement
Governance: Allow one primary cause and optional secondary causes; review taxonomy coverage after each material model or schema change.
Confidence and review priority
Examples: high-confidence, medium-confidence, low-confidence, abstained, high-risk, novel-pattern, contradictory, mandatory-review
Governance: Define confidence bins and review routing in the evaluation plan; do not use a label as a universal automation permission.
Drift disposition
Examples: no-action, investigate, expand-sample, retest, restrict-automation, rollback, retire
Governance: Record baseline, current population, trigger evidence, decision owner, due date, and whether the disposition changes the approved use.

Practical workflow

  1. Define the intended extraction decision

    State whether the system is discovering possible obligations, creating a review queue, populating a governed obligation register, supporting renewal work, or authorizing downstream action. Define the contract populations, jurisdictions, languages, clause families, users, consequences of error, automation boundary, and cases that must always receive human review.

  2. Specify the obligation schema

    Define the unit of analysis and required fields before sampling: obligation text or proposition, subject party, counterparty, action, object, trigger, due date or date range, amount, currency, frequency, condition, exception, source citation, confidence, abstention reason, and review state. Distinguish fields that may be unknown from fields that may be omitted because no obligation exists.

  3. Create a representative sampling frame

    Build a frame of eligible contracts and clauses with stable identifiers, source location, contract type, language, jurisdiction, execution state, amendment status, page and token counts, scan or text quality, clause family, obligation risk, and permission class. Record excluded populations and why they are excluded. Do not let convenience sampling stand in for the intended deployment population.

  4. Allocate the gold-set sample

    Use a versioned stratified allocation. A planning example is sample_units_for_stratum = ceil(stratum_population / total_population x target_sample_units), followed by an approved minimum for rare or high-risk strata. Record the sampling frame, randomization method, replacement policy, target size, finite-population or clustering adjustment, and the final count in every stratum.

  5. Write annotation instructions

    Define what counts as an obligation, how to label permissions and prohibitions, how to identify parties and roles, how to normalize dates and amounts, how to preserve conditions and exceptions, how to cite source text, and how to handle cross-references, definitions, tables, schedules, amendments, incorporated terms, ambiguous language, and missing evidence. Include positive, negative, and abstention examples.

  6. Annotate independently

    Use at least two qualified annotators for the pilot or for a documented sample of production-like records. Keep annotators blind to model output when creating the reference. Store source span offsets or stable citations, field-level labels, rationale, uncertainty, annotator identity, instruction version, and timestamp. Keep the original contract and the answer key immutable after adjudication.

  7. Adjudicate disagreements

    Resolve disagreements with a named adjudicator or panel using the published instructions. Preserve both original labels, the disagreement reason, the adjudicated value, the source evidence, and any instruction change. Report agreement before adjudication by field and stratum; do not hide ambiguous language by forcing a false single answer.

  8. Freeze evaluation versions

    Assign versions to the contract sample, gold labels, schema, normalization rules, model, prompt or configuration, retrieval context, parser, post-processing code, and evaluation script. Separate development, tuning, locked acceptance, and post-release monitoring samples. Record hashes or immutable references so a result can be rerun without silently changing the inputs.

  9. Run extraction under controlled conditions

    Run the exact model and configuration against the locked sample with permissions, context windows, retrieval sources, temperature or sampling controls, and timeout behavior fixed. Save raw output, structured output, citations, confidence, abstention reason, latency, token or page usage, parser status, and any retry or truncation event. Do not repair outputs manually before scoring.

  10. Normalize without erasing evidence

    Publish deterministic normalization for whitespace, case, punctuation, quotation marks, Unicode, party aliases, date formats, time zones, amount separators, currency symbols, units, frequency, citation punctuation, and clause numbering. Keep raw and normalized values side by side. A normalization rule may make values comparable, but it must not convert an unsupported inference into a gold fact.

  11. Score exact and partial matches

    Score at both obligation-record and field levels. Use exact equality after the published normalization. For text, calculate token overlap precision, token overlap recall, and token F1; for dates, amounts, parties, conditions, and citations, compare declared components and provenance. A partial-match rule must be versioned with its field, unit, minimum evidence, and organization-approved partial floor; it is not a universal legal standard.

  12. Report precision, recall, and F1

    Report micro and macro results separately and state the unit. For a declared match rule, precision = matched predicted obligation records / all predicted obligation records x 100%, recall = matched gold obligation records / all gold obligation records x 100%, and F1 = 2 x precision x recall / (precision + recall) when both are non-zero. Publish results by stratum, field, confidence band, and exact versus partial match.

  13. Measure field accuracy and missingness

    For each field, field_accuracy = correctly matched eligible field instances / eligible gold field instances x 100%, with exact and partial variants reported separately. Also report missing or malformed predictions, unsupported values, duplicate records, false-positive fields, and fields that are not applicable. Keep the denominator visible because a model can appear accurate by abstaining or by scoring only easy fields.

  14. Measure abstention and confidence

    Report abstention_rate = abstained eligible extraction opportunities / all eligible extraction opportunities x 100%, with the unit defined as obligation records or field instances. Report coverage = non-abstained eligible opportunities / all eligible opportunities x 100%. For calibration, bin confidence, publish bin counts, mean confidence, observed correctness, and calibration error = sum over bins of (bin_count / total_count) x absolute(observed_accuracy - mean_confidence), in percentage points or a 0 to 1 score.

  15. Classify errors and route human review

    Use a controlled taxonomy: missed obligation, hallucinated obligation, wrong party, wrong action or object, wrong date or trigger, wrong amount or currency, wrong condition or exception, wrong citation or span, boundary error, normalization error, duplicate, merge or split, cross-reference failure, unsupported source, permission or provenance failure, parser failure, and reviewer disagreement. Route high-risk, low-confidence, novel, contradictory, and abstained records to qualified reviewers.

  16. Review calibration and human workload

    Compare confidence with observed correctness by field, stratum, and release. For binary correctness labels, Brier_score = sum((confidence_i - correctness_i)^2) / number_of_scored_predictions, in unitless 0 to 1 units. Measure reviewer queue volume, review time per record, agreement, adjudication rate, correction rate, escalation rate, and unresolved ambiguity. A lower model error rate is not enough if review capacity or correction burden is unsafe.

  17. Test drift against a baseline

    Repeat the same scoring protocol on a time-based monitoring sample and compare current and baseline populations. Report delta_precision, delta_recall, and delta_F1 in percentage points; field-distribution change as current field proportion minus baseline field proportion in percentage points; abstention and calibration changes in percentage points; and error-taxonomy changes by count and share. Investigate new contract forms, clauses, languages, vendors, jurisdictions, model versions, and workflow changes.

  18. Approve risk-tiered acceptance

    Set acceptance rules for the declared use, not for legal AI generally. The approval record should name the sample and versions, exact and partial rules, numerator and denominator, units, strata, exclusions, confidence evidence, abstention policy, human-review capacity, error examples, drift baseline, residual risks, waivers, rollback trigger, and owner. Use no universal threshold; require explicit risk-tiered approval and retesting after material change.

Comparison

Evaluation layerWhat it answersEvidence to retain
Gold-set designWhether the reference population represents the intended contracts, clauses, languages, risks, and source conditions.Sampling frame, strata, randomization, exclusions, sample version, contract identifiers, annotation instructions, and source permissions.
Obligation matchingWhether predicted obligation records and fields agree with the adjudicated reference under exact and declared partial rules.Raw output, normalized output, gold labels, match decisions, spans, citations, normalization version, and field-level confusion or error records.
Metric reportingHow often the system is correct, complete, precise, abstains, or produces unsupported results for a defined denominator.Precision, recall, F1, field accuracy, coverage, abstention, false positives, false negatives, counts, units, exclusions, and results by stratum.
Confidence and reviewWhether confidence helps prioritize safe automation and whether people can review the residual workload.Confidence bins, calibration error, Brier score, reviewer queue, time, agreement, corrections, adjudications, escalations, and unresolved ambiguity.
Drift and releaseWhether changes in contracts, model behavior, population, confidence, or errors require investigation or re-acceptance.Baseline and current versions, population comparison, metric deltas, error-taxonomy shift, drift decision, rollback trigger, and approval record.
Operational acceptanceWhether the measured system is appropriate for the named workflow and risk tier with the required human controls.Signed acceptance report, risk owner, allowed automation boundary, mandatory review classes, waivers, retest date, monitoring plan, and escalation path.

Limitations and exceptions

  • There is no universal legal AI extraction threshold. Accuracy depends on the contract population, language, clause complexity, schema, normalization, field definitions, risk tolerance, and whether the workflow requires discovery, review support, or automated action.
  • A gold set can encode annotator disagreement, missing context, interpretation choices, and sampling bias. Preserve uncertainty and adjudication history rather than presenting every label as an objective legal truth.
  • Exact and partial matching answer different questions. A generous partial rule can hide boundary or meaning errors, while an exact rule can penalize harmless formatting differences. Report both with the rule and denominator visible.
  • Confidence scores are not calibrated probabilities by default. Calibration can change by field, language, clause family, model version, prompt, retrieval context, and time period.
  • High aggregate F1 can conceal dangerous failures in low-volume, high-risk, rare-language, amended, cross-referenced, or permission-restricted clauses. Require stratified results and targeted human review.
  • Drift metrics are signals for investigation, not proof that a model is legally unsafe or safe. A stable metric can coexist with a changed risk population or a new error type.
  • The cited governance and measurement sources provide risk-management and measurement context; they do not prescribe a universal contract-obligation schema, matching rule, or acceptance number.

Primary sources

Methodology

This guide uses an organization-designed evaluation and acceptance framework reviewed against the cited NIST and EUR-Lex sources as of 2026-08-13. Freeze a representative gold set with contract, clause, language, jurisdiction, source quality, amendment, obligation-risk, and permission strata. For each gold obligation record, preserve source span or stable citation, obligation text, subject party, action or object, trigger, due date or range, amount and currency, condition or exception, and field applicability. Use deterministic normalization for comparison while retaining raw values. Exact record match requires the normalized record identity and required fields to agree under the published schema. Partial text matching uses overlap = predicted tokens intersected with gold tokens; token_precision = overlap / predicted tokens; token_recall = overlap / gold tokens; token_F1 = 2 x token_precision x token_recall / (token_precision + token_recall), with zero defined when both terms are not positive. For structured fields, publish component rules for party aliases, dates, amounts, conditions, and citations, and version an organization-approved partial-match floor; there is no universal floor. At record level, precision = matched predicted obligation records / all predicted obligation records x 100%, recall = matched gold obligation records / all gold obligation records x 100%, and F1 = 2 x precision x recall / (precision + recall) when precision plus recall is greater than zero. For a field, field_accuracy = correctly matched eligible field instances / eligible gold field instances x 100%; report exact, partial, missing, malformed, unsupported, and false-positive field counts separately. Abstention_rate = abstained eligible opportunities / all eligible opportunities x 100%, coverage = non-abstained eligible opportunities / all eligible opportunities x 100%, and review_rate = records routed to human review / eligible records x 100%, with the opportunity or record as the declared unit. For confidence calibration, partition scored predictions into versioned bins, report bin count, mean confidence, observed correctness, calibration error = sum over bins of (bin count / total count) x absolute(observed accuracy - mean confidence), and Brier_score = sum((confidence_i - correctness_i)^2) / number of scored predictions; calibration error may be reported as a proportion from 0 to 1 or percentage points, while Brier score is unitless from 0 to 1. For drift, report current minus baseline precision, recall, F1, field accuracy, abstention, review, and calibration in percentage points, plus changes in population and error-taxonomy shares; publish counts and denominators. Compute micro metrics by pooling eligible instances and macro metrics as the unweighted mean of stratum metrics, and report confidence intervals or uncertainty methods when the decision requires them. Keep a controlled error taxonomy and review a blind sample of accepted, abstained, low-confidence, high-risk, novel, and corrected records. Acceptance must be risk-tiered and workflow-specific: define the intended automation boundary, mandatory human-review classes, abstention handling, residual-error budget, evidence quality, reviewer capacity, drift trigger, rollback path, and approval owner. Example gates may be organization-designed, but no threshold in this guide is universal or a substitute for legal judgment. Re-run the frozen evaluation after material changes to the model, prompt, retrieval context, schema, normalization, source population, permissions, parser, or workflow, and retain raw outputs, labels, formulas, exclusions, errors, waivers, approvals, and monitoring evidence.

Contact

Turn extraction testing into governed contract operations

Reach out and learn more about our offerings and how CaseDocker can help you

Built for legal operations teams

Share your use case and we will connect you with the right team for product guidance, pricing, and rollout planning.

Clear next steps

Expect a response from our team with the most relevant next step for your inquiry.

Get in Touch

Get in Touch

We usually reply quickly

FAQs

Include representative contracts and clause families with stable source identifiers, permissions, language, jurisdiction, amendments, scan or text quality, and obligation-risk strata. Label obligation spans and structured fields for party, action, date, amount, condition, and citation. Keep annotation instructions, adjudication, normalization, sample version, and excluded populations with the locked answer key.

Use exact matching after published normalization, then report partial matching under a separate versioned rule. Text can use token overlap precision, recall, and F1; structured fields need component rules for aliases, dates, amounts, conditions, and citations. Publish the partial floor and evidence requirement. Do not combine exact and partial results into one unexplained number.

Precision is matched predicted obligations divided by all predicted obligations. Recall is matched gold obligations divided by all gold obligations. F1 is the harmonic mean of precision and recall. Report the numerator, denominator, unit, matching rule, exact or partial status, and results by field and stratum so abstentions and rare high-risk clauses are not hidden.

Treat abstention as an explicit outcome, not as a correct empty result and not automatically as a false negative. Report abstention rate and coverage with the opportunity denominator, reason codes, risk strata, confidence, and human-review outcome. The acceptance plan should define which fields or risks require review whenever the system abstains.

Not by default. Compare confidence bins with observed correctness on a locked, representative sample and report counts, accuracy, mean confidence, calibration error, and Brier score. Calibration can change across fields, languages, clause families, prompts, retrieval context, and model versions, so confidence should prioritize review only within a validated operating range.

Use a controlled taxonomy covering missed and hallucinated obligations, wrong party or action, wrong date, amount, condition, or citation, boundary and normalization errors, duplicates, merge or split errors, cross-reference failures, unsupported sources, parser failures, permission or provenance failures, and reviewer disagreement. Preserve the source evidence and correction reason for every reviewed item.

Retest after a material model, prompt, retrieval, parser, schema, normalization, permission, source-population, or workflow change. Use the same frozen acceptance set for comparability and a time-based monitoring sample for drift. Record metric deltas, new error types, population changes, reviewer workload, and the decision to retain, restrict, retune, or roll back the approved use.

There is no universal threshold. Set organization-designed gates by intended use, obligation risk, document population, field criticality, human-review capacity, and consequences of error. Require exact and partial results, field accuracy, abstention, calibration, drift, error examples, and an explicit automation boundary. A high aggregate score cannot replace review of high-impact misses or unsupported inferences.

Related CaseDocker capabilities

Contract management

Connect extracted obligations to governed contract records, owners, dates, amounts, approvals, renewals, and post-signature work.

Explore

Legal workflow playbooks

Route abstentions, high-risk obligations, human review, corrections, escalations, and acceptance decisions through repeatable playbooks.

Explore

Compliance management

Link contract obligations, evidence, controls, exceptions, review decisions, and audit-ready monitoring for applicable compliance workflows.

Explore

Case management

Preserve contract context, source documents, permissions, review tasks, and extracted obligation evidence in matter-aware workspaces.

Explore

Turn this guide into an operating plan

Share your current legal workflow and CaseDocker can map the right modules, integrations, controls, and rollout sequence.

Book a walkthrough