Inferensys

Prompt

Faithful Synthesis vs. Fabrication Classification Prompt

A practical prompt playbook for using Faithful Synthesis vs. Fabrication Classification 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

Understand the job-to-be-done, required context, and operational boundaries for the Faithful Synthesis vs. Fabrication Classification Prompt.

This prompt is designed for eval pipeline builders and quality assurance engineers who need to distinguish legitimate paraphrasing from hallucinated content in RAG-generated answers. Its core job is to classify each segment of an answer as faithful synthesis (rephrasing grounded in source evidence), unsupported inference (logical leaps beyond the evidence), or fabrication (content with no source basis). Use this prompt as a post-generation guardrail before answers reach users, as a component in automated evaluation pipelines, or to calibrate inter-annotator agreement across human reviewers and LLM judges. It assumes you already have a generated answer and the retrieved context that was provided to the generation model. This is not a generation prompt; it is a classification and verification prompt that operates on existing outputs.

The ideal user has a RAG pipeline in production and needs automated, structured quality signals to gate answers before delivery. You should use this prompt when: (a) you need segment-level granularity rather than a single holistic score, (b) you want a rationale grounded in specific source passages to enable downstream remediation, or (c) you are building an eval harness that requires inter-annotator agreement metrics between human reviewers and LLM judges. The prompt expects two inputs: the full generated answer and the complete retrieved context provided to the generation model. Do not truncate or summarize the context before passing it—this prompt relies on exact source matching to produce accurate classifications.

Do not use this prompt as a substitute for retrieval quality evaluation. It classifies answer fidelity given the provided context, but it cannot detect whether the retrieval step itself returned irrelevant or incomplete documents. For that, pair it with an evidence sufficiency gate or retrieval relevance scorer upstream. Also avoid using this prompt for real-time user-facing latency budgets under 500ms without a fast model; the segment-by-segment analysis is thorough but token-intensive. In regulated environments, treat the output as a screening signal, not a final determination—always maintain a human review path for answers flagged with fabrications or contradictions. Next, copy the prompt template in the following section and adapt the output schema to match your downstream logging or gating system.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Faithful Synthesis vs. Fabrication Classification Prompt works, where it fails, and what you must provide before deploying it in an evaluation pipeline.

01

Good Fit: Pre-Release QA Gates

Use when: you need an automated, scalable check to classify answer segments before they reach users. This prompt excels in CI/CD pipelines that block deployments when fabrication rates exceed a threshold. Guardrail: Pair the classification output with a severity score. Route 'fabrication' labels to a human review queue and 'unsupported inference' to a logging dashboard for trend analysis.

02

Bad Fit: Real-Time User-Facing Guardrails

Avoid when: latency budgets are under 500ms. Running a secondary LLM call to classify every generated sentence adds significant overhead and cost, making it unsuitable for synchronous chat interactions. Guardrail: Use this prompt for offline evaluation and dataset curation. For real-time checks, rely on lightweight NLI models or embedding similarity thresholds.

03

Required Input: Ground-Truth Source Evidence

Risk: The classifier cannot detect fabrication if the source context is missing, truncated, or irrelevant. Without the exact passage the model was supposed to use, the prompt will hallucinate its own judgment. Guardrail: Always pass the specific retrieved chunks alongside the answer. Implement a pre-flight check that aborts classification if the source evidence field is empty or under a minimum token length.

04

Operational Risk: Inter-Annotator Drift

Risk: The boundary between 'faithful synthesis' and 'unsupported inference' is subjective. Without calibration, the classifier may drift over time, labeling acceptable paraphrasing as hallucination and eroding trust in the eval pipeline. Guardrail: Maintain a golden dataset of 50-100 labeled examples covering edge cases. Run this prompt against the golden set weekly and track precision/recall. Retune the prompt instructions when metrics drop below 0.85 F1.

05

Bad Fit: Creative or Subjective Content

Avoid when: evaluating marketing copy, narrative summaries, or opinion pieces where stylistic embellishment is expected. The prompt will flag legitimate creative language as 'fabrication' because it deviates from source phrasing. Guardrail: Restrict this prompt to factual Q&A, technical documentation, and compliance workflows. For creative content, use a separate 'brand voice adherence' rubric instead.

06

Required Input: Stable Classification Taxonomy

Risk: If the labels ('faithful synthesis', 'unsupported inference', 'fabrication') are not explicitly defined with examples, the model will invent its own definitions, producing inconsistent and unactionable output. Guardrail: Include a compact taxonomy definition directly in the system prompt. Provide one positive and one negative example for each label. Validate that the output JSON strictly conforms to the allowed enum values.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt template for classifying answer segments as faithful synthesis, unsupported inference, or fabrication against source evidence.

This prompt template is designed for eval pipeline builders who need to programmatically distinguish legitimate paraphrasing from hallucinated content in RAG-generated answers. It classifies each segment of a generated answer against the provided source context, producing a structured classification label with a rationale grounded in source evidence. The template uses square-bracket placeholders for all inputs, making it straightforward to integrate into automated evaluation harnesses, CI/CD pipelines, or human review queues.

code
You are an expert factuality classifier. Your task is to compare each segment of a generated answer against the provided source context and classify it into one of three categories.

## INPUTS

### Source Context
[SOURCE_CONTEXT]

### Generated Answer
[GENERATED_ANSWER]

### Classification Definitions
- **Faithful Synthesis**: The segment accurately paraphrases, summarizes, or restates information explicitly present in the source context. Minor wording changes that preserve meaning are acceptable.
- **Unsupported Inference**: The segment draws a reasonable conclusion or implication from the source context, but the exact claim is not explicitly stated. The inference must be logically derivable from the evidence.
- **Fabrication**: The segment introduces information, claims, facts, or details that are neither stated in nor reasonably inferable from the source context. This includes invented numbers, names, dates, events, or assertions that contradict the source.

## OUTPUT SCHEMA
Return a JSON object with the following structure:
{
  "classifications": [
    {
      "segment_text": "The exact text from the generated answer being classified",
      "segment_start_char": 0,
      "segment_end_char": 0,
      "classification": "faithful_synthesis | unsupported_inference | fabrication",
      "rationale": "Explanation grounded in the source context. Cite the specific source passage(s) that support or fail to support this segment.",
      "supporting_source_spans": ["Exact quoted text from the source context that supports the classification, or empty array if none exists"],
      "confidence": "high | medium | low"
    }
  ],
  "summary": {
    "total_segments": 0,
    "faithful_synthesis_count": 0,
    "unsupported_inference_count": 0,
    "fabrication_count": 0,
    "overall_faithfulness_score": 0.0
  }
}

## CONSTRAINTS
- Classify every factual claim in the answer. Do not skip segments.
- If a segment contains multiple claims, split it into separate classification entries.
- For NO_EVIDENCE classifications, the supporting_source_spans array must be empty.
- The overall_faithfulness_score is calculated as: (faithful_synthesis_count + unsupported_inference_count) / total_segments. Fabrications reduce this score.
- If the source context is empty or missing, classify all segments as NO_EVIDENCE with confidence "low".
- Do not use external knowledge. Base all classifications solely on the provided source context.

## EXAMPLES
[EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]

To adapt this prompt for your pipeline, replace the square-bracket placeholders with your actual data. The [SOURCE_CONTEXT] should contain the retrieved passages that were used to generate the answer. The [GENERATED_ANSWER] should contain the full text output from your RAG system. For [OUTPUT_SCHEMA], you can use the provided JSON schema or substitute your own structured format. The [EXAMPLES] placeholder should be populated with 2-3 annotated few-shot examples showing correct classifications for each category, which significantly improves classification accuracy. Set [RISK_LEVEL] to "high" for healthcare, legal, or financial use cases where fabrication is unacceptable, or "medium" for general Q&A systems. For high-risk deployments, always route low-confidence classifications and fabrication detections to a human review queue before taking automated action.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Faithful Synthesis vs. Fabrication Classification Prompt. Each placeholder must be populated before the prompt is sent to the model. Missing or malformed inputs are the most common cause of false positives in fabrication detection.

PlaceholderPurposeExampleValidation Notes

[ANSWER_TEXT]

The generated answer segment to classify. Can be a full answer, paragraph, or single sentence.

The patient's blood pressure was elevated at 140/90 mmHg, indicating stage 2 hypertension.

Must be non-empty string. Length under 4000 tokens. If longer, split into segments and classify each separately.

[SOURCE_EVIDENCE]

The retrieved source passages that the answer claims to be based on. One or more passages with document identifiers.

DOC-12: Patient presented with BP of 140/90 mmHg. DOC-12: No hypertension diagnosis recorded.

Must contain at least one passage with a document ID. Each passage must have a unique identifier. Null or empty triggers abstention classification.

[CLASSIFICATION_LABELS]

The set of valid classification labels the model must choose from. Defines the taxonomy boundary.

faithful_synthesis, unsupported_inference, fabrication

Must be a closed set of 2-5 labels. Each label must have a clear definition in the prompt instructions. Open-ended labels produce inconsistent results.

[LABEL_DEFINITIONS]

Precise definitions for each classification label, including edge-case guidance. Calibrates the model's judgment boundary.

faithful_synthesis: All claims are directly stated or legitimately paraphrased from source. unsupported_inference: Adds plausible but unstated details. fabrication: Introduces claims contradicted by or absent from source.

Each label must have a definition with inclusion and exclusion criteria. Vague definitions cause inter-annotator drift. Test with 10+ edge cases before production use.

[RATIONALE_REQUIREMENT]

Whether the model must produce a rationale alongside the classification label. Controls output verbosity and auditability.

Must be boolean. When true, output contract must include a rationale field. When false, classification-only output is acceptable. Set to true for calibration and debugging runs.

[EVIDENCE_SPAN_FORMAT]

The format for citing specific evidence spans that support or contradict the classification. Enables downstream verification.

document_id:start_char-end_char

Must define a parseable span format. Validate that spans resolve to real character offsets in source passages. Null allowed if span extraction is handled by a separate prompt.

[INTER_ANNOTATOR_REFERENCE]

Optional reference classifications from human annotators for agreement checking. Used during calibration, not production.

[{"segment_id": "A1", "label": "faithful_synthesis", "annotator": "judge_1"}]

If provided, must be a JSON array with segment_id, label, and annotator fields. Used to compute agreement metrics. Null allowed for production runs.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Faithful Synthesis vs. Fabrication Classification Prompt into an eval pipeline or production guardrail.

This classification prompt is designed to operate as a post-generation guardrail within an automated evaluation pipeline or a synchronous production filter. Its primary job is to receive a segment of generated text alongside the source evidence and return a structured label—faithful synthesis, unsupported inference, or fabrication—with a grounded rationale. The harness must treat this prompt as a deterministic component: it expects a specific input schema, produces a parseable output, and should be wrapped with validation, retry logic, and logging before any decision is made to block, flag, or release content to a user.

To integrate this prompt, construct a harness function that accepts [ANSWER_SEGMENT] and [SOURCE_EVIDENCE] as inputs. The function should call the model with a low temperature (e.g., 0.0–0.2) to maximize classification stability. Parse the response into a strict schema expecting at minimum classification (an enum of FAITHFUL_SYNTHESIS, UNSUPPORTED_INFERENCE, FABRICATION) and rationale (a string grounded in the provided evidence). Implement a validation layer that rejects any response missing these fields or containing an unrecognized classification value. On validation failure, retry once with the error message appended to the prompt as a correction hint. If the retry also fails, escalate the segment for human review rather than silently passing or blocking. Log every classification result—including the model, prompt version, input hashes, and latency—to enable drift detection and inter-annotator agreement analysis over time.

For high-stakes production use, do not rely on a single classification pass. Run the prompt against the same segment with multiple models or multiple temperature seeds and compare outputs. If classifications diverge, route the segment to a human review queue. This inter-annotator check is essential for catching edge cases where the model is uncertain about the boundary between legitimate paraphrasing and unsupported inference. Additionally, consider batching multiple segments from the same answer into a single classification request to reduce API overhead, but be aware that longer inputs may degrade classification accuracy on individual segments. Always store the source evidence alongside the classification result so that downstream auditors can verify the rationale. The next step after implementing this harness is to run a calibration pass against a golden dataset of human-labeled segments to establish your precision and recall baselines before enabling automated blocking.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the Faithful Synthesis vs. Fabrication Classification output. Use this contract to parse and validate the model's response before downstream consumption.

Field or ElementType or FormatRequiredValidation Rule

classification_label

enum: FAITHFUL_SYNTHESIS | UNSUPPORTED_INFERENCE | FABRICATION

Must match one of the three enum values exactly. Case-sensitive. Reject on any other value.

rationale

string

Must be non-empty and contain at least one explicit reference to a source passage or the absence of source support. Minimum 20 characters.

source_evidence_spans

array of objects

Each object must contain document_id (string) and excerpt (string). Array must not be empty for FAITHFUL_SYNTHESIS. Excerpt must be a substring of the provided context.

confidence_score

number (0.0 to 1.0)

Must be a float between 0.0 and 1.0 inclusive. Reject if outside range or non-numeric. Scores below 0.7 should trigger human review if classification is FAITHFUL_SYNTHESIS.

flagged_span

object with start_char and end_char

Required when classification is FABRICATION or UNSUPPORTED_INFERENCE. start_char and end_char must be integers and valid offsets into the answer text. start_char must be less than end_char.

alternative_phrasing

string or null

Null allowed. When present, must be a grounded rephrasing of the flagged span that stays within source evidence. Must not introduce new claims. Length must differ from flagged_span.

inter_annotator_agreement_note

string or null

Null allowed. When present, indicates this classification was compared against a second judge. Must contain agreement_status (agree/disagree) and a brief note if disagree.

PRACTICAL GUARDRAILS

Common Failure Modes

The Faithful Synthesis vs. Fabrication Classification Prompt is a powerful eval tool, but it inherits specific failure modes from both the classification task and the underlying model. Here are the most common breaks and how to guard against them before they corrupt your eval pipeline.

01

Source-Synthesis Boundary Blur

What to watch: The classifier confuses a faithful paraphrase that uses different vocabulary with a fabrication because the exact keywords don't match. This inflates false positives and flags legitimate synthesis as hallucination. Guardrail: Include explicit instructions and few-shot examples that distinguish lexical variation from semantic drift. Calibrate with a golden set where faithful paraphrases are labeled correctly.

02

Low Inter-Annotator Agreement Drift

What to watch: The model's classification boundaries shift between runs, causing the same answer segment to be labeled 'faithful synthesis' in one pass and 'unsupported inference' in the next. This undermines eval reliability. Guardrail: Run the classifier multiple times with temperature=0 and measure self-consistency. If agreement is below 0.9, refine the rubric with sharper boundary examples and re-anchor the prompt.

03

Evidence Blindness on Long Contexts

What to watch: When source passages are long or numerous, the classifier misses key evidence and falsely flags a claim as unsupported. The model attends to the beginning and end of the context window while ignoring the middle. Guardrail: Pre-chunk evidence and run verification per-chunk. If a claim is flagged as unsupported, re-run the check with only the top-k most relevant passages rather than the full context dump.

04

Unsupported Inference Misclassification

What to watch: The classifier labels a plausible-but-unsupported inference as 'faithful synthesis' because the inference feels logically consistent with the evidence. This is the most dangerous false negative—the model agrees with a fabrication because it makes sense. Guardrail: Add a hard rule in the prompt: If the statement introduces any fact, comparison, or causal claim not explicitly stated in the source, classify it as unsupported inference, even if it seems reasonable. Test with adversarial examples that sound correct but lack evidence.

05

Rationale Hallucination

What to watch: The classifier generates a plausible-sounding rationale that misrepresents what the source actually says, fabricating a justification for its classification label. The label may be correct by accident, but the rationale is untrustworthy. Guardrail: Add a post-hoc check: extract the quoted evidence span from the rationale and verify it appears verbatim in the source. If the quote is absent or altered, flag the classification for human review regardless of the label.

06

Class Imbalance and Over-Prediction

What to watch: If your eval dataset skews heavily toward one class (e.g., 90% faithful synthesis), the classifier defaults to the majority class and misses rare but critical fabrications. Recall on the minority class collapses. Guardrail: Stratify your eval set to ensure balanced representation across all three classes. Monitor per-class precision and recall separately. If minority-class recall drops below 0.85, add targeted few-shot examples for the under-detected class.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing whether the Faithful Synthesis vs. Fabrication Classification Prompt reliably separates grounded paraphrasing from hallucinated content before shipping into an eval pipeline.

CriterionPass StandardFailure SignalTest Method

Classification Accuracy on Ground-Truth Set

≥ 90% agreement with human-annotated labels on a held-out test set of 50+ segments

Classification label disagrees with human ground truth for more than 10% of test segments

Run prompt against annotated golden dataset; compute precision, recall, and F1 per class

Inter-Annotator Agreement Calibration

Model's classification distribution falls within ±5% of human annotator agreement rate on ambiguous cases

Model is consistently more confident than human annotators on segments humans flagged as borderline

Compare model confidence scores to human agreement rates on a 20-segment ambiguity subset

Fabrication Recall (No Missed Hallucinations)

≥ 95% of human-labeled fabrication segments correctly classified as fabrication

Fabrication segments misclassified as faithful synthesis or unsupported inference

Measure recall on fabrication class specifically; inspect all false negatives manually

Faithful Synthesis Precision (No False Accusations)

≥ 90% of segments classified as faithful synthesis are human-confirmed as grounded in source

Source-grounded paraphrases incorrectly flagged as fabrication or unsupported inference

Measure precision on faithful synthesis class; review false positives for over-flagging patterns

Rationale Grounding Quality

≥ 85% of rationales cite specific source passages or spans that support the classification decision

Rationales contain vague language like 'seems unsupported' without pointing to missing or present evidence

Spot-check 30 rationales; verify each rationale references concrete source content or its absence

Unsupported Inference Boundary Handling

Model correctly distinguishes unsupported inference from fabrication in ≥ 80% of borderline cases

Reasonable inferences from evidence are misclassified as fabrication, or vice versa

Curate 15 borderline segments where humans split on inference vs. fabrication; measure alignment with majority human label

Output Schema Compliance

100% of responses parse as valid JSON matching the expected schema with all required fields present

Missing classification label, rationale field, or malformed JSON that breaks downstream parsing

Validate all outputs against JSON Schema; flag any response that fails structural validation

Latency and Cost Budget

Average classification latency under 2 seconds per segment; cost under $0.01 per segment at production scale

Latency exceeds 5 seconds or cost per segment spikes above budget threshold under load

Benchmark with 100-segment batch; measure p50/p95 latency and token cost per classification

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base classification prompt and a small set of 10-20 answer-context pairs. Use a single model call without schema enforcement. Accept raw text output and manually review classifications to calibrate your definitions of 'faithful synthesis,' 'unsupported inference,' and 'fabrication.'

Prompt modification

code
Classify each segment of [ANSWER] against [CONTEXT] as:
- FAITHFUL: meaning preserved, only from context
- INFERENCE: reasonable but not explicit in context
- FABRICATION: contradicts or invents outside context

Return one label per segment with a short rationale.

Watch for

  • Inconsistent boundary between inference and fabrication
  • Model treating stylistic rewording as fabrication
  • Missing rationale when label is ambiguous
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.