Inferensys

Prompt

Invented Statistic Flagging Prompt for Report Generation

A practical prompt playbook for using Invented Statistic Flagging Prompt for Report Generation 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

Defines the precise conditions, required inputs, and operational boundaries for deploying the invented statistic flagging prompt in a production reporting pipeline.

This prompt is designed for business intelligence and automated reporting pipelines where a language model has already generated a draft report from source data. Its job is to act as a post-generation validation layer: it scans the generated report text, identifies every quantitative claim, percentage, or statistical figure, and cross-references each against the provided source data. Any statistic that cannot be traced to the source input is flagged with a severity level and a recommended action. Use this prompt when your product cannot afford fabricated numbers reaching dashboards, client deliverables, or regulatory filings. It assumes you already have a generated report and the original source data available. It does not rewrite the report; it produces a structured audit artifact that your application can use to block, quarantine, or annotate the output before it reaches users.

The ideal user is an engineering lead or platform developer integrating this as a guardrail in an automated report generation system. The prompt requires two concrete inputs: the [GENERATED_REPORT] text and the [SOURCE_DATA] from which the report should have been derived. The source data should be structured (JSON, CSV, or a well-defined table format) so the model can perform precise value matching. Do not use this prompt when the source data is ambiguous, when the report is expected to contain analyst interpretation that goes beyond the data, or when you need real-time streaming validation—this is a batch audit step. It is also not a replacement for a deterministic numerical validation script; use it when the report is in natural language and the mapping between claims and source fields requires semantic understanding.

Before wiring this into production, define what happens after the audit artifact is produced. A common pattern is to set a threshold: if any statistic is flagged with severity HIGH, block the report from publication and route it for human review. For MEDIUM flags, annotate the report with a disclaimer. For LOW flags, log the finding and allow publication. You should also implement a retry loop: if the audit prompt itself fails to produce valid JSON, retry with a stricter output schema instruction before escalating. Finally, periodically sample audit artifacts and manually verify that the prompt is not producing false positives (flagging legitimate statistics) or false negatives (missing fabricated numbers), as both failure modes erode trust in the validation layer.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Invented Statistic Flagging Prompt delivers value and where it introduces risk. Use this card grid to decide if the prompt fits your reporting pipeline before integrating it into production.

01

Good Fit: Automated Report Generation Pipelines

Use when: your system generates business intelligence reports, executive summaries, or market analyses where quantitative claims appear alongside narrative text. The prompt excels at scanning for percentages, monetary figures, and statistical assertions that lack source grounding. Guardrail: always provide the source documents or data tables as input context so the prompt can trace claims to evidence.

02

Bad Fit: Real-Time Streaming Outputs

Avoid when: latency budgets are under 500ms or outputs stream token-by-token to users. This prompt requires full output assembly before scanning, making it unsuitable for real-time chat or live transcription flagging. Guardrail: use this prompt as an asynchronous post-processing step after output completion, not inline during generation.

03

Required Input: Source Data or Retrieved Context

What to watch: the prompt cannot detect invented statistics without ground truth to compare against. Running it without source documents, data tables, or retrieved context will produce unreliable flagging. Guardrail: design your harness to attach the original source material as [SOURCE_CONTEXT] alongside the generated report in [OUTPUT_TO_CHECK]. Missing sources should trigger an immediate escalation, not a best-effort scan.

04

Operational Risk: False Positives on Derived Calculations

What to watch: the prompt may flag statistics that are mathematically derivable from source data but not explicitly stated. For example, a calculated growth rate from two source figures might be marked as invented. Guardrail: include a [DERIVATION_RULES] parameter specifying which computed values are acceptable, and route flagged items with medium severity to human review rather than automatic removal.

05

Operational Risk: Missed Fabrications in Dense Tables

What to watch: when reports contain large tables with many numeric cells, the prompt may miss individual fabricated values embedded in rows, especially if surrounding cells are grounded. Guardrail: pre-process tabular outputs by extracting each cell as a discrete claim with row and column context before feeding to the flagging prompt. Consider a two-pass approach: table-level scan followed by cell-level verification.

06

Scale Limit: Token Window Constraints

What to watch: long reports with extensive source material may exceed context windows, forcing truncation that causes the prompt to miss fabricated statistics in later sections. Guardrail: chunk reports by section or page, run the flagging prompt on each chunk independently with its corresponding source subset, and merge results. Log any sections that could not be scanned due to context overflow.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-paste prompt that flags invented statistics in generated reports and recommends grounded replacements or removal.

This prompt template is designed to be used as a post-generation validation step in your report pipeline. After a model produces a report draft, you pass that draft into this prompt along with the source data that was used to generate it. The prompt instructs the model to act as a strict auditor, cross-referencing every quantitative claim, percentage, and statistical figure against the provided source material. The output is a structured audit report that flags each invented statistic with a severity level and a recommended action, enabling your application to either strip the fabricated figures or escalate for human review before the report reaches an end user.

text
You are a statistical fact-checking auditor for automated report generation. Your task is to compare a generated report against the source data that was provided to the model. You will identify every quantitative claim, percentage, statistical figure, or numeric assertion in the report that cannot be traced to the source data.

## INPUT

[REPORT_TEXT]

[SOURCE_DATA]

## INSTRUCTIONS

1. Extract every discrete quantitative claim from the report. This includes:
   - Percentages and proportions
   - Absolute numbers, counts, and totals
   - Rates, ratios, and averages
   - Monetary amounts and financial figures
   - Date-based comparisons and growth figures
   - Rankings and ordinal claims with numeric backing
2. For each extracted claim, search the [SOURCE_DATA] for evidence that directly supports the figure. A claim is grounded only if the exact number or a calculation that yields that number is present in the source data.
3. Classify each claim as:
   - **GROUNDED**: The exact figure or a directly calculable equivalent exists in the source data.
   - **INVENTED**: No supporting evidence exists in the source data. The model fabricated the number.
   - **DISTORTED**: The source data contains a related figure, but the report's number is materially different and unsupported.
4. For each INVENTED or DISTORTED claim, assign a severity level:
   - **CRITICAL**: The invented figure could cause financial, legal, or safety harm if relied upon.
   - **HIGH**: The figure is central to the report's conclusions or recommendations.
   - **MEDIUM**: The figure is supporting detail but not central to the main argument.
   - **LOW**: The figure is incidental or decorative.
5. For each INVENTED or DISTORTED claim, recommend one of:
   - **REMOVE**: Strip the claim entirely from the report.
   - **REPLACE**: Suggest a grounded figure from the source data if a related one exists.
   - **HUMAN_REVIEW**: Escalate for manual verification when the claim is critical but source ambiguity exists.

## OUTPUT FORMAT

Return a JSON object with the following structure:

{
  "audit_summary": {
    "total_claims_found": <integer>,
    "grounded_claims": <integer>,
    "invented_claims": <integer>,
    "distorted_claims": <integer>,
    "critical_findings": <integer>,
    "high_findings": <integer>,
    "overall_assessment": "PASS" | "FLAGGED" | "FAIL"
  },
  "findings": [
    {
      "claim_id": <string>,
      "claim_text": <string>,
      "claim_location": <string>,
      "classification": "GROUNDED" | "INVENTED" | "DISTORTED",
      "severity": "CRITICAL" | "HIGH" | "MEDIUM" | "LOW",
      "source_evidence": <string or null>,
      "recommended_action": "KEEP" | "REMOVE" | "REPLACE" | "HUMAN_REVIEW",
      "replacement_suggestion": <string or null>,
      "reasoning": <string>
    }
  ]
}

## CONSTRAINTS

- Do not flag claims that are supported by the source data, even if they are paraphrased or reformatted.
- If the source data is insufficient to verify a claim, classify it as INVENTED rather than assuming it is correct.
- Do not invent source evidence. If you cannot find it, mark the claim as INVENTED.
- For DISTORTED claims, include the correct source figure in the replacement_suggestion field.
- If no quantitative claims exist in the report, return an empty findings array with an overall_assessment of "PASS".
- Preserve the exact claim_text as it appears in the report for traceability.

To adapt this template for your pipeline, replace [REPORT_TEXT] with the full generated report and [SOURCE_DATA] with the raw data, retrieved context, or structured records that were provided to the generation model. If your source data is large, consider chunking it or providing only the sections relevant to the report's domain. The output JSON can be parsed by your application to automatically strip claims marked REMOVE, substitute REPLACE suggestions, or route CRITICAL and HIGH findings to a human review queue. For high-stakes domains like financial reporting or clinical summaries, always require human sign-off on any finding above MEDIUM severity before the report is published.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Invented Statistic Flagging Prompt. Each variable must be populated before the prompt is assembled and sent. Missing or malformed inputs are the most common cause of false negatives in production.

PlaceholderPurposeExampleValidation Notes

[REPORT_TEXT]

The full generated report body to scan for invented statistics

Q3 revenue reached $4.2M, a 340% increase driven by the new AI-powered analytics module deployed across 12 enterprise accounts.

Must be non-empty string. Truncation check: if token length exceeds model context window minus prompt overhead, split into overlapping chunks and merge flags.

[SOURCE_DOCUMENTS]

Array of source texts the report should be grounded in

[{"id":"doc-1","text":"Revenue for Q3 was $4.2 million."},{"id":"doc-2","text":"Enterprise accounts grew from 8 to 10."}]

Must be a valid JSON array with id and text fields. Empty array is allowed but will cause all statistics to flag as ungrounded. Validate JSON parse before prompt assembly.

[STATISTIC_PATTERNS]

Regex or keyword patterns that define what counts as a statistic for this domain

["\b\d+\.?\d*%","\b\$\d+\.?\d*[MBK]?","\b\d+\.?\dx\b","\b\d+ out of \d+","\b\d+\.?\d-fold"]

Provide as JSON string array. Patterns must be valid regex. Test against known statistic formats before deployment. Null allowed if using default numeric detection.

[SEVERITY_THRESHOLDS]

Confidence cutoffs for assigning LOW, MEDIUM, HIGH, CRITICAL severity to flagged statistics

{"low":0.3,"medium":0.5,"high":0.7,"critical":0.9}

Must be valid JSON object with all four keys. Values must be floats between 0.0 and 1.0 in ascending order. Schema check: reject if low > medium or medium > high.

[OUTPUT_SCHEMA]

Expected JSON structure for the flagging results

{"flags":[{"statistic":"string","location":{"start_char":0,"end_char":0},"severity":"LOW|MEDIUM|HIGH|CRITICAL","grounding_status":"GROUNDED|PARTIALLY_GROUNDED|UNGOUNDED","source_ids":["string"],"recommendation":"REMOVE|REPLACE|VERIFY"}]}

Validate that output conforms to this schema after generation. Missing required fields trigger retry. Enum values must match exactly. source_ids must be subset of provided source document IDs.

[DOMAIN_CONTEXT]

Optional domain-specific guidance for what constitutes a statistic in this use case

Financial report: flag any monetary amount, percentage change, ratio, or growth figure. Ignore dates and page numbers.

String, null allowed. When provided, appended to system instructions. Keep under 200 tokens to avoid diluting core flagging behavior. Test with and without to measure precision impact.

[MAX_FLAGS]

Upper bound on number of statistics to flag in a single response

50

Integer, null allowed. Prevents runaway output on long documents. If null, model may flag all statistics. Set based on downstream processing capacity. Monitor for truncation when exceeded.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Invented Statistic Flagging Prompt into a production report generation pipeline with validation, retries, and human review gates.

This prompt is designed to sit as a post-generation validation step in a report generation pipeline. After a language model produces a draft report, the output is routed to this prompt along with the original source documents or data extracts that were provided as context. The prompt's job is to identify quantitative claims—percentages, dollar amounts, growth rates, survey results, and other statistics—that appear in the generated text but cannot be traced back to the source material. The output is a structured flagging report that downstream systems can use to decide whether to strip unsupported figures, request a regeneration, or escalate for human review.

The implementation harness should enforce a strict contract on both inputs and outputs. On the input side, the system must provide the generated report text and a structured array of source excerpts with identifiers. Each source excerpt should include a source_id, the raw text, and optionally a section_label to help the model produce traceable flagging. On the output side, the harness should validate that the model returns a JSON array where each flag object contains the required fields: flagged_statistic (the exact text from the report), statistic_type (e.g., percentage, absolute_number, ratio, trend_claim), severity (high, medium, low), source_grounding_status (unsupported, partially_supported, contradicted), nearest_source_evidence (the closest matching source excerpt or null), and recommended_action (remove, replace_with_sourced, flag_for_review). A JSON schema validator should reject any response that does not conform to this structure and trigger a retry with the validation error included in the retry prompt.

For production deployment, implement a retry loop with a maximum of two attempts. If the first call returns invalid JSON or missing required fields, append the validation error to a retry instruction and resubmit. If the second attempt also fails, log the failure, attach the raw output to the report metadata, and route the entire report to a human review queue with a validation_failed status. For high-severity flags—statistics marked as unsupported with high severity—the system should automatically strip those figures from the report before publication and insert a [DATA PENDING VERIFICATION] placeholder. Medium-severity flags can be surfaced as annotations in the report UI for reviewer attention without blocking publication. Low-severity flags, such as rounding discrepancies or minor formatting issues, can be logged for trend analysis without interrupting the workflow. All flagging events should be written to an observability store with the report ID, model version, prompt version, and timestamp for auditability and prompt performance tracking over time.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the JSON response returned by the Invented Statistic Flagging Prompt. Use this contract to parse, validate, and route flagged statistics before they reach downstream reports or users.

Field or ElementType or FormatRequiredValidation Rule

flagged_statistics

Array of objects

Must be a JSON array. Empty array is valid when no invented statistics are detected.

flagged_statistics[].statistic_text

String

Exact text span from the input that contains the invented statistic. Must be a substring of [INPUT_TEXT]. If not found in input, flag as parse error.

flagged_statistics[].statistic_type

Enum: percentage | absolute_count | ratio | monetary_value | growth_rate | ranking | other

Must match one of the allowed enum values. Reject unknown types.

flagged_statistics[].claimed_value

String or Number

The numeric or textual value claimed in the statistic. Accept string for ranges or approximations. Null not allowed.

flagged_statistics[].severity

Enum: critical | high | medium | low

Critical: appears in executive summary or headline. High: core argument depends on it. Medium: supporting detail. Low: incidental mention.

flagged_statistics[].source_grounding_status

Enum: no_source_provided | source_contradicts | source_insufficient | invented_wholly

Must match one of the allowed enum values. Determines downstream action: removal, replacement, or human review.

flagged_statistics[].recommended_action

Enum: remove | replace_with_sourced | flag_for_human_review

Must match one of the allowed enum values. remove: delete the claim. replace_with_sourced: substitute with [REPLACEMENT_VALUE]. flag_for_human_review: escalate.

flagged_statistics[].replacement_value

String or Number or null

Required when recommended_action is replace_with_sourced. Must be traceable to [SOURCE_DATA] if provided. Null allowed for remove and flag_for_human_review actions.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when flagging invented statistics and how to guard against it.

01

False Negatives on Implicit Claims

What to watch: The model misses statistical claims that are implied rather than explicitly stated (e.g., 'revenue doubled' without a percentage sign). The prompt over-indexes on numeric patterns and skips natural-language quantitative assertions. Guardrail: Include few-shot examples of implicit claims in the prompt template. Add a secondary pass that scans for comparative language ('increased by', 'outperformed', 'majority') and flags these for numeric verification.

02

Source Grounding False Positives

What to watch: The model incorrectly marks a statistic as grounded because the source document contains a similar number in a different context. A revenue figure from Q2 is cited as support for a Q4 claim. Guardrail: Require the prompt to return not just a grounded/ungrounded verdict but also the exact quoted passage from the source. Implement a secondary string-similarity or semantic-similarity check between the claim and the cited passage before accepting the grounding.

03

Severity Level Inflation

What to watch: The model flags every ungrounded number as 'critical', overwhelming downstream reviewers and causing alert fatigue. Minor rounding differences get the same severity as entirely fabricated revenue figures. Guardrail: Define explicit severity criteria in the prompt (e.g., 'Critical: >10% variance on material figures; Low: minor rounding or immaterial metrics'). Include a calibration example set and periodically audit severity distribution in production logs.

04

Context Window Truncation of Source Material

What to watch: The source document is too long to fit in the context window alongside the report, so the model verifies claims against only the first portion of the evidence. Statistics from later sections are incorrectly flagged as ungrounded. Guardrail: Chunk the source document and run verification per chunk, or pre-extract all quantitative claims from the source before the verification step. Never pass a truncated source without signaling to the model that evidence is incomplete.

05

Replacement Recommendation Hallucination

What to watch: When the prompt asks the model to 'recommend a replacement with sourced data,' the model invents a plausible-sounding number instead of pulling the correct value from the source. The replacement is as fabricated as the original. Guardrail: Separate the flagging step from the replacement step. The replacement step must be constrained to extract verbatim values from the source only, with an explicit instruction: 'Do not generate any number not present in the source. If no exact match exists, output NULL.'

06

Percentage vs. Absolute Value Confusion

What to watch: The model flags a percentage as ungrounded because the source contains the absolute value, or vice versa. A report claims '25% growth' and the source states 'revenue increased from $40M to $50M'—the claim is mathematically grounded but the model misses the relationship. Guardrail: Add a pre-processing step that computes derived statistics (percentages, deltas, ratios) from source data before verification. Include explicit instructions to treat mathematically equivalent representations as grounded.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to evaluate the prompt's output quality before shipping. Each criterion targets a specific failure mode of the Invented Statistic Flagging Prompt. Run these tests against a golden dataset of reports with known grounded and ungrounded statistics.

CriterionPass StandardFailure SignalTest Method

Recall of Invented Statistics

All statistics not traceable to [SOURCE_DOCUMENTS] are flagged

A known ungrounded statistic is missing from the flagged list

Run prompt on a report seeded with 5 known fabricated statistics. Assert all 5 appear in the output with a severity level.

Precision of Flagged Items

No grounded statistic is incorrectly flagged as invented

A statistic directly quoted from [SOURCE_DOCUMENTS] appears in the flagged list

Run prompt on a report where all statistics are verbatim from sources. Assert the flagged list is empty or contains only items with a null severity.

Severity Level Assignment

Severity level matches the statistic's potential impact: 'high' for core financial/clinical figures, 'low' for incidental numbers

A minor invented rounding number is flagged as 'high' or a fabricated revenue figure is flagged as 'low'

Include 1 high-impact fabricated stat and 1 low-impact fabricated stat. Assert severity levels are assigned correctly.

Source Grounding Trace

Each flagged statistic includes a 'missing_source' reason and a 'suggested_action' field

A flagged statistic has a null or empty 'missing_source' field

Parse the JSON output. Assert every item in the 'flagged_statistics' array has a non-null 'missing_source' string and a non-null 'suggested_action' string.

Output Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] exactly

JSON parsing fails or required fields like 'flagged_statistics' or 'report_id' are missing

Validate output against the [OUTPUT_SCHEMA] using a JSON Schema validator. Assert no validation errors.

Handling of Percentages and Ratios

Invented percentages and ratios are detected with the same accuracy as absolute numbers

A fabricated '25% increase' claim is missed while an absolute '500 units' claim is caught

Seed a report with 3 invented percentage claims. Assert all 3 appear in the flagged list.

False Positive Rate on Complex Aggregates

Calculated aggregates (e.g., 'total revenue') derived from multiple source figures are not flagged if the components are grounded

A correctly summed total from source line items is flagged as invented

Provide a report where a total is correctly calculated from source figures. Assert the total is not in the flagged list.

Recommendation Actionability

Each 'suggested_action' is one of: 'remove', 'replace_with_sourced', or 'flag_for_human_review'

A flagged statistic has a generic or unactionable suggestion like 'check this'

Enumerate all 'suggested_action' values in the output. Assert each is in the allowed enum set.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single model call and manual review of flagged statistics. Replace [SOURCE_DOCUMENTS] with a flat list of text chunks. Set [SEVERITY_THRESHOLD] to "medium" to catch obvious fabrications without overwhelming reviewers. Skip structured output enforcement initially—accept markdown tables or bulleted lists.

Watch for

  • False negatives on statistics that paraphrase source numbers
  • Over-flagging of rounded or approximated values that are substantively correct
  • Missing severity differentiation between material and trivial fabrications
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.