Inferensys

Prompt

Financial Due Diligence RAG Prompt

A practical prompt playbook for using Financial Due Diligence RAG Prompt in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, ideal user, required context, and operational boundaries for the Financial Due Diligence RAG Prompt.

This prompt is designed for M&A analysts, investment due diligence teams, and financial auditors who need to generate structured findings from a corpus of data-room documents. The core job-to-be-done is transforming raw, retrieved financial text—spanning contracts, P&L statements, board minutes, and audit letters—into a diligence report that surfaces red flags, identifies financial trends, and anchors every claim to a specific source document. The ideal user is a financial professional who understands the deal context and can validate the AI's output, not a general consumer asking open-ended questions about a company.

You should use this prompt when you have a pre-retrieved set of document chunks from a vector database or search index, and you need a synthesis that goes beyond simple Q&A. It is appropriate when the output must include explicit document references, distinguish between historical facts and forward-looking statements, and flag missing information that prevents a complete answer. The prompt is built for high-stakes workflows where an unsupported claim can have material consequences. It expects the input context to contain financial data, dates, and entity names that can be cross-referenced. Do not use this prompt for general market commentary, real-time news analysis, or tasks where the source documents are not provided in the prompt context.

This prompt is not a replacement for a financial model or a human diligence lead. It will not perform quantitative analysis, calculate IRR, or build a three-statement model. Its strength is in reading, summarizing, and pattern-matching across unstructured text. Before deploying, you must pair it with a robust retrieval pipeline that surfaces relevant chunks, and you must implement a human review gate for any finding that is flagged as a red flag or material risk. The next section provides the copy-ready template you can adapt to your specific data-room structure and output schema.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Financial Due Diligence RAG Prompt works, where it fails, and the operational preconditions required before deployment.

01

Strong Fit: Structured Data-Room Documents

Use when: the retrieval corpus consists of financial statements, contracts, cap tables, and board decks with clear section headers, dates, and numerical tables. Avoid when: the source material is primarily unstructured call transcripts, handwritten notes, or poorly OCR'd scans without layout information.

02

Weak Fit: Forward-Looking Valuation

Risk: The model may synthesize a valuation range or investment recommendation by blending retrieved multiples with its own parametric knowledge. Guardrail: Constrain the prompt to extract and compare stated figures only. Add a hard refusal instruction for any output that resembles a buy/sell recommendation or DCF projection not explicitly present in the source documents.

03

Required Inputs: Metadata-Rich Chunks

Risk: Answers will cite incorrect document dates or entities if the retrieval pipeline strips metadata during chunking. Guardrail: Each chunk must carry document type, entity name, reporting period, and page number in its metadata. The prompt must be instructed to refuse to answer if this metadata is missing, rather than guessing the source.

04

Operational Risk: Stale Retrieval Index

Risk: A diligence Q&A returns findings from an outdated data room after new documents have been uploaded, causing analysts to miss a material red flag. Guardrail: Implement a document freshness check in the retrieval harness. The prompt should include a retrieval_timestamp variable and be instructed to flag any answer derived from documents older than the last known data-room update.

05

Operational Risk: Numerical Hallucination

Risk: The model transposes digits in a retrieved EBITDA figure or calculates a ratio incorrectly, producing a plausible but wrong number. Guardrail: The prompt must enforce a verbatim extraction rule for all financial figures. Post-generation, run a deterministic regex validator to confirm that every number in the output matches a number in the source chunks. Flag mismatches for human review.

06

Process Fit: Analyst Augmentation, Not Replacement

Use when: The prompt is part of an analyst workflow where a human reviews every finding against the source document before it enters a diligence memo. Avoid when: The output is piped directly into an automated scoring model or client-facing report without a human-in-the-loop approval step. The prompt should end with an explicit scope-limitation statement reminding the reader that it is a synthesis aid, not an audit conclusion.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating financial due diligence findings from data-room documents, with placeholders for context, constraints, and output schema.

The following prompt template is designed to be wired into a Retrieval-Augmented Generation (RAG) pipeline for financial due diligence. It instructs the model to act as a senior financial analyst, synthesizing findings exclusively from the provided document chunks. The template uses square-bracket placeholders for all dynamic components—retrieved context, user questions, output schemas, and risk-level controls—so it can be adapted to different deal types, jurisdictions, and data-room configurations without rewriting the core instructions.

text
You are a senior financial due diligence analyst reviewing data-room documents for an M&A transaction. Your task is to answer the user's question using ONLY the provided document excerpts. You must not use any external knowledge, training data, or assumptions beyond what is explicitly stated in the context.

## CONTEXT
[CONTEXT]

## USER QUESTION
[QUESTION]

## INSTRUCTIONS
1. Answer the question using only information present in the CONTEXT above.
2. For every factual claim, provide a document reference in the format [Doc: <document_name>, Section: <section_reference>, Date: <document_date>].
3. If the context contains financial figures, include the exact figure and the date it was reported.
4. Identify any red flags, inconsistencies, or unusual trends present in the context, and cite the specific documents where they appear.
5. If the context is insufficient to answer the question fully, explicitly state what is missing and what additional documents would be needed.
6. Distinguish between historical financial data and forward-looking statements or projections.
7. Do not provide investment advice, valuation opinions, or deal recommendations.

## OUTPUT FORMAT
[OUTPUT_SCHEMA]

## CONSTRAINTS
- Maximum of [MAX_FINDINGS] findings per response.
- Direct quotes from documents must not exceed [MAX_QUOTE_LENGTH] words.
- If confidence in any finding is below [CONFIDENCE_THRESHOLD], flag it with [LOW_CONFIDENCE] and explain why.
- Risk level for this analysis: [RISK_LEVEL]. Adjust the depth of scrutiny and caveat language accordingly.

To adapt this template for your pipeline, replace each square-bracket placeholder with values from your application layer. The [CONTEXT] placeholder should receive the top-k retrieved chunks from your vector store or search index, formatted with document metadata (name, section, date) prepended to each chunk. The [OUTPUT_SCHEMA] placeholder should contain a structured format specification—typically a JSON schema with fields for findings, document_references, red_flags, missing_information, and confidence_assessments. For high-stakes deals, set [RISK_LEVEL] to "high" to trigger more conservative language and explicit uncertainty flags. Before deploying, validate that your retrieval pipeline is attaching accurate metadata to each chunk; the prompt's citation discipline depends on it. Run a set of golden-test questions against a known document set and check that every cited reference resolves to the correct source location. If your eval shows citation errors exceeding 5% of claims, revisit chunk attribution before tuning the prompt further.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Financial Due Diligence RAG prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Validation notes describe how to check that the input is well-formed before generation.

PlaceholderPurposeExampleValidation Notes

[QUERY]

The diligence question or analysis request from the user

What are the top three revenue concentration risks in the target's customer base?

Must be non-empty string. Check for ambiguous pronouns or undefined entity references. If query references a time period not covered by documents, flag before generation.

[RETRIEVED_DOCUMENTS]

Chunks or full documents retrieved from the data room, each with metadata

See document schema below

Must be a non-empty array. Each document must have id, source_path, document_type, and date fields. Validate that document_type is one of: financial_statement, contract, board_minutes, cap_table, audit_report, tax_filing, ip_assignment, employment_agreement, other. Reject retrieval sets with zero documents.

[DOCUMENT_METADATA_SCHEMA]

Required metadata fields for each retrieved document

id: str, source_path: str, document_type: str, date: ISO8601, parties: list[str], confidentiality: str

Schema must be enforced at retrieval time. Missing date field should block generation for temporal queries. Missing source_path should block citation generation. Confidentiality must be one of: public, confidential, highly_confidential.

[DILIGENCE_SCOPE]

The defined scope of the diligence engagement, including areas covered and explicitly excluded

Scope: financial due diligence for Series B investment. In scope: revenue quality, customer concentration, unit economics, cap table. Out of scope: legal IP review, employment law compliance, tax structure opinion.

Must be a non-empty string. Parse for explicit out-of-scope declarations. If scope is missing, prompt should refuse to generate findings and request scope definition. Compare query against scope; flag if query extends beyond declared scope.

[MATERIALITY_THRESHOLD]

The quantitative threshold above which findings are considered material

5% of revenue or $500K, whichever is lower

Must be a numeric value with units. If null, default to 5% of revenue. Validate that threshold is consistent with deal size context. Flag if threshold is zero (all findings material) or unreasonably high.

[RED_FLAG_DEFINITIONS]

Custom definitions of what constitutes a red flag, amber flag, or informational note for this engagement

Red: >20% customer concentration, undisclosed related-party transactions, going concern language. Amber: customer concentration 10-20%, pending litigation under $1M. Info: standard course-of-business items.

Must be a structured object with red, amber, and info categories. If null, use default definitions. Validate that definitions are mutually exclusive. Flag if red and amber definitions overlap.

[OUTPUT_FORMAT]

The required structure for generated findings

JSON array of finding objects with fields: finding_id, category, severity, claim, evidence_references, confidence, limitations

Must be a valid JSON schema. Validate that required fields include finding_id, claim, and evidence_references. Reject schemas that allow claims without evidence grounding. If null, use default finding schema.

PRACTICAL GUARDRAILS

Common Failure Modes

Financial due diligence prompts fail in predictable ways. These are the most common failure modes when generating diligence findings from data-room documents, with concrete guardrails to prevent each one.

01

Numerical Hallucination in Financial Figures

What to watch: The model fabricates revenue figures, EBITDA multiples, or transaction values that look plausible but do not appear in any retrieved document. This is the highest-severity failure mode for financial diligence. Guardrail: Require exact document citation with section and page reference for every numerical claim. Implement a post-generation validator that extracts all numbers from the output and verifies each appears verbatim in the source context. If a number cannot be matched, flag it for human review before the finding reaches an analyst.

02

Temporal Context Collapse

What to watch: The model mixes figures from different reporting periods (Q2 2023 revenue treated as Q2 2024) or fails to distinguish forward-looking projections from historical actuals. This produces findings that are internally consistent but temporally wrong. Guardrail: Include explicit date-stamping in the prompt instructions: every figure must be tagged with its reporting period and document date. Add a temporal consistency check that flags any comparison across periods without explicit date labels. When documents span multiple periods, require the model to state the date range of evidence used.

03

Red-Flag Overgeneration or Suppression

What to watch: The model either overflags every minor variance as a red flag (alert fatigue) or suppresses genuine risk indicators to produce a clean-looking report. Both modes erode trust in the diligence process. Guardrail: Define explicit red-flag criteria in the prompt with materiality thresholds (e.g., revenue decline >5% YoY, related-party transactions above a specified amount, contingent liabilities exceeding a percentage of assets). Require the model to state why each flag meets or does not meet the threshold. Implement a second-pass review prompt that challenges each red-flag determination.

04

Source Document Scope Drift

What to watch: The model draws conclusions that require information from documents not present in the retrieved context, filling gaps with parametric knowledge about industry norms or general financial principles. The output reads authoritatively but extends beyond the data room. Guardrail: Add an explicit scope-limitation instruction: 'If the answer requires information not present in the provided documents, state what is missing and do not fill the gap.' Include a completeness check that asks the model to list which documents were used and which relevant documents from the data room were not consulted. Flag any finding that lacks a direct document reference.

05

Accounting Policy Misattribution

What to watch: The model applies GAAP, IFRS, or industry-specific accounting treatments without verifying which standard the target company actually uses, or fails to note when a policy change affects comparability across periods. Guardrail: Require the prompt to extract and state the applicable accounting framework from the source documents before any analysis. When policy changes are detected (e.g., revenue recognition method change), flag the affected periods and note that figures may not be directly comparable. Include a policy-change detection step in the eval pipeline.

06

Trend Narrative Without Statistical Grounding

What to watch: The model constructs compelling trend narratives ('revenue is accelerating,' 'margins are deteriorating') from sparse or noisy data points, imposing pattern where none is statistically supported. This is especially dangerous when the narrative influences valuation judgments. Guardrail: Require the model to state the number of data points, the time range, and any gaps or outliers when describing a trend. For any directional claim, require supporting figures from at least two consecutive periods. Add a trend-claim validator that checks whether the cited figures actually support the stated direction and magnitude.

IMPLEMENTATION TABLE

Evaluation Rubric

How to test output quality before shipping. Use this rubric to build automated checks and human review criteria for the Financial Due Diligence RAG Prompt.

CriterionPass StandardFailure SignalTest Method

Source Grounding

Every factual claim is backed by a direct citation to a specific document section or page

Claim appears without a citation, or citation points to a document that does not contain the claim

Automated: parse citations, retrieve cited chunks, run NLI model to check entailment between claim and cited text

Numerical Accuracy

All financial figures in the output match the source document values exactly

Transposed digits, rounded values without disclosure, or figures attributed to wrong time period

Automated: extract number-entity pairs from output and source, compare for exact match; flag any deviation >0

Red Flag Identification

Output surfaces at least 80% of pre-labeled red flags in the document set

Misses known material issues such as declining revenue trends, related-party transactions, or going-concern notes

Automated: compare extracted red flags against a golden set of labeled issues; calculate recall

Temporal Context

Every trend or comparison includes the specific periods being compared

Statement like 'revenue increased' without specifying Q3 2023 vs Q3 2024

Automated: regex for period patterns; flag any comparative language missing adjacent date ranges

Scope Limitation

Output explicitly states what documents were reviewed and what was out of scope

Answer reads as comprehensive without acknowledging unexamined subsidiaries, periods, or document types

Automated: check for presence of scope section; human review for completeness of limitation language

Uncertainty Calibration

Uses precise uncertainty language (e.g., 'based solely on the provided documents') rather than overconfident assertions

Definitive statements about matters requiring judgment, such as 'no risks exist'

Automated: scan for overconfidence markers; human review of risk-related claims for appropriate hedging

Abstention Discipline

Refuses to answer when retrieved context is insufficient, rather than fabricating

Generates plausible-sounding answer from no or irrelevant context

Automated: inject empty or irrelevant context in test runs; output must contain explicit refusal or insufficiency statement

Forward-Looking Statement Flagging

Clearly labels any projections, forecasts, or management statements as forward-looking and not historical fact

Presents management guidance or projections as if they are realized results

Automated: keyword detection for projection terms; verify each is paired with a forward-looking disclaimer

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Financial Due Diligence RAG prompt into a production application with validation, retries, and human review gates.

This prompt is designed to operate inside a RAG pipeline where a retrieval step has already returned a set of document chunks from a data-room index. The application layer is responsible for assembling the prompt with the correct inputs: the user's question, the retrieved context, and any output schema constraints. Before calling the model, the harness should validate that the retrieved context is non-empty and that the combined prompt length does not exceed the model's context window. If the retrieval step returns zero results, the system should surface an evidence-gap response rather than passing an empty context block to the model, which would force the model to either fabricate or refuse without useful diagnostic information.

The output from this prompt must pass through a structured validation layer before it reaches the user. Parse the model response as JSON and validate that every finding object contains a non-empty document_reference field that maps to a document ID present in the retrieved context set. Reject any finding where the red_flag boolean is true but the evidence_quote field is empty or truncated. For numerical claims in the trend_observation field, run a secondary check: extract any percentage or currency values and verify they appear in the source chunks. A mismatch does not automatically reject the finding, but it should downgrade its confidence score and add a numerical_verification: pending flag for human review. Log every validation failure with the raw model output, the specific field that failed, and the document IDs that were available at generation time.

Model choice matters for this workflow. The prompt requires strict JSON adherence, long-context reasoning over financial documents, and disciplined refusal when evidence is insufficient. Prefer models with strong instruction-following benchmarks on structured output tasks. If using a model that does not support native JSON mode, wrap the call in a retry loop with a repair prompt that feeds validation errors back to the model for correction. Set a maximum of two repair attempts before escalating to a human review queue. For high-stakes diligence workflows—such as pre-acquisition red-flag reports or material weakness identification—always route outputs with red_flag: true or confidence: low to a human analyst before the finding appears in any downstream system. The harness should also log the full prompt, retrieved document IDs, model response, validation results, and human review decision for audit trail purposes. This traceability is essential when diligence findings are later challenged or when the system's behavior needs to be reproduced for regulatory or internal review.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of 5-10 data-room documents. Remove strict output schema requirements initially. Focus on getting the model to identify findings, red flags, and trends from raw text. Use a simple markdown output format instead of structured JSON.

Simplify the prompt template:

  • Replace [OUTPUT_SCHEMA] with "Output findings as bullet points with document references"
  • Remove [CONFIDENCE_THRESHOLD] and [EVIDENCE_REQUIREMENT] constraints
  • Use a single [CONTEXT] block with all retrieved chunks concatenated

Watch for

  • Hallucinated document references and page numbers
  • Overconfident trend statements without numerical grounding
  • Missing scope limitations and forward-looking caveats
  • Model conflating documents from different time periods
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.