Inferensys

Prompt

Absent Clause Detection Prompt for Legal Documents

A practical prompt playbook for using Absent Clause Detection Prompt for Legal Documents in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job-to-be-done, the ideal user, required inputs, and the boundaries where this prompt should not be deployed.

This prompt is built for legal engineering teams who need to programmatically verify whether a contract contains specific provisions from a predefined checklist. The job-to-be-done is not general contract review; it is a targeted binary classification task: for each expected clause, return a presence or absence determination with a precise section citation when found, and an explicit 'not found' marker with the search scope when absent. The ideal user is a developer or legal operations engineer integrating this into a contract intake pipeline, a due diligence workflow, or a post-execution compliance check where missing clauses carry material risk.

You should use this prompt when you have a known, finite checklist of clauses to verify—such as governing law, indemnification, limitation of liability, data privacy, termination rights, or payment terms—and you need structured, auditable output per clause. The prompt requires two inputs: the full contract text and a structured checklist of expected clauses with optional descriptions to handle reworded or implied provisions. It is designed to reduce false absences by instructing the model to search for semantic equivalents, not just exact string matches, and to report the search scope when a clause is not found. This matters in production because a silent 'not found' on a reworded indemnification clause can cause a downstream risk system to flag a contract as non-compliant when the provision is actually present under different language.

Do not use this prompt when you need a full contract risk assessment, negotiation advice, or legal interpretation of clause adequacy. It does not evaluate whether a found clause is favorable, enforceable, or complete—only whether it is present or absent. Do not use it for documents where the clause checklist is unknown or unbounded; the prompt's value comes from explicit, pre-defined expectations. For high-stakes workflows, always pair this prompt with human review of any 'not found' determinations, and implement eval checks that test the model against reworded clauses, cross-referenced provisions, and clauses split across multiple sections. The next section provides the copy-ready prompt template you can adapt to your clause checklist and output schema.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Absent Clause Detection Prompt delivers reliable results and where it introduces unacceptable risk. Use this grid to decide if the prompt fits your contract review pipeline before integrating it.

01

Good Fit: Checklist-Driven Contract Review

Use when: You have a fixed checklist of expected clauses (e.g., governing law, indemnification, termination) and need binary presence/absence determinations with section citations. Guardrail: Structure the checklist as an explicit input array with clause names and optional synonyms to catch reworded provisions.

02

Bad Fit: Novel Clause Discovery

Avoid when: You need the model to identify unusual or non-standard clauses that are not on a predefined checklist. This prompt is designed for verification against known expectations, not open-ended clause mining. Guardrail: Use a separate clause extraction prompt for discovery, then feed extracted clauses into this prompt for verification.

03

Required Input: Structured Clause Checklist

What to watch: Without a well-formed checklist with clause names, descriptions, and synonym variants, the model will miss reworded clauses and produce false absences. Guardrail: Include at least 2-3 alternative phrasings per expected clause and a clear description of what constitutes presence. Validate the checklist schema before sending.

04

Operational Risk: False Absence on Reworded Clauses

What to watch: The model may report a clause as absent when it exists under different terminology or is distributed across multiple sections. This is the highest-frequency failure mode in production. Guardrail: Implement a two-pass approach—first pass detects presence with broad synonym matching, second pass verifies absence claims with a wider search scope and explicit reasoning.

05

Operational Risk: Citation Boundary Drift

What to watch: When a clause is found, the model may cite an overly broad section range or miss sub-clauses that modify the main provision. Guardrail: Require the output to include precise paragraph or line-level citations, not just section numbers. Add a post-extraction validator that checks citation boundaries against the source text.

06

Not a Replacement for Attorney Review

What to watch: This prompt accelerates clause verification but does not interpret legal effect, assess adequacy, or flag risky language. Teams may over-rely on presence/absence signals without legal analysis. Guardrail: Route all absence flags and ambiguous findings to a human review queue. Never use this prompt as the sole decision input for contract acceptance or rejection.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for detecting the presence or absence of specific legal clauses with section citations and explicit 'not found' markers.

This prompt template is designed to be dropped into a legal document review pipeline. It accepts a contract text and a checklist of expected clauses, then returns a structured determination for each clause: present with a supporting citation, or absent with an explicit marker and the search scope that was examined. The template uses square-bracket placeholders for all variable inputs, making it straightforward to parameterize in code before sending to the model.

text
You are a legal document analyst. Your task is to review a contract and determine whether specific clauses are present or absent.

## INPUT
Contract text:
[CONTRACT_TEXT]

Clause checklist:
[CLAUSE_CHECKLIST]

## INSTRUCTIONS
For each clause in the checklist, perform the following:
1. Search the entire contract text for the clause, including reworded, implied, or distributed versions of the clause across multiple sections.
2. If the clause is found, set status to "present" and provide the exact section reference and a short verbatim quote as evidence.
3. If the clause is not found after thorough search, set status to "absent" and provide the search scope examined (e.g., "searched all sections; no governing law provision located").
4. If the clause is partially present or ambiguous, set status to "partial" and explain what is present and what is missing.

## OUTPUT SCHEMA
Return a JSON object with the following structure:
{
  "results": [
    {
      "clause_name": "string",
      "status": "present" | "absent" | "partial",
      "citation": "string | null",
      "evidence": "string | null",
      "search_scope": "string",
      "notes": "string | null"
    }
  ],
  "summary": {
    "total_checked": number,
    "present_count": number,
    "absent_count": number,
    "partial_count": number
  }
}

## CONSTRAINTS
- Do not mark a clause as absent without first searching for reworded equivalents, synonyms, and distributed clause structures.
- For "absent" results, the citation and evidence fields must be null.
- For "present" results, the search_scope field should still describe where the clause was located.
- If the contract text is too short to contain meaningful clauses, flag this in the notes field of each result.
- Do not invent clauses that are not in the checklist.
- Do not provide legal advice or interpretation beyond presence/absence determination.

## RISK LEVEL
[RISK_LEVEL]

To adapt this template, replace each square-bracket placeholder with the appropriate value for your workflow. [CONTRACT_TEXT] should contain the full text of the document under review, cleaned of artifacts but preserving section numbering and headings. [CLAUSE_CHECKLIST] should be a structured list of clause names or descriptions, ideally generated from your organization's contract standards or playbook. [RISK_LEVEL] can be set to values like high, medium, or low to adjust the model's caution; for high-risk reviews, add an explicit instruction such as 'When risk_level is high, flag any ambiguous clause as partial and recommend human review.' Before deploying, validate the output against the expected JSON schema and run eval checks for false absences on reworded clauses, which is the most common failure mode in production.

After copying the template, wire it into your application with a JSON schema validator that rejects malformed outputs and triggers a retry. For high-stakes contract review, always route absent and partial results to a human review queue before taking action. Log every determination with the model version, timestamp, and raw output for auditability. If your clause checklist exceeds 20 items, consider batching the review across multiple calls to avoid context-window truncation that silently drops clauses from the output.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Absent Clause Detection Prompt. Each placeholder must be populated before the prompt is sent. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[DOCUMENT_TEXT]

Full text of the legal document to scan for expected clauses

MASTER SERVICES AGREEMENT

This Agreement is entered into...

[full document text continues]

Must be non-empty string with minimum 50 characters. Reject if only whitespace or metadata headers without body text. Check for truncated uploads by comparing byte length to source file size.

[CLAUSE_CHECKLIST]

Array of clause names and descriptions the system must detect or flag as absent

[ {"clause_id": "GOV_LAW", "name": "Governing Law", "description": "Specifies which jurisdiction's laws govern the agreement", "required": true}, {"clause_id": "LIM_LIAB", "name": "Limitation of Liability", "description": "Caps total liability amount or type", "required": true} ]

Must be valid JSON array with 1-50 objects. Each object requires clause_id (string, unique), name (string, non-empty), description (string, non-empty), required (boolean). Reject if clause_id values are not unique or if required fields are missing.

[OUTPUT_SCHEMA]

JSON schema defining the expected output structure for each clause determination

{ "type": "object", "properties": { "clause_id": {"type": "string"}, "status": {"enum": ["present", "absent", "ambiguous"]}, "citation": {"type": "string"}, "confidence": {"type": "number", "minimum": 0, "maximum": 1} }, "required": ["clause_id", "status", "confidence"] }

Must be valid JSON Schema draft-07 or later. Schema must include clause_id, status, and confidence as required fields. Validate with a JSON Schema validator before prompt assembly. Reject schemas that allow status values outside the expected enum.

[SEARCH_SCOPE]

Boundaries within the document to search for each clause, preventing false absence from incomplete search

{ "search_full_document": true, "section_whitelist": null, "section_blacklist": ["Table of Contents", "Index"], "max_section_depth": 5 }

Must be valid JSON object. If section_whitelist is provided, section_blacklist must be null and vice versa. max_section_depth must be integer between 1 and 10. Reject if both whitelist and blacklist are populated.

[REWORDING_TOLERANCE]

Threshold and rules for matching clauses that use different wording than the checklist description

{ "semantic_match_threshold": 0.85, "require_key_term_match": true, "key_terms": ["govern", "jurisdiction", "venue", "choice of law"], "allow_implicit": false }

semantic_match_threshold must be float between 0.5 and 1.0. key_terms must be array of 1-20 strings. If allow_implicit is true, require explicit documentation of why implicit matching is acceptable for this use case. Reject if threshold below 0.5.

[ABSENCE_EVIDENCE_REQUIREMENTS]

Rules for what constitutes sufficient evidence to declare a clause absent rather than ambiguous

{ "minimum_search_passes": 2, "require_section_exhaustion": true, "require_negative_keyword_check": true, "ambiguous_if_partial_match": true }

All fields must be boolean. If require_section_exhaustion is true, the system must iterate through all sections before declaring absence. If ambiguous_if_partial_match is true, any partial keyword match must result in ambiguous status, not absent. Reject if minimum_search_passes is less than 1.

[CONFIDENCE_THRESHOLDS]

Per-status confidence thresholds that determine when output requires human review

{ "present": {"auto_accept": 0.9, "review": 0.7}, "absent": {"auto_accept": 0.95, "review": 0.85}, "ambiguous": {"auto_accept": null, "review": 0.5} }

Must be valid JSON object with keys for each status in OUTPUT_SCHEMA enum. Each status must have auto_accept (float or null) and review (float) thresholds. auto_accept must be greater than review when both are numeric. Reject if absent.auto_accept is below 0.9 for high-risk legal use cases.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the absent clause detection prompt into a production legal document review system with validation, retries, and human review gates.

The absent clause detection prompt is designed to operate as a stateless function within a larger document processing pipeline. Each invocation receives a single clause name and a document chunk, returning a structured presence/absence determination. In production, you will typically fan out multiple clause checks in parallel across a document, then aggregate results into a compliance report. The prompt's output schema—with explicit status, citation, search_scope, and confidence fields—is designed to be machine-readable first, enabling downstream filtering, scoring, and review queue routing without manual parsing.

Validation and retry logic is critical because false absences are the primary failure mode. Implement a post-processing validator that checks: (1) the status field is exactly present, absent, or ambiguous; (2) when status is present, the citation field contains a non-empty section reference and the evidence_text field contains a verbatim quote from the source; (3) when status is absent, the search_scope field describes what was searched and the confidence field is populated. If validation fails, retry the prompt once with the validation error appended as a [CORRECTION_NOTE] in the constraints. After two failures, route to a human review queue with the original document chunk, the clause name, and both failed attempts logged. For high-stakes contracts, consider requiring human sign-off on all absent determinations above a confidence threshold of 0.85.

Model choice and context window considerations: Use a model with strong instruction-following and structured output capabilities, such as GPT-4o, Claude 3.5 Sonnet, or equivalent. The prompt is designed to work within a single document chunk, so ensure your chunking strategy preserves complete sections and avoids splitting clauses mid-sentence. If a clause is expected to span multiple chunks, use a sliding window with overlap and deduplicate results by normalizing citation references. For documents exceeding 100 pages, consider a two-pass approach: first use a lightweight classifier to identify candidate sections, then run the absent clause detection prompt only on those sections to reduce token costs.

Logging and observability should capture: the clause name, document identifier, chunk index, model response, validation result, retry count, and final determination. This trace data is essential for debugging false absences and for producing audit evidence when the system is used in regulatory or litigation contexts. Store raw prompt-response pairs for at least 30 days to support prompt regression testing. When you update the prompt template, run the new version against a golden dataset of 50-100 clause-document pairs with known presence/absence labels, and compare false-absence rates before promoting to production.

Integration pattern: Wrap the prompt in a function with the signature check_clause(clause_name: str, document_chunk: str, context: dict) -> ClauseResult. The context dict should carry metadata like document type, jurisdiction, and governing law to help the model interpret reworded clauses. Call this function in parallel for each clause in your checklist using an async executor with a concurrency limit matching your API rate limits. Aggregate results into a compliance matrix where rows are clauses and columns include status, citation, confidence, and review flag. Route any row with review_required: true to a human-in-the-loop queue before finalizing the report.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the exact fields, types, and validation rules for the absent clause detection output. Use this contract to build a parser, validator, or eval harness before integrating the prompt into a production pipeline.

Field or ElementType or FormatRequiredValidation Rule

clauses

Array of objects

Must be a non-empty array. Each element must match the clause_result schema.

clauses[].clause_name

String

Must exactly match one of the expected clause names provided in [CLAUSE_CHECKLIST]. Case-sensitive comparison required.

clauses[].status

Enum: 'present' | 'absent' | 'uncertain'

Must be one of the three allowed values. No other status strings permitted. 'uncertain' requires a non-null uncertainty_reason.

clauses[].citation

String or null

If status is 'present', must contain a section reference (e.g., 'Section 4.2', 'Paragraph 12(a)'). If status is 'absent', must be null. If status is 'uncertain', may contain a partial reference or be null.

clauses[].search_scope

String or null

If status is 'absent' or 'uncertain', must describe where the model searched (e.g., 'Full document body, excluding schedules'). If status is 'present', may be null.

clauses[].confidence

Number (0.0 to 1.0)

Must be a float between 0.0 and 1.0 inclusive. Values below [CONFIDENCE_THRESHOLD] should trigger a review flag in the application layer.

clauses[].uncertainty_reason

String or null

Required if status is 'uncertain'. Must explain why presence could not be determined (e.g., 'Similar language found but missing key elements'). Must be null if status is 'present' or 'absent'.

clauses[].matched_text_excerpt

String or null

If status is 'present', should contain a short verbatim excerpt from the document supporting the determination. Null allowed. Must not exceed 500 characters to avoid hallucinated expansions.

PRACTICAL GUARDRAILS

Common Failure Modes

Absent clause detection is a high-recall problem. The model must prove a negative—that a clause is truly absent—without being fooled by reworded provisions, scattered sub-clauses, or implicit language. These failure modes break first in production and require explicit guardrails.

01

False Absence on Reworded Clauses

What to watch: The model reports a clause as absent because the wording differs from the checklist. A limitation of liability labeled 'Cap on Damages' or an indemnity buried in a 'Mutual Responsibilities' section triggers a false negative. Guardrail: Include 2-3 known synonyms and structural variants per clause in the prompt. Add a secondary verification step that asks: 'Could any section serve the same legal function as [CLAUSE]?' before finalizing absence.

02

Scattered Clause Fragments Across Sections

What to watch: A single logical clause is distributed across definitions, exhibits, amendments, and the main body. The model finds a fragment, declares presence, but misses that critical sub-provisions are elsewhere—or worse, finds no single section and declares absence. Guardrail: Require the model to list all sections contributing to a clause determination. If a clause is found, output an array of citation locations. If absent, confirm that no combination of sections collectively satisfies the clause requirement.

03

Implicit Clause Misclassification

What to watch: A contract implies a governing law through venue selection or arbitration rules without an explicit 'Governing Law' heading. The model misses the implicit signal and flags absence. Guardrail: Define an 'implicit presence' category in the output schema. Prompt the model to check for functional equivalents: venue clauses, arbitration rules referencing a jurisdiction, or choice-of-law provisions in related documents. Flag implicit matches for human review rather than treating them as absent.

04

Search Scope Truncation

What to watch: The model searches only the main body and misses clauses in schedules, exhibits, appendices, or amendment riders. A termination clause in Exhibit C is reported as absent. Guardrail: Explicitly enumerate all document components in the prompt (body, schedules, exhibits, amendments, appendices). Require the model to report which components were searched for each clause. If a component was not searched, flag it as an incomplete determination rather than absence.

05

Checklist-Order Anchoring Bias

What to watch: The model processes clauses in checklist order and carries forward a determination pattern. If the first three clauses are present, it becomes biased toward finding the fourth—or if early clauses are absent, it becomes overly skeptical. Guardrail: Randomize clause order in the prompt across runs or use independent clause-by-clause evaluation. Add a calibration instruction: 'Evaluate each clause independently. Do not let determinations for other clauses influence this one.'

06

Confidence Inflation on Negative Findings

What to watch: The model reports high confidence that a clause is absent after a superficial search, but the clause exists under an unexpected heading or in a scanned attachment with poor OCR. False absence with high confidence is the most dangerous failure mode. Guardrail: Require the model to report search scope, sections examined, and a confidence score with explicit uncertainty factors. If confidence is high but search scope is incomplete, downgrade the determination. Add a human-review trigger for high-impact clauses flagged as absent with confidence below a threshold.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Absent Clause Detection Prompt before deploying it to production. Each criterion targets a known failure mode: false absence on reworded clauses, missing citations, hallucinated presence, and scope boundary violations.

CriterionPass StandardFailure SignalTest Method

True Absence Detection

Output correctly marks a clause as 'not found' when the clause concept is genuinely absent from the document.

Output returns 'present' for a clause that does not exist in the document or hallucinates a section reference.

Run prompt against a document known to lack a specific clause from the [EXPECTED_CLAUSES] checklist. Assert status is 'not_found'.

Reworded Clause Recognition

Output correctly identifies a clause as 'present' when the semantic meaning matches but the wording differs significantly from the checklist label.

Output returns 'not_found' for a clause that is present but uses different terminology, structure, or phrasing.

Run prompt against a document where each clause in [EXPECTED_CLAUSES] is reworded by a human. Assert status is 'present' for all items.

Citation Accuracy

When a clause is found, the output includes a specific section reference that points to the correct location in the source document.

Citation points to a section that does not contain the clause, or citation is missing when status is 'present'.

For each 'present' result, manually verify the cited section contains the clause. Assert citation_section matches ground-truth location.

Search Scope Honesty

When a clause is not found, the output includes a 'search_scope' field describing where the model looked, and the scope covers the full document.

Output returns 'not_found' but search_scope is empty, vague, or describes only a subset of the document.

Inspect 'not_found' results. Assert search_scope is non-empty and references document-wide search, not a single section.

No Hallucinated Presence

Output never marks a clause as 'present' with a fabricated citation or section reference that does not exist in the source document.

Output returns 'present' with a section number, heading, or page reference that cannot be found in the original document.

Cross-reference all citations against the document's actual structure. Assert every cited section exists in the source.

Full Checklist Coverage

Output returns a determination for every clause in the [EXPECTED_CLAUSES] input list, with no skipped or merged items.

Output omits one or more checklist items, or combines multiple clauses into a single determination.

Count output items. Assert length equals length of [EXPECTED_CLAUSES] input. Assert each item has a unique clause_label matching the input.

Ambiguity Flagging

When a clause concept is partially present or split across sections, output includes an 'ambiguity_note' field and confidence score below threshold.

Output returns a binary 'present' or 'not_found' for a clause that is genuinely ambiguous or distributed across multiple sections.

Run prompt against a document with a clause split across two sections. Assert confidence < [CONFIDENCE_THRESHOLD] and ambiguity_note is populated.

Boundary Respect

Output only searches the provided document text and does not infer clause presence from external knowledge about typical contract structures.

Output marks a clause as 'present' based on what is 'usually' in such documents rather than what is actually in the provided text.

Run prompt against a document with a non-standard structure missing common clauses. Assert no 'present' results without verifiable in-text evidence.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a hardcoded checklist of 5–10 expected clauses. Use a single model call with no schema enforcement beyond a simple JSON parse. Accept the raw output and manually spot-check 20–30 contracts to calibrate clause-matching behavior.

Prompt snippet

code
Check the following contract for these expected clauses: [CLAUSE_LIST].
For each clause, return {"clause": "...", "present": true/false, "citation": "..." or null}.

Watch for

  • Reworded clauses flagged as absent because the model expects exact phrasing
  • Section citations that point to the wrong paragraph
  • Inconsistent JSON keys when the model changes field names between runs
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.