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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 layer | What it answers | Evidence to retain |
|---|---|---|
| Gold-set design | Whether 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 matching | Whether 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 reporting | How 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 review | Whether 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 release | Whether 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 acceptance | Whether 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.
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
FAQs
Related CaseDocker capabilities
Contract management
Connect extracted obligations to governed contract records, owners, dates, amounts, approvals, renewals, and post-signature work.
ExploreLegal workflow playbooks
Route abstentions, high-risk obligations, human review, corrections, escalations, and acceptance decisions through repeatable playbooks.
ExploreCompliance management
Link contract obligations, evidence, controls, exceptions, review decisions, and audit-ready monitoring for applicable compliance workflows.
ExploreCase management
Preserve contract context, source documents, permissions, review tasks, and extracted obligation evidence in matter-aware workspaces.
ExploreTurn this guide into an operating plan
Share your current legal workflow and CaseDocker can map the right modules, integrations, controls, and rollout sequence.
