Inferensys

Prompt

Rubric for Factual Accuracy Scoring Prompt Template

A practical prompt playbook for using Rubric for Factual Accuracy Scoring Prompt Template 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

A practical guide for verification teams and evaluation engineers who need to automatically grade the factual accuracy of an AI-generated output against a set of ground-truth evidence.

This prompt is designed for a specific, high-stakes job: turning a source document and an AI-generated output into a structured, repeatable factuality score. The ideal user is an evaluation engineer or a verification team lead who already has a 'known-correct' reference text and needs to programmatically determine if a summary, answer, or report faithfully represents it. The core value is in producing a detailed rubric that an LLM judge can apply consistently, moving factuality assessment from subjective human spot-checks to an automated, auditable process. This is not a general-purpose quality prompt; it is a precision instrument for a single dimension of quality: factual adherence to a provided source.

You should use this prompt when you have a clear ground-truth evidence set and need to score an output for factuality. This is common in RAG system evaluation, document summarization QA, and any workflow where an AI synthesizes information from a provided text. The prompt is built to handle nuance, including partial credit for statements that are mostly correct but have minor errors, and it classifies the severity of hallucinations. However, you must avoid using this prompt when the evaluation criteria are subjective, such as grading the 'creativity' of a story, the 'persuasiveness' of an argument, or the 'tone' of an email. It is strictly for measuring what is true, what is missing, and what is invented, based solely on the provided evidence.

Before integrating this prompt into your evaluation pipeline, ensure your ground-truth documents are well-structured and your AI outputs are scoped to the content of those documents. The prompt's effectiveness is entirely dependent on the quality and completeness of the [GROUND_TRUTH] you provide. A common failure mode is feeding it an output that requires external world knowledge not present in the evidence, which will lead to false positives for hallucination. The next step is to copy the prompt template and begin adapting the [OUTPUT_SCHEMA] and [SEVERITY_SCALE] to match your specific tolerance for error. Do not deploy this as a final gate without first running a calibration exercise against human evaluators to ensure the rubric's definitions of 'minor' and 'major' hallucination align with your team's standards.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it fails, and what you must have in place before relying on it for production factuality scoring.

01

Good Fit: Evidence-Backed Verification

Use when: you have a ground-truth document, reference answer, or source passage and need to score a generated claim against it. Guardrail: the prompt requires explicit evidence mapping; never use it to score outputs without providing the source material.

02

Bad Fit: Open-Domain Truth Assessment

Avoid when: you expect the model to determine factual accuracy using only its parametric knowledge. Risk: the judge will hallucinate its own "facts" and produce ungrounded scores. Guardrail: always supply the evidence; if no evidence exists, route to a human reviewer.

03

Required Inputs

Must provide: the candidate output text, the source evidence document, and the scoring rubric with explicit level definitions. Guardrail: missing evidence causes the prompt to fail silently; add a pre-flight check that rejects requests with empty evidence fields.

04

Operational Risk: Partial-Credit Drift

What to watch: judges may assign partial credit inconsistently for claims that are directionally correct but imprecise. Guardrail: define partial-credit rules with concrete examples in the rubric, and spot-check boundary cases weekly against human scores.

05

Operational Risk: Hallucination Severity Misclassification

What to watch: the judge may label minor imprecision as a major hallucination, or vice versa. Guardrail: include severity definitions with examples in the rubric, and log all "major" classifications for human audit before downstream action.

06

Scale Boundary: Multi-Document Claims

Avoid when: a single claim requires evidence from multiple conflicting sources. Risk: the judge may cherry-pick one source or produce an uninterpretable aggregate score. Guardrail: decompose multi-source claims into single-source sub-claims before scoring, or escalate to human review.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for scoring the factual accuracy of an AI-generated text against a set of ground-truth evidence documents.

This prompt template is designed to act as an LLM judge for factual accuracy. It instructs the model to extract verifiable claims from a [TARGET_TEXT], compare them against provided [GROUND_TRUTH_EVIDENCE], and produce a structured scorecard. The rubric includes rules for claim extraction, evidence matching, partial credit for nuanced statements, and a severity classification for any hallucinations found. Use this as the core instruction set for an automated evaluation pipeline.

markdown
You are a meticulous Factual Accuracy Judge. Your task is to evaluate the factual accuracy of the provided [TARGET_TEXT] against the [GROUND_TRUTH_EVIDENCE]. Follow these steps precisely and output the results in the specified [OUTPUT_SCHEMA].

### Step 1: Claim Extraction
1.  Decompose the [TARGET_TEXT] into a list of discrete, verifiable factual claims.
2.  A claim must be a single, self-contained statement that can be proven true or false.
3.  Ignore opinions, stylistic flourishes, and subjective statements unless they imply a verifiable fact.
4.  Output each claim with a unique `claim_id`.

### Step 2: Evidence Matching and Verification
For each extracted claim, search the [GROUND_TRUTH_EVIDENCE] to find supporting or contradicting information.
- **Supported:** The claim is directly and unambiguously confirmed by the evidence. Provide the exact quote from the evidence.
- **Contradicted:** The claim is directly and unambiguously disproven by the evidence. Provide the exact quote from the evidence.
- **Partially Supported:** The claim contains a mix of accurate and inaccurate information, or the evidence only confirms a portion of it. Explain the discrepancy.
- **Unverifiable:** The claim cannot be confirmed or denied based on the provided evidence. Do not use external knowledge.

### Step 3: Scoring
Assign a score to each claim based on the verification result:
- **1 (Accurate):** Claim is Supported.
- **0.5 (Partially Accurate):** Claim is Partially Supported.
- **0 (Inaccurate):** Claim is Contradicted.
- **NULL (Unverifiable):** Claim is Unverifiable. Exclude NULL scores from the final accuracy calculation.

### Step 4: Hallucination Severity Classification
For any claim scored as 0 (Inaccurate) or 0.5 (Partially Accurate), classify the severity of the error:
- **Critical:** The error introduces dangerous, harmful, or legally/financially damaging misinformation.
- **Major:** The error significantly alters the meaning or introduces a key false fact.
- **Minor:** The error is a small, non-material inaccuracy (e.g., a slightly wrong date, a misspelled name that doesn't change the entity).

### Step 5: Final Score Calculation
Calculate the overall factual accuracy score as: `(Sum of scores for all verifiable claims) / (Total number of verifiable claims)`. A verifiable claim is any claim not scored as NULL.

### Input Data
<TARGET_TEXT>
[TARGET_TEXT]
</TARGET_TEXT>

<GROUND_TRUTH_EVIDENCE>
[GROUND_TRUTH_EVIDENCE]
</GROUND_TRUTH_EVIDENCE>

### Output Schema
You must output a single JSON object matching this exact schema:
{
  "overall_factual_accuracy_score": "number",
  "total_verifiable_claims": "integer",
  "claim_verifications": [
    {
      "claim_id": "string",
      "claim_text": "string",
      "verification_result": "Supported | Contradicted | Partially Supported | Unverifiable",
      "evidence_quote": "string or null",
      "score": "number (1, 0.5, 0, or null)",
      "severity": "Critical | Major | Minor | null",
      "judge_rationale": "string"
    }
  ],
  "overall_summary": "string"
}

To adapt this template, replace the [TARGET_TEXT] and [GROUND_TRUTH_EVIDENCE] placeholders with your actual data. For high-stakes domains like healthcare or finance, the severity classification becomes critical for downstream routing. You can adjust the scoring weights or add new verification results like "Opinion" if your use case requires it. The key to reliable output is enforcing the [OUTPUT_SCHEMA] in your application's API call or parser, and always logging the judge_rationale field to debug scoring inconsistencies.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the Rubric for Factual Accuracy Scoring prompt needs to produce reliable, evidence-grounded evaluations. Each placeholder must be populated before the prompt is sent to the judge model.

PlaceholderPurposeExampleValidation Notes

[CLAIMS_TO_EVALUATE]

The list of extracted claims the judge must verify against evidence

Claim 1: The API was deprecated in Q3 2023. Claim 2: Migration takes under 5 minutes.

Must be a non-empty list of discrete, atomic claims. Each claim should be a single verifiable statement. Null or empty list should abort evaluation.

[GROUND_TRUTH_EVIDENCE]

The authoritative source text against which claims are checked

Official changelog: 'v2 API sunset effective 2023-09-15. Migration guide estimates 10-15 minutes for standard integrations.'

Must be a non-empty string. Should be the complete, unaltered source passage. Truncated evidence may cause false hallucination flags.

[SCORING_SCALE]

The numeric or categorical scale for rating each claim's factual accuracy

0: False, 1: Partially True, 2: True, 3: True with Exact Citation

Must define clear, mutually exclusive levels. Avoid scales with ambiguous midpoints. Validate that the scale can represent partial credit and exact matches distinctly.

[PARTIAL_CREDIT_RULES]

Instructions for handling claims that are partially correct or contain minor errors

Award 1 if the core fact is correct but a secondary detail is wrong. Award 0 if the core fact is false.

Must define what constitutes 'core' vs 'secondary' detail. Ambiguous rules cause inter-rater drift. Test with borderline examples before production use.

[HALLUCINATION_SEVERITY_CLASSES]

Definitions for classifying unsupported or contradictory claims by severity

Critical: Fabricated safety or compliance information. Major: Invented statistics or dates. Minor: Incorrect version number where context is clear.

Each class must have a concrete, testable definition. Avoid subjective terms like 'important' without operationalizing them. Validate that severity classes are mutually exclusive.

[CITATION_FORMAT_REQUIREMENT]

The required format for citing evidence that supports a claim

Quote the exact supporting sentence and provide the paragraph index. Format: 'Para [N]: [exact quote]'

Must specify whether direct quotes, paraphrases, or paragraph indices are required. Inconsistent citation formats break downstream evidence-linking tools.

[OUTPUT_SCHEMA]

The exact JSON structure the judge must return for each claim

{ claim_id, verdict, score, evidence_quote, severity, rationale }

Must be a valid JSON Schema or strict example. Validate that all required fields are present in every response. Missing rationale fields break audit trails.

[ABSTENTION_CONDITIONS]

Rules for when the judge should refuse to score a claim due to insufficient evidence

Abstain if the evidence does not address the claim's subject at all. Do not abstain if evidence partially addresses it.

Must distinguish between 'no relevant evidence' and 'contradictory evidence'. Abstention should produce a distinct output, not a default score. Validate that abstention rate is monitored in production.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the factual accuracy scoring prompt into a production evaluation pipeline with validation, retries, and human review gates.

This prompt is designed to be called programmatically as part of an automated evaluation pipeline, not as a one-off manual check. The typical integration pattern places this prompt after an LLM has generated a response and after a retrieval step has provided source evidence. The harness should pass the generated text as [RESPONSE], the source documents as [SOURCE_EVIDENCE], and any domain-specific factuality constraints as [DOMAIN_CONSTRAINTS]. The output is a structured JSON object containing extracted claims, evidence matches, partial-credit assignments, and hallucination severity classifications. This output should be parsed by the application layer, not left as raw text for human interpretation.

Validation and retry logic is critical because the prompt produces a complex nested schema. Implement a JSON schema validator that checks for required fields (claims, overall_score, hallucination_severity), correct enum values for severity levels (none, minor, moderate, major, critical), and numeric score ranges (0.0 to 1.0). If validation fails, retry the prompt once with the validation error message appended to the [CONSTRAINTS] field, instructing the model to fix the schema violation. If the second attempt also fails, log the raw output and route the sample to a human review queue rather than silently accepting a malformed score. For high-stakes domains like healthcare or legal review, set [RISK_LEVEL] to high to trigger mandatory human verification of any output where hallucination_severity is major or critical.

Model choice and latency considerations matter for this prompt because claim extraction and evidence matching are reasoning-intensive tasks. Use a capable model (GPT-4, Claude 3.5 Sonnet, or equivalent) for the primary scoring pass. For cost optimization on large evaluation batches, consider a two-stage architecture: use a faster, cheaper model to extract claims and flag potential issues, then route only flagged or borderline samples to the full rubric prompt. Store all outputs with prompt_version, model_id, timestamp, and source_document_ids for auditability. When integrating with RAG systems, ensure [SOURCE_EVIDENCE] includes document chunk IDs so the evaluation output can trace each claim back to its supporting or contradicting source. Avoid using this prompt on streaming outputs—always score complete, finalized responses to prevent partial-claim extraction errors.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required JSON structure, field types, and validation rules for the factual accuracy scoring output. Use this contract to parse and validate the LLM judge's response before accepting scores.

Field or ElementType or FormatRequiredValidation Rule

overall_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Parse check: JSON number. Schema check: minimum 0, maximum 1.

hallucination_severity

string enum

Must be one of: 'none', 'minor', 'moderate', 'major', 'critical'. Parse check: exact string match against allowed enum values.

claims

array of objects

Must be a non-empty JSON array. Schema check: minItems 1. Each element must match the claim object schema.

claims[].text

string

The extracted claim text. Cannot be empty or whitespace-only. Parse check: string.length > 0 after trim.

claims[].verdict

string enum

Must be one of: 'supported', 'partially_supported', 'unsupported', 'contradicted'. Parse check: exact string match against allowed enum values.

claims[].evidence_match

string or null

Citation or reference to source evidence. Required when verdict is 'supported' or 'partially_supported'. Null allowed for 'unsupported' or 'contradicted'. Parse check: string or null.

claims[].confidence

number (0.0-1.0)

Judge's confidence in the verdict. Must be a float between 0.0 and 1.0 inclusive. Parse check: JSON number. Schema check: minimum 0, maximum 1.

claims[].rationale

string

Brief explanation for the verdict. Cannot be empty. Parse check: string.length > 0 after trim. No citation required here; evidence_match handles that.

PRACTICAL GUARDRAILS

Common Failure Modes

Factual accuracy scoring rubrics fail in predictable ways. These cards cover the most common failure modes, why they happen, and how to guard against them before they reach production.

01

Evidence Mismatch Drift

What to watch: The judge scores claims against retrieved evidence that doesn't actually contain the answer, producing false negatives. This happens when retrieval returns tangentially relevant documents that the judge treats as authoritative. Guardrail: Add a prerequisite check in the rubric requiring the judge to first verify that the provided evidence is sufficient to evaluate each claim. If evidence is insufficient, the claim should be flagged as unevaluable rather than scored as incorrect.

02

Partial-Credit Inflation

What to watch: Judges over-reward partially correct statements, assigning high scores to outputs that are directionally right but factually wrong on specifics. This is common when the rubric's partial-credit rules are too generous or lack precision thresholds. Guardrail: Define explicit partial-credit boundaries with numeric precision requirements. For example, require exact values for quantitative claims and penalize off-by-one errors differently than order-of-magnitude errors.

03

Hallucination Severity Blindness

What to watch: The rubric treats all hallucinations equally, failing to distinguish between a minor date error and a fabricated safety claim. This produces scores that look acceptable but mask dangerous failures. Guardrail: Implement a severity classification tier in the rubric that separates cosmetic errors from substantive fabrications. Require the judge to output a severity label alongside each score, with automatic escalation for high-severity hallucinations regardless of aggregate score.

04

Claim Extraction Boundary Errors

What to watch: The judge extracts claims at the wrong granularity—either too coarse, missing embedded falsehoods inside mostly-true sentences, or too fine, penalizing trivial wording differences. Guardrail: Include explicit claim segmentation rules in the rubric with examples of correct and incorrect granularity. Define atomic claim boundaries: one verifiable proposition per claim. Validate extraction quality on a calibration set before deploying the rubric.

05

Source Conflict Paralysis

What to watch: When multiple evidence sources disagree, the judge either picks one arbitrarily or refuses to score, producing inconsistent results across runs. Guardrail: Add conflict resolution rules to the rubric specifying how to handle contradictory evidence: prefer more recent sources, flag conflicts explicitly, and score claims as disputed rather than correct or incorrect when evidence is genuinely contradictory.

06

Judge Overconfidence on Ambiguous Claims

What to watch: The judge assigns high-confidence scores to claims that are inherently ambiguous or underspecified, treating vague language as correct when it happens to align with evidence by coincidence. Guardrail: Require the judge to output a confidence score alongside each claim evaluation. Add a rubric rule that ambiguous claims must be scored lower or flagged for human review, even if they technically match evidence. Calibrate confidence thresholds against human annotator agreement rates.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test whether the Factual Accuracy Scoring Prompt Template produces reliable, repeatable scores before integrating it into a production evaluation pipeline.

CriterionPass StandardFailure SignalTest Method

Claim Extraction Completeness

All verifiable factual claims in [INPUT] are extracted into the claims list with no omissions

A verifiable claim present in the source text is missing from the extracted claims array

Run 10 golden examples with known claim counts; verify extracted count matches expected count within 1 claim tolerance

Evidence Matching Accuracy

Each extracted claim is paired with the correct [EVIDENCE] passage that supports or contradicts it

A claim is matched to an irrelevant evidence passage, or a directly relevant passage is ignored

Spot-check 20 claim-evidence pairs against human annotations; require 90% exact match rate

Support Verdict Correctness

Supported, Contradicted, and Not Enough Info verdicts match human judgments on a calibrated test set

A claim with direct supporting evidence is marked Contradicted, or vice versa

Run against 50 pre-labeled claim-evidence pairs; require Cohen's kappa >= 0.8 against human consensus

Partial Credit Scoring Consistency

Partially correct claims receive scores between 0.3 and 0.7 with a rationale explaining what was correct and what was not

A claim with a major factual error receives a score above 0.7, or a trivially incomplete claim receives 0.0

Test 15 partially correct examples; verify scores fall within expected ranges and rationales cite specific evidence

Hallucination Severity Classification

Hallucinations are classified as Minor, Moderate, or Critical using the defined severity criteria

A fabricated statistic is classified as Minor, or a minor date error is classified as Critical

Run 10 hallucination examples with known severity labels; require 85% exact severity match rate

Aggregate Score Calculation

The final factual accuracy score is computed correctly from individual claim scores using the defined aggregation formula

Aggregate score deviates from manual calculation by more than 0.05 on a 0-1 scale

Automated validation: parse output JSON, recompute aggregate from claim scores, assert difference < 0.05

Output Schema Compliance

Output JSON matches the [OUTPUT_SCHEMA] exactly: all required fields present, correct types, no extra fields

Missing claims array, malformed severity field, or extra unexpected top-level keys

Schema validation script: JSON Schema check passes with no errors on 100 consecutive outputs

Abstention on Non-Factual Content

Opinions, speculation, and non-verifiable statements are excluded from scoring with an explicit Not Verifiable label

An opinion statement is scored as Supported or Contradicted, or included in the aggregate calculation

Test 5 inputs containing mixed fact and opinion; verify opinion claims are flagged Not Verifiable and excluded from aggregate

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base rubric template but remove partial-credit granularity and severity classification. Use a simple 1–3 scale (Unsupported, Partially Supported, Fully Supported) with one-sentence level descriptions. Run against 10–20 outputs and spot-check agreement manually.

Watch for

  • Overly generous scoring on vague claims
  • No evidence-matching rules, leading to inconsistent grades
  • Missing claim extraction step—judge scores whole text instead of individual claims
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.