Inferensys

Prompt

Legal Claim Extraction Prompt Template

A production-ready prompt playbook for extracting atomic factual claims from legal documents with source citations, materiality classification, and context preservation. Designed for legal tech teams building contract review, due diligence, and litigation support tools.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job-to-be-done, the ideal user, and the boundaries of the Legal Claim Extraction Prompt Template before integrating it into a verification pipeline.

This prompt is designed for legal tech product teams who need to decompose complex legal documents into a structured set of discrete, verifiable factual assertions. The primary job-to-be-done is to transform unstructured text from contracts, pleadings, deposition transcripts, or regulatory filings into atomic claim records that a downstream verification engine, evidence-matching service, or human review queue can consume. The ideal user is an engineering lead or AI architect building a litigation support, contract review, or compliance automation product. They have the source documents and need a reliable, schema-consistent extraction step that preserves original language and provides precise source citations, not a summary or a risk score.

Use this prompt when the goal is to create a structured, machine-readable claim inventory from a single legal document. It is appropriate when you need to force the model to identify claim boundaries, extract the exact text of an assertion, and cite its location by section, paragraph, or page. The prompt is engineered to flag materiality and separate factual claims from legal arguments, prayers for relief, or rhetorical statements. This makes it a critical early step in a verification pipeline, positioned before evidence retrieval, claim-to-source matching, or contradiction detection. It is not a replacement for legal advice, clause interpretation, or risk assessment, and it should not be used as a standalone tool without a defined downstream consumer for the extracted claims.

Do not use this prompt when the task requires interpreting the legal effect of a clause, predicting case outcomes, or providing a subjective risk score. It is also unsuitable for multi-document cross-referencing in a single pass; for that, you should extract claims from each document individually and then use a separate evidence-matching prompt. The prompt assumes the input is a clean, machine-readable text. If you are working with scanned PDFs or poor OCR output, you must preprocess the document with a document intelligence pipeline to correct text and identify structural elements before extraction. Finally, because the output is a structured claim record that may be used in high-stakes legal contexts, you must implement a validation layer and a human-in-the-loop review step for any claims flagged as material or used in a formal proceeding.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt delivers reliable extraction and where it should not be used.

01

Strong Fit: Structured Legal Documents

Use when: processing contracts, pleadings, or regulatory filings with clear section boundaries and numbered paragraphs. Guardrail: The prompt's atomicity and citation logic works best when the source text has an inherent structure to reference. Pre-chunk long documents by clause or section for best results.

02

Poor Fit: Real-Time Testimony or Transcripts

Avoid when: processing live deposition transcripts or conversational legal audio. Risk: The prompt expects formal, written legal prose. It will struggle with false starts, interruptions, and implied claims in dialogue, leading to fragmented or hallucinated extractions. Use a specialized transcript summarization prompt first.

03

Required Input: Source Metadata

Risk: Without a document title, date, and jurisdiction, extracted claims lose auditability. Guardrail: Always prepend a metadata block to the [SOURCE_TEXT] input. The prompt uses this for precise citations. Missing metadata will cause citation failures and break downstream evidence-matching pipelines.

04

Operational Risk: Claim Splitting vs. Context Loss

Risk: The prompt's instruction for 'atomic' claims can strip necessary legal context, turning a conditional obligation into an absolute one. Guardrail: Implement a post-extraction validation step that checks if any extracted claim changes meaning when read in isolation. Route ambiguous splits for human review.

05

High-Stakes Boundary: Materiality Classification

Risk: The model's judgment of 'materiality' is a legal conclusion, not a factual extraction. Guardrail: Treat the materiality_flag output as a keyword-suggestion heuristic, not a legal decision. Always route claims flagged as 'Material' for attorney review before they are used in any dispositive motion or filing.

06

Volume Limit: Single Document Focus

Avoid when: cross-referencing claims across a large corpus of documents in a single prompt call. Risk: The prompt is designed for a single, self-contained source text. Feeding it multiple unrelated documents will cause cross-contamination of claims and incorrect source citations. Use a map-reduce pattern for multi-document review.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt for extracting discrete, verifiable factual assertions from legal documents with precise source citations and materiality flags.

This prompt template is designed to be dropped directly into your legal document review pipeline. It instructs the model to decompose a provided legal text into atomic, self-contained claims, each anchored to its exact source location. The template uses square-bracket placeholders that you must replace with actual values before sending the request to the model. The core instruction set enforces claim atomicity, context preservation, and a strict output schema, which are the foundational requirements for any downstream verification or contract review task.

text
You are a precise legal claim extraction engine.
Your task is to read the provided legal document text and extract every discrete, verifiable factual assertion it contains.

Follow these rules strictly:
1.  **Atomicity:** Each extracted claim must contain exactly one factual assertion. Do not combine multiple facts into a single claim.
2.  **Verbatim Anchoring:** For each claim, you must provide the exact, verbatim source text from the document that supports it. This is the [SOURCE_CITATION].
3.  **Context Preservation:** The claim must be understandable on its own without reading the rest of the document. Expand pronouns and resolve implicit references where necessary, but do not alter the original meaning.
4.  **Materiality Flagging:** Classify each claim as `MATERIAL`, `IMMATERIAL`, or `CONTEXTUAL_DEPENDENT` based on its potential impact on the core subject matter of the document (e.g., a contract's primary obligations, a filing's key disclosures).
5.  **Exclusion:** Do not extract rhetorical questions, section headings, or purely procedural language (e.g., "This agreement is dated as of...") as claims.

[INPUT]
### LEGAL DOCUMENT TEXT:
[DOCUMENT_TEXT]

[OUTPUT_SCHEMA]
You must output a single JSON object with a key "claims" that contains an array of claim objects.
Each claim object must have the following keys:
- "claim_id": A unique string identifier for the claim (e.g., "CL-001").
- "claim_text": The extracted, self-contained factual assertion.
- "source_citation": The exact verbatim text from the document.
- "source_location": A description of where the citation is found (e.g., "Section 2.1, paragraph 3").
- "materiality": One of "MATERIAL", "IMMATERIAL", or "CONTEXTUAL_DEPENDENT".
- "subject_matter": A short topic label for the claim (e.g., "Payment Obligation", "Termination Right").

[CONSTRAINTS]
- If no factual claims are found, return an empty "claims" array.
- Do not include any text outside the JSON object.
- Ensure the JSON is valid and parseable.

To adapt this template, start by replacing [DOCUMENT_TEXT] with the full text of the legal document you are analyzing. The [OUTPUT_SCHEMA] is a critical contract for your application parser; you can extend it with domain-specific fields like governing_law or risk_score as needed. The [CONSTRAINTS] section is your primary defense against malformed outputs and should be reinforced with a post-processing validation step. For high-stakes workflows, always route claims flagged as MATERIAL or CONTEXTUAL_DEPENDENT for human attorney review before they are used in any downstream system or analysis.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder required by the Legal Claim Extraction Prompt Template, its purpose, a concrete example, and actionable validation rules to ensure the prompt receives clean, well-formed inputs before execution.

PlaceholderPurposeExampleValidation Notes

[LEGAL_DOCUMENT_TEXT]

The full text of the legal document from which factual claims will be extracted

WHEREAS, the Tenant agrees to pay a late fee of $50 if rent is not received by the 5th day of each month...

Must be a non-empty string with at least 50 characters. Reject if only whitespace or metadata headers are present. Check for PDF extraction artifacts and strip before passing.

[DOCUMENT_TYPE]

The classification of the legal document to activate domain-specific extraction heuristics

commercial_lease

Must match an allowed enum value: contract, pleading, statute, regulation, patent, brief, opinion, discovery, policy, or commercial_lease. Reject unknown types and route to human review.

[JURISDICTION]

The governing legal jurisdiction to contextualize terminology and materiality thresholds

California_USA

Must be a non-empty string matching a known jurisdiction code. If null or unknown, set extraction confidence modifiers to low and flag all claims for human review.

[MATERIALITY_THRESHOLD]

The minimum severity or impact level required for a claim to be included in the output

medium

Must be one of: low, medium, high, or critical. If set to low, expect higher volume and add a token budget warning. If null, default to medium.

[OUTPUT_SCHEMA]

The strict JSON schema definition that each extracted claim object must conform to

{ claim_text: string, source_span: {start: int, end: int}, claim_type: string, materiality: string, confidence: float }

Must be a valid, parseable JSON Schema object. Validate with a JSON Schema validator before prompt assembly. Reject if schema contains unresolvable $ref pointers.

[MAX_CLAIMS]

The upper limit on the number of claims to extract, preventing runaway token usage on long documents

25

Must be an integer between 1 and 100. If the document exceeds 50 pages, cap at 50 and log a warning. If null, default to 20.

[EXTRACTION_MODE]

Controls whether the prompt extracts all claims or only those with explicit monetary, temporal, or obligational language

precise

Must be one of: exhaustive or precise. Exhaustive mode requires a higher confidence threshold and a post-extraction deduplication check. If null, default to precise.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Legal Claim Extraction prompt into a production application with validation, retry logic, and human review routing.

Integrating the Legal Claim Extraction prompt into a production legal tech application requires more than a single API call. The prompt must be wrapped in a harness that validates structural output, enforces claim atomicity, preserves source citations, and routes ambiguous or high-risk extractions for human review. This section outlines a practical implementation pattern for contract review, litigation support, or compliance scanning tools where extraction errors can cascade into downstream analysis failures.

Validation layer. After the model returns a JSON array of claims, apply a structural validator before any claim enters your database or review queue. Each claim object must contain non-empty claim_text, source_citation (with document_id, section, and excerpt fields), and materiality enum values. Reject or repair records where claim_text exceeds a single verifiable assertion—compound claims should be split by a secondary decomposition prompt. Validate that source_citation.excerpt is a verbatim substring of the source document using a string-matching check; flag mismatches for human review. Retry logic. If the model returns malformed JSON, missing required fields, or an empty claims array when the source document contains substantive content, implement a single retry with the same prompt plus the validation error message appended as a [PREVIOUS_ERROR] context block. After one retry, escalate to a human review queue rather than looping indefinitely. Confidence thresholds. Use the model's confidence score (0.0-1.0) to route claims: claims above 0.85 can auto-ingest with logging; claims between 0.5 and 0.85 should surface in a review interface with the source excerpt highlighted; claims below 0.5 should be held for mandatory human review with a warning that the extraction may be unreliable.

Human review routing. Build a review queue that presents each flagged claim alongside its source document context, the model's extracted text, and the confidence score. Reviewers should be able to accept, edit, reject, or split claims. Capture reviewer actions as training signals for future fine-tuning or prompt refinement. Model choice. For legal claim extraction, prefer models with strong instruction-following and structured output capabilities. GPT-4o and Claude 3.5 Sonnet perform well on this task; avoid smaller models that struggle with precise citation boundaries. If processing sensitive legal documents, deploy a private instance or use an API with a zero-data-retention policy. Logging and audit. Log every extraction request with the prompt version, model identifier, input document hash, output claims, validation results, retry count, and final routing decision. This audit trail is essential for legal tech products where extraction decisions may be challenged in review or litigation contexts.

What to avoid. Do not treat the prompt output as ground truth without validation. Do not skip the verbatim excerpt check—paraphrased citations are a leading cause of undetected extraction errors. Do not auto-ingest low-confidence claims into downstream workflows without review. Do not use the same prompt for both extraction and verification; extraction identifies what was claimed, while verification checks whether the claim is supported by evidence. Keep these pipelines separate. Next steps. Once the extraction harness is stable, integrate it with a claim verification prompt from the Fact Checking and Claims Verification pillar to close the loop from extraction to evidence matching.

IMPLEMENTATION TABLE

Expected Output Contract

The JSON schema, field definitions, data types, and validation rules that the output must satisfy for the Legal Claim Extraction prompt.

Field or ElementType or FormatRequiredValidation Rule

claims

Array of objects

Must be a non-empty array. If no claims are found, return an empty array [].

claims[].claim_id

String

Must match the pattern CLAIM-[0-9]{4} and be unique within the array.

claims[].claim_text

String

Must be a verbatim quote from [SOURCE_TEXT]. Length must be > 20 and < 500 characters.

claims[].source_location

Object

Must contain start_char (integer) and end_char (integer) that map exactly to the claim's position in [SOURCE_TEXT].

claims[].claim_type

Enum: FACTUAL | LEGAL | INTERPRETIVE

Must be one of the specified enums. Use FACTUAL for verifiable events, LEGAL for assertions of law, and INTERPRETIVE for opinions or analysis.

claims[].materiality

Enum: HIGH | MEDIUM | LOW

Must be one of the specified enums. HIGH for claims central to the document's purpose, MEDIUM for supporting claims, LOW for peripheral details.

claims[].context

String

Must be a 1-2 sentence summary of the surrounding paragraph to preserve meaning. Cannot be null or empty.

claims[].confidence

Number

Must be a float between 0.0 and 1.0 representing the model's confidence that this is a discrete, well-formed claim. A value below 0.7 should trigger a human review flag.

PRACTICAL GUARDRAILS

Common Failure Modes

Legal claim extraction fails in predictable ways. Here are the most common production failure modes and how to guard against them before they reach downstream systems or reviewers.

01

Claim Fusion: Multiple Assertions in One Claim

What to watch: The model merges two or more independent factual assertions into a single extracted claim (e.g., 'The defendant breached the contract and caused $2M in damages'). Downstream verification cannot check compound claims because evidence may support one part but not the other. Guardrail: Add an atomicity check in the prompt: 'Each claim must contain exactly one verifiable factual assertion. If a sentence contains multiple assertions, split them.' Validate output by counting conjunctions and rejecting claims with 'and' connecting independent clauses.

02

Context Stripping: Claim Loses Legal Meaning Without Surrounding Text

What to watch: The model extracts a claim like 'The party failed to perform' but drops the contractual context defining what performance means, which party, or which clause applies. The extracted claim becomes unverifiable or misleading. Guardrail: Require each extracted claim to include a 'context_snippet' field with the full surrounding paragraph. Add a validation step that checks whether a reviewer can understand the claim without opening the source document. If not, flag for re-extraction with wider context window.

03

Interpretation Leakage: Legal Analysis Masquerading as Fact

What to watch: The model extracts conclusions or legal characterizations as if they were factual claims (e.g., 'This constitutes a material breach' instead of 'The delivery was 47 days late'). Materiality is a legal conclusion, not a fact. Guardrail: Add explicit instruction: 'Extract only factual assertions, not legal conclusions, characterizations, or opinions. If the text says something is a breach, violation, or infringement, extract the underlying factual allegation instead.' Use a secondary classifier prompt to flag extracted claims containing legal conclusion terms.

04

Citation Drift: Source Reference Points to Wrong Section

What to watch: The model cites paragraph 12 but the claim actually comes from paragraph 14, or cites a clause number that doesn't exist. Downstream evidence matching breaks because the citation is untrustworthy. Guardrail: Require exact source locators with document section, paragraph number, and a short verbatim quote from the source text. Add a post-extraction verification step that retrieves the cited location and checks whether the quoted text actually appears there. Reject claims where the quote doesn't match the cited location.

05

Negative Fact Omission: Silence Treated as Non-Existence

What to watch: The model extracts what the document says but misses what it doesn't say. A contract that never mentions a termination date has a meaningful absence, but the extraction only captures positive assertions. Guardrail: Add a 'notable_absences' field to the output schema. Instruct the model: 'Identify expected factual assertions that are absent from the text (e.g., missing dates, missing parties, missing amounts).' This requires domain-specific templates of what should be present in each document type.

06

Materiality Blindness: All Claims Treated as Equally Important

What to watch: The model extracts every factual assertion with equal weight, flooding downstream systems with trivial claims ('The agreement is dated March 1') alongside material ones ('The liability cap is $500,000'). Reviewers and verification systems waste resources on low-value claims. Guardrail: Add a materiality classification field to each extracted claim with levels like 'material,' 'contextual,' and 'administrative.' Define materiality criteria in the prompt based on the use case (e.g., financial impact, regulatory relevance, dispute potential). Route only material claims to human review.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a golden dataset of legal documents with known claims. Each criterion targets a specific failure mode in legal claim extraction. Use the test methods to build automated eval gates before shipping.

CriterionPass StandardFailure SignalTest Method

Claim Atomicity

Each extracted claim contains exactly one verifiable assertion

Output contains compound claims joined by 'and' or 'but'

Count claims per output; flag any claim with multiple independent clauses that could be true/false separately

Source Citation Precision

Every claim includes a citation to the exact paragraph, section, or clause in [DOCUMENT]

Missing citation, vague reference like 'the document states', or citation to wrong section

Regex check for citation format; manual spot-check 20 claims against source text to verify citation accuracy

Claim Boundary Preservation

Extracted claim preserves the original legal context without altering meaning

Claim changes tense, removes qualifiers, or omits limiting language present in source

Diff extracted claim text against source span; flag semantic drift using embedding similarity below 0.95 threshold

Materiality Flag Accuracy

Claims marked [MATERIAL] meet the defined materiality threshold in [MATERIALITY_RULES]

Routine procedural statements flagged as material, or high-risk obligations flagged as immaterial

Classify 50 claims with legal reviewer; measure precision and recall of materiality flag against human labels

Hallucination Rate

Zero claims invented that have no corresponding text in [DOCUMENT]

Claim present in output but no supporting span found in source document

For each claim, attempt to locate exact source span; flag any claim with no match as hallucination

Completeness

All material factual assertions from [DOCUMENT] appear in output

Known claim from golden dataset missing from extraction output

Compare extracted claims against pre-labeled golden set; measure recall of known claims

Entity Normalization

Parties, dates, and legal entities normalized to consistent form across claims

Same party referenced as 'Acme Corp' in one claim and 'Acme Corporation' in another

Extract all entity mentions; cluster by type; flag inconsistent surface forms for same entity

Confidence Calibration

[CONFIDENCE] scores below 0.7 correlate with actual extraction errors

High confidence on hallucinated claims or low confidence on clearly correct extractions

Bin claims by confidence score; measure error rate per bin; expect monotonic decrease as confidence increases

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of known contract clauses. Use a frontier model with a simple system prompt that defines the output schema inline. Skip strict JSON enforcement initially—focus on whether the model can identify claim boundaries and source citations correctly.

  • Use a single [DOCUMENT] placeholder and a flat list of expected claim fields.
  • Run 10–20 examples manually and review for claim atomicity.
  • Add a lightweight instruction: If a sentence contains multiple claims, split them.

Watch for

  • Claims that merge two distinct assertions into one.
  • Missing or vague source citations.
  • The model summarizing instead of extracting verbatim claim text.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.