Inferensys

Prompt

Document Bundle Completeness Check Prompt

A practical prompt playbook for using Document Bundle Completeness Check Prompt 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

Defines the ideal job-to-be-done, required inputs, and boundaries for the Document Bundle Completeness Check Prompt.

This prompt is designed for transaction teams, legal operations engineers, and compliance analysts who need to verify that a document bundle is complete before closing, filing, or review. The core job-to-be-done is automated first-pass completeness flagging: given a manifest or index of expected documents and the actual files provided, the prompt detects missing exhibits, schedules, amendments, and cross-referenced documents. Use this when a closing checklist, due diligence request list, or contract index exists and you need a structured gap report before human review begins. The prompt compares explicit references in the manifest against the provided file inventory and returns a list of expected-but-absent items with source citations.

This prompt requires two concrete inputs: a structured manifest listing every expected document by title, date, and reference identifier, and a complete inventory of the files actually provided. The manifest should be machine-readable—JSON, CSV, or a structured text table—not a scanned image or free-text email. The file inventory must include exact filenames, document titles extracted from first pages, and any internal reference numbers. Without both inputs in comparable formats, the prompt cannot perform reliable matching. The output is a structured gap report with three categories: present and matched, expected but absent, and ambiguous matches where fuzzy title matching produced low-confidence results. Each absent item includes the manifest reference, the expected document identifier, and a suggested resolution path.

Do not use this prompt when the manifest itself is incomplete, when documents are expected but not explicitly listed, or when the bundle contains documents referenced only inside other documents without a master index. This prompt does not interpret the substantive adequacy of documents—it only flags expected-but-absent items based on explicit references. It is not a substitute for legal judgment, and it does not verify that present documents are correctly executed, properly dated, or legally sufficient. For high-stakes transactions, always pair this automated check with human review of the gap report and manual verification of ambiguous matches. The prompt works best as a first-pass filter that reduces the manual checklist review burden, not as a final sign-off tool.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Document Bundle Completeness Check prompt works well and where it introduces unacceptable risk. Use these cards to decide if this prompt fits your workflow before you invest in testing and integration.

01

Good Fit: Structured Document Sets

Use when: you have a defined document checklist, a master index, or a known set of expected exhibits and schedules. The prompt excels at matching expected items against a provided inventory. Guardrail: always supply an explicit expected-document manifest as part of [INPUT]; do not rely on the model to infer what should be present from the document text alone.

02

Bad Fit: Open-Ended Discovery

Avoid when: you need the model to discover novel missing document types that were never mentioned in any source. The prompt flags expected-but-absent items; it cannot reliably invent new categories of missing documents. Guardrail: pair this prompt with a separate document-type classification step if you need open-ended gap discovery, and route novel findings for human review.

03

Required Input: Explicit Manifest

Risk: without a structured list of expected documents, the prompt produces vague or hallucinated completeness assessments. Guardrail: always provide a machine-readable manifest (JSON array of expected document titles, reference IDs, or exhibit labels) as part of [INPUT]. The manifest is the ground truth the prompt checks against.

04

Required Input: Document Inventory

Risk: the prompt cannot verify completeness if it does not know what documents are actually present. Guardrail: supply a complete inventory of available documents with filenames, titles, and any internal references (exhibit labels, schedule numbers). Missing inventory entries cause false-positive missing flags.

05

Operational Risk: False-Positive Missing Flags

Risk: the model flags a document as missing when it is present but referenced under a slightly different name or contained within another file. This erodes trust and wastes reviewer time. Guardrail: implement a post-processing fuzzy-match step that checks flagged items against actual filenames and document text before surfacing alerts. Log all fuzzy-match resolutions for audit.

06

Operational Risk: Cross-Reference Ambiguity

Risk: documents reference other documents by ambiguous shorthand ('the Schedule,' 'Exhibit A') that resolves differently depending on context. The model may apply the wrong resolution scope. Guardrail: include a scope boundary in [CONSTRAINTS] specifying which document's reference context governs resolution. For multi-agreement bundles, run the check per-agreement and reconcile results.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

Paste this prompt into your AI system and replace the square-bracket placeholders with real data to generate a structured completeness report comparing an expected document list against an actual file inventory.

This prompt template is designed to be dropped directly into your AI harness. It instructs the model to act as a document completeness auditor, comparing a provided list of expected documents against an inventory of actual files. The model will produce a structured JSON report that flags missing items, identifies unexpected files, and provides a completeness score. The template uses square-bracket placeholders for all dynamic inputs, making it straightforward to integrate into a document processing pipeline where these values are populated programmatically from a database, a deal checklist, or a user upload.

text
You are a document completeness auditor. Your task is to compare an expected document list against an actual file inventory and return a structured completeness report.

# INPUTS

## Expected Document List
[EXPECTED_DOCUMENT_LIST]

## Actual File Inventory
[ACTUAL_FILE_INVENTORY]

## Matching Rules
[MATCHING_RULES]

# OUTPUT SCHEMA
Return a single JSON object with the following structure. Do not include any text outside the JSON object.

{
  "completeness_score": <number between 0 and 1>,
  "summary": "<one-sentence summary of findings>",
  "expected_count": <integer>,
  "actual_count": <integer>,
  "matched_documents": [
    {
      "expected_name": "<string>",
      "matched_file": "<string>",
      "confidence": <number between 0 and 1>
    }
  ],
  "missing_documents": [
    {
      "expected_name": "<string>",
      "reason": "<explanation of why it was flagged as missing>"
    }
  ],
  "unexpected_files": [
    {
      "file_name": "<string>",
      "reason": "<explanation of why it was flagged as unexpected>"
    }
  ],
  "potential_matches": [
    {
      "expected_name": "<string>",
      "candidate_file": "<string>",
      "confidence": <number between 0 and 1>,
      "explanation": "<reason for low-confidence match>"
    }
  ]
}

# CONSTRAINTS
- [CONSTRAINTS]

# EXAMPLES
[EXAMPLES]

To adapt this template, replace the placeholders with concrete data. The [EXPECTED_DOCUMENT_LIST] should be a structured list, such as a markdown table or a JSON array, detailing every document required for a complete bundle. The [ACTUAL_FILE_INVENTORY] is a corresponding list of files that are present. The [MATCHING_RULES] placeholder is critical for controlling false positives; specify whether matching should be exact, fuzzy, or based on semantic similarity. Use the [CONSTRAINTS] section to enforce business rules, such as ignoring file extensions, flagging only specific document types, or requiring a minimum confidence threshold for a match. The [EXAMPLES] placeholder should contain one or two few-shot examples of a correct input-output pair to guide the model's behavior, especially for edge cases like similarly named documents or optional schedules. After adapting the prompt, always validate the output against the defined JSON schema before allowing it to proceed downstream.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder must be replaced with structured data before the prompt is sent to the model. Validation notes describe how to verify the input data before execution.

PlaceholderPurposeExampleValidation Notes

[DOCUMENT_LIST]

Array of document identifiers, filenames, and content for all documents in the bundle

[{"id": "doc-001", "filename": "MSA_2024.pdf", "content": "..."}, {"id": "doc-002", "filename": "SOW_Annex_A.pdf", "content": "..."}]

Schema check: array of objects with id, filename, content fields. Content must be non-empty string. Minimum 2 documents required.

[BUNDLE_TYPE]

Classification of the document bundle to activate type-specific completeness rules

"M&A Due Diligence Bundle"

Enum check: must match one of the predefined bundle types in the system config. Null not allowed.

[EXPECTED_DOCUMENTS]

Checklist of documents, exhibits, schedules, and amendments expected in a complete bundle

[{"type": "Exhibit", "label": "Exhibit A - Pricing Schedule", "required": true}, {"type": "Amendment", "label": "Amendment No. 1", "required": false}]

Schema check: array of objects with type, label, required fields. Required must be boolean. Label must be non-empty string.

[REFERENCE_EXTRACTION_MODE]

Controls how cross-references to external documents are detected and flagged

"strict"

Enum check: must be "strict" (flag all unresolved references), "lenient" (flag only explicit references), or "off" (skip reference checking). Default is "strict".

[MISSING_FLAG_THRESHOLD]

Confidence threshold below which a potential missing document is flagged for human review

0.85

Range check: float between 0.0 and 1.0. Values below 0.7 increase false positives. Values above 0.95 increase false negatives.

[OUTPUT_SCHEMA_VERSION]

Version identifier for the output JSON schema to ensure downstream compatibility

"2.1.0"

Schema check: must match a supported schema version in the system registry. Mismatch triggers pre-flight rejection.

[MAX_REFERENCE_DEPTH]

Maximum depth for recursive reference resolution when documents reference other documents

3

Range check: integer between 1 and 5. Higher values increase latency and token usage. Set to 1 for flat bundle checks only.

[HUMAN_REVIEW_REQUIRED]

Boolean flag indicating whether flagged missing items must route to human approval before final output

Boolean check: must be true or false. When true, output includes review queue payload. When false, flagged items appear in output but are not routed.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Document Bundle Completeness Check prompt into a reliable document review pipeline with validation, retries, and human review gates.

The Document Bundle Completeness Check prompt is designed to operate as a critical gate in a transaction or compliance document pipeline. It should be invoked after document ingestion and classification but before downstream extraction, comparison, or summarization workflows. The prompt expects a structured input containing a manifest of expected documents (such as a closing checklist, regulatory filing index, or contract hierarchy) alongside the actual document set inventory with metadata. The output is a structured completeness report with flags for missing exhibits, schedules, amendments, and cross-referenced documents that are expected but absent from the provided bundle.

To wire this prompt into an application, build a pre-processing step that assembles the [EXPECTED_DOCUMENT_MANIFEST] and [ACTUAL_DOCUMENT_INVENTORY] from your document management system or data room index. The manifest should include document titles, expected types (exhibit, schedule, amendment, main agreement, side letter), and any cross-reference identifiers. The inventory should list actual filenames, extracted titles, document types, and page counts. Pass both as structured JSON or formatted text blocks into the prompt. After receiving the model response, run a schema validator against the expected output structure: a JSON object with completeness_status, missing_documents array (each with expected_document, reference_source, absence_evidence, risk_level), present_documents array, and unexpected_documents array. Reject malformed responses and retry with the validation error message appended to the prompt context.

For high-stakes transaction reviews, implement a human review queue for all risk_level: high flags and any missing_documents entries where absence_evidence is inferred rather than confirmed_absent. Log every completeness check run with the input manifest hash, output report, validator results, retry count, and reviewer decision. This audit trail is essential for regulatory filings, M&A closings, and compliance submissions where document completeness claims must be defensible. Choose a model with strong instruction-following and structured output capabilities (GPT-4o, Claude 3.5 Sonnet, or equivalent). Avoid using smaller or older models that may hallucinate document references or fail to maintain the output schema under long context. If your document set exceeds the model's context window, pre-filter the manifest to relevant sections and run multiple targeted checks rather than attempting a single oversized completeness run. Never treat the model's output as a final completeness certification without human verification of flagged gaps.

IMPLEMENTATION TABLE

Expected Output Contract

The model must return a JSON object matching this schema. Validate every field before accepting the output.

Field or ElementType or FormatRequiredValidation Rule

document_bundle_id

string

Must match the [BUNDLE_ID] input exactly. Reject on mismatch.

completeness_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0. Reject if out of range or non-numeric.

expected_documents

array of objects

Array must not be empty. Each object must conform to the expected_document_item schema.

expected_documents[].title

string

Must be a non-empty string. Reject if null or whitespace-only.

expected_documents[].status

enum: present | missing | partial | unverifiable

Must be one of the four allowed enum values. Reject on any other value.

expected_documents[].evidence

array of strings

Array must contain at least one citation string referencing a document name, section, or page. Reject if empty.

missing_exhibits

array of strings

If present, each string must match a reference found in the source documents. Flag for human review if a listed exhibit is not found in any source text.

unresolved_references

array of objects

If present, each object must include a 'reference_text' string and a 'source_location' string. Reject if either field is missing or empty.

review_required

boolean

Must be true if completeness_score < 1.0 or any status is 'missing' or 'unverifiable'. Reject if false when conditions are met.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when checking document bundle completeness and how to prevent it before production.

01

False-Positive Missing Flags

What to watch: The prompt flags exhibits or schedules as missing when they are actually present but named differently, embedded within another file, or referenced by a non-standard label. This erodes user trust and creates unnecessary manual review work. Guardrail: Require the prompt to output a confidence score and an explicit match rationale for each flag. Implement a post-processing rule that suppresses flags below a configurable confidence threshold and routes borderline cases to a human review queue.

02

Reference Resolution Failures

What to watch: The model fails to resolve cross-document references such as 'see Exhibit A' when Exhibit A is a separate PDF or when the reference uses a legal shorthand. This produces a false negative where a truly missing document goes undetected. Guardrail: Pre-process the document set to extract and normalize all reference strings into a canonical list before the completeness check runs. Use a retrieval step to match references against actual filenames, document titles, and internal labels, then pass the resolved mapping as context to the prompt.

03

Hallucinated Document Inventories

What to watch: The model generates a list of expected documents based on its training data rather than the actual content of the source document. It may invent standard schedules or exhibits that the specific agreement does not require. Guardrail: Constrain the prompt to extract expected documents only from explicit references found in the provided text. Add a strict instruction: 'Do not infer, assume, or suggest any document not explicitly named or referenced in the source material.' Validate output against a known-complete golden dataset during eval.

04

Nested or Embedded Document Blindness

What to watch: The prompt treats a master document as incomplete because its schedules are appended to the same PDF rather than existing as separate files. The model cannot distinguish between a missing separate file and an included attachment. Guardrail: Include a pre-processing step that extracts the table of contents and any internal section headings. Pass this structure map to the prompt with the instruction: 'If a referenced document appears as a section or attachment within the provided file, mark it as PRESENT with the internal location, not as MISSING.'

05

Ambiguous Naming and Version Confusion

What to watch: The document references 'the Services Agreement dated March 1' but the provided file is named 'Master_Services_Agreement_v2.pdf.' The prompt flags a mismatch because it cannot reconcile the description with the filename. Guardrail: Build a manifest mapping step before the completeness check. For each provided document, extract its title, date, parties, and any internal identifiers. Pass this manifest as structured context so the prompt can match references to actual documents using multiple fields, not just filename string matching.

06

Context Window Truncation on Large Bundles

What to watch: A transaction bundle with 50+ documents exceeds the model's context window when all files are loaded. The prompt silently operates on truncated input and misses references in documents that were cut off. Guardrail: Chunk the completeness check by document. For each primary document, load only its text plus the manifest of all other documents in the bundle. Run the check per document and aggregate results. This keeps each check within context limits while preserving cross-document awareness through the manifest.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of known-complete and known-incomplete bundles before shipping the Document Bundle Completeness Check Prompt. Each criterion targets a specific failure mode observed in production document review pipelines.

CriterionPass StandardFailure SignalTest Method

Referenced Document Detection

All documents referenced in source text (exhibits, schedules, annexes) appear in the output with correct expected/absent flags

Missing reference in output when source text contains an explicit reference like 'see Exhibit A' or 'attached Schedule 2.1'

Golden dataset: 10 bundles with known reference counts. Compare output reference list to ground-truth annotation. Require 100% recall on explicit references.

False Positive Missing Flags

No document flagged as missing when it is actually present in the bundle

Output marks a document as absent but the document exists in the bundle under a slightly different filename or label

Golden dataset: 5 bundles with intentionally tricky naming (e.g., 'Exhibit_A_v2.pdf' vs 'Exhibit A'). Measure false positive rate. Target <5% false positive rate.

Citation Accuracy

Every flagged missing or present document includes a citation to the exact source paragraph, section, or clause where it was referenced

Citation points to wrong section, citation is missing, or citation is vague ('somewhere in the agreement')

Manual spot-check: sample 20 citations from output across 5 bundles. Verify each citation resolves to correct source location. Require >95% accuracy.

Cross-Reference Resolution

Documents referenced indirectly (e.g., 'the agreement dated March 1' or 'the aforementioned schedule') are correctly resolved to bundle items or flagged as unresolvable

Indirect reference is ignored, misresolved to wrong document, or silently dropped from output

Golden dataset: 8 bundles with 3+ indirect references each. Compare resolved references to ground-truth resolution map. Require >90% resolution accuracy.

Null Handling for Absent References

When no references are found in a document, output explicitly states 'no referenced documents detected' rather than returning empty array without explanation

Output returns empty array, null, or omits the field entirely without indicating whether the check was performed

Test set: 5 single-document inputs with zero cross-references. Verify output contains explicit null-reason message. Require 100% explicit null handling.

Nested Reference Detection

References within referenced documents (e.g., Schedule A references Annex I) are detected and included in the completeness check

Only top-level references detected; nested references ignored, producing incomplete bundle view

Golden dataset: 3 bundles with known nested reference chains (depth 2-3). Verify all levels appear in output. Require >85% nested recall.

Output Schema Compliance

Output strictly matches [OUTPUT_SCHEMA] with all required fields present and correctly typed

Missing required field, wrong type (string instead of array), or extra hallucinated fields not in schema

Automated schema validation: parse output JSON against [OUTPUT_SCHEMA]. Run on 20 test bundles. Require 100% schema compliance.

Confidence Score Calibration

Low-confidence flags (<0.7) correlate with actual ambiguous or unclear references in source text

High confidence assigned to incorrect detections, or low confidence assigned to clear unambiguous references

Golden dataset: 15 bundles with human-annotated ambiguity labels. Compare confidence scores to ambiguity ground truth. Require Spearman correlation >0.6 between low confidence and actual ambiguity.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small, hand-labeled document set. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with default temperature. Focus on getting the checklist structure right before adding strict validation.

Simplify the output schema to a flat list of expected_document, status (present/missing), and evidence (a short quote or page reference). Skip confidence scores and severity classification.

Watch for

  • The model inventing document names that aren't actually referenced in the source text
  • Missing cross-references inside exhibits or schedules that point to other exhibits
  • Overly broad "missing" flags when a document is mentioned but not required (e.g., "any other agreements")
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.