Inferensys

Prompt

Verbatim Quote vs Paraphrase Attribution Prompt

A practical prompt playbook for using Verbatim Quote vs Paraphrase Attribution Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

A practical guide for RAG system builders who need every generated statement explicitly labeled as verbatim or paraphrased with correct citation markers.

This prompt is for RAG system builders and AI engineers who need every statement in a generated answer to be explicitly labeled as either a verbatim quote or a paraphrase. The prompt forces the model to distinguish between exact text pulled from source documents and content it has synthesized, and to attach the correct citation markers to each. Use this when your product requires auditable attribution, when downstream review processes must verify quote accuracy, or when compliance rules mandate clear separation of original source language from AI-generated summary.

This prompt belongs in the answer-generation step of a RAG pipeline, after retrieval and evidence ranking are complete. It assumes you have already selected the most relevant source passages and are now ready to produce a labeled, citable answer. Do not use this prompt when you need fast, low-latency responses without attribution overhead, when your sources are not chunked with stable identifiers, or when the user experience cannot accommodate inline labels. It is also the wrong choice for creative or open-ended generation tasks where source fidelity is not the primary requirement.

Before deploying this prompt, ensure your retrieval pipeline produces passages with unique, stable identifiers that can survive through to the final answer. Test the prompt with edge cases: sources that are nearly identical, passages where the boundary between quote and paraphrase is ambiguous, and inputs where the model might fabricate a quote to satisfy the labeling requirement. Pair this prompt with a post-generation validation step that checks whether every [VERBATIM] label matches the exact text in the cited source. If your use case involves regulated content, add a human review step for any answer where the quote-to-paraphrase ratio exceeds a defined threshold or where the model's confidence in its labeling is low.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Verbatim Quote vs Paraphrase Attribution Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt belongs in your pipeline.

01

Good Fit: Compliance-Heavy Domains

Use when: legal, clinical, or financial outputs require a clear, auditable distinction between exact source language and synthesized interpretation. Guardrail: pair with a downstream quote-verification step that diffs verbatim claims against the original source chunk.

02

Bad Fit: Creative or Opinion-Based Content

Avoid when: generating marketing copy, subjective analysis, or brainstorming where source fidelity is not the primary goal. Guardrail: use a separate content-generation prompt without attribution constraints to avoid confusing the model with unnecessary citation overhead.

03

Required Input: Source-Anchored Context

Risk: the model cannot label statements as verbatim or paraphrased without access to the original source text. Guardrail: always provide the exact retrieved chunk alongside a unique source identifier. Reject requests where the source text is missing or truncated.

04

Operational Risk: Mislabeling Drift

What to watch: the model may gradually label paraphrased content as verbatim or vice versa, especially in long outputs. Guardrail: implement a periodic eval that samples labeled statements and checks a subset against the source using a string-similarity or entailment model.

05

Operational Risk: Quote Boundary Errors

What to watch: verbatim quotes may include extra words or omit critical qualifiers, changing meaning. Guardrail: enforce a maximum quote length and require exact character-span offsets in the output schema so a validator can trim and compare programmatically.

06

Bad Fit: Real-Time Conversational Chat

Avoid when: latency budgets are tight and users expect fluid, turn-by-turn dialogue rather than structured, attributed answers. Guardrail: route to a standard RAG answer prompt for chat, reserving this prompt for asynchronous report generation or audit-facing outputs.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable system prompt that forces the model to label every factual statement as verbatim or paraphrased with precise citation markers.

The prompt below is designed to be pasted directly into your system message or user message template. It instructs the model to classify every claim it makes about source material into one of two categories—[VERBATIM] for exact quotes and [PARAPHRASED] for synthesized content—and to attach the corresponding source identifier. Replace the square-bracket placeholders with your application's runtime values before sending the request. The template includes explicit rules for quote boundaries, mislabeling prevention, and what to do when the source text is ambiguous.

text
You are an attribution engine. Your job is to answer the user's question using ONLY the provided source documents. You must label every factual statement you make as either a verbatim quote or a paraphrase.

## INPUT

**User Question:** [USER_QUESTION]

**Source Documents:**
[SOURCE_DOCUMENTS]

## RULES

1. **Verbatim Quotes:** If you reproduce text exactly as it appears in a source, wrap the statement in `[VERBATIM]...[END VERBATIM]` tags. Immediately after the closing tag, include the source ID in brackets: `[source: [SOURCE_ID]]`. Do not alter punctuation, spelling, or wording inside a verbatim block.
2. **Paraphrased Statements:** If you restate, summarize, or synthesize information from a source in your own words, prefix the statement with `[PARAPHRASED]` and end it with `[source: [SOURCE_ID]]`. A paraphrase must not contain any sequence of five or more consecutive words identical to the source.
3. **Mixed Attribution:** If a single sentence contains both a verbatim phrase and paraphrased material, break it into separate labeled segments.
4. **No Unlabeled Claims:** Every factual claim that draws on a source document must carry exactly one label and one source ID. Common knowledge or logical deductions that do not depend on the sources should be labeled `[INFERRED]` and must not cite a source.
5. **Ambiguous Attribution:** If you cannot determine whether a statement is verbatim or paraphrased because the source is unclear, label it `[UNCERTAIN]` and include the best available source ID. Add a brief note in parentheses explaining the ambiguity.
6. **Quote Length Limit:** No single verbatim quote may exceed [MAX_QUOTE_LENGTH] words. If a longer quote is required, break it into multiple labeled segments or switch to paraphrase.
7. **Source Conflict:** If two sources contradict each other, present both claims with their labels and source IDs, then add a `[CONFLICT]` note summarizing the disagreement.

## OUTPUT FORMAT

Return your answer as plain text with inline labels. Do not use JSON or markdown tables for the answer body.

## EXAMPLE

**User Question:** What is the capital of France?

**Source Document 1 (ID: src_01):** "Paris is the capital and most populous city of France."

**Answer:**
[VERBATIM]Paris is the capital and most populous city of France.[END VERBATIM][source: src_01]

Adapt the template by adjusting the [MAX_QUOTE_LENGTH] placeholder to match your fair-use or compliance policy. If your source documents carry multiple metadata fields—such as page number, document version, or author—extend the source ID format to [source: [SOURCE_ID], page: [PAGE], date: [DATE]] and update the rules accordingly. For high-stakes domains like legal or clinical review, add a rule that requires human review when [UNCERTAIN] or [CONFLICT] labels appear. Test the prompt with edge cases: sources that are nearly identical, documents with OCR errors, and questions where the answer spans multiple chunks. If the model consistently mislabels short paraphrases as verbatim, tighten the consecutive-word threshold in Rule 2. If it overuses [INFERRED] to avoid citing sources, add a rule that [INFERRED] claims must be explicitly justified in a parenthetical note.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to distinguish verbatim quotes from paraphrased synthesis and attach the correct attribution markers. Validate each placeholder before sending to the model.

PlaceholderPurposeExampleValidation Notes

[SOURCE_TEXT]

The retrieved passage or document chunk that the model must analyze for quote vs paraphrase decisions

"The quarterly revenue increased by 14% year-over-year, driven primarily by enterprise subscription growth in North America."

Must be non-empty string. Truncate to model context window minus 2000 tokens. Strip non-printable characters. Fail if only whitespace.

[SOURCE_ID]

Unique identifier for the source document or chunk, used in citation markers

"doc-2025-q1-report-paragraph-3"

Must match pattern ^[a-zA-Z0-9_-]+$. Reject if empty or contains spaces. Map to retrievable document in source store before sending.

[SOURCE_METADATA]

Optional structured metadata about the source for inclusion in attribution

{"title": "Q1 2025 Earnings", "date": "2025-04-15", "page": 4, "author": "Finance Dept"}

If provided, must be valid JSON object. Null allowed. Strip any fields not in approved metadata schema. Reject if contains PII or access-control tokens.

[QUERY]

The user question or instruction that triggered retrieval, used to scope relevance of quotes

"What drove revenue growth last quarter?"

Must be non-empty string. Sanitize for prompt injection patterns before inclusion. Log original query for audit trail.

[QUOTE_LIMIT_RATIO]

Maximum allowed ratio of verbatim quoted characters to total answer characters, expressed as a decimal

0.15

Must be a float between 0.0 and 1.0. Default to 0.15 if not specified. Reject values below 0.05 or above 0.50 with a warning. Validate as numeric before prompt assembly.

[MAX_QUOTE_LENGTH]

Maximum character length for any single verbatim quote block

200

Must be a positive integer. Default to 200 if not specified. Reject values above 500 with a warning about fair use risk. Validate as integer before prompt assembly.

[CITATION_STYLE]

The citation format to use for both verbatim and paraphrase markers

"inline-bracket"

Must be one of: "inline-bracket", "footnote", "apa", "mla", "custom-json". Reject unknown values. If "custom-json", require [CITATION_SCHEMA] to be provided.

[OUTPUT_SCHEMA]

Expected structure for the model response, defining how quote and paraphrase segments are labeled

{"segments": [{"type": "verbatim|paraphrase", "text": "string", "citation": "string", "source_id": "string"}]}

Must be valid JSON schema. Validate parse before sending. Reject schemas that lack required fields: type, text, citation, source_id. Test schema against golden output samples.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Verbatim Quote vs Paraphrase Attribution Prompt into a production RAG pipeline with validation, retries, and human review.

This prompt is designed to sit between your retrieval system and the final answer renderer. It expects a user question and a set of retrieved source documents, and it returns a structured analysis where every factual claim is labeled as either verbatim or paraphrased with a corresponding citation. The implementation harness must enforce that the model's output conforms to this contract before the answer reaches the user. Because mislabeling a paraphrase as a verbatim quote is a factual error that can propagate downstream, the harness should treat label validation as a hard gate, not a best-effort suggestion.

Wire the prompt into your application as a post-retrieval, pre-rendering step. The typical flow: (1) user query triggers retrieval, (2) retrieved chunks are assembled into the [CONTEXT] variable with source IDs, (3) the prompt is invoked with the query and context, (4) the output is parsed and validated, (5) valid outputs proceed to the UI or API response, and (6) invalid outputs trigger a retry or escalate to human review. For validation, implement a post-processing check that extracts every verbatim claim, normalizes whitespace and punctuation, and performs a substring or fuzzy match against the provided source text. If a verbatim claim does not appear in the cited source, flag it as a mislabeling failure and either retry with a stricter temperature setting or route to a review queue. For paraphrased claims, validate that a source citation is present and that the claim does not match the source text verbatim beyond a configurable n-gram overlap threshold (e.g., 5 consecutive words).

Model choice matters here. Use a model with strong instruction-following and low hallucination rates for structured output tasks—GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro are reasonable defaults. Set temperature low (0.0–0.2) to reduce creative rephrasing that could blur the verbatim/paraphrase boundary. Implement a retry strategy: on the first validation failure, resubmit the same prompt with the validation error appended as a [CORRECTION_FEEDBACK] variable. On a second failure, log the full prompt, context, and output for manual review and fall back to a conservative mode that treats all claims as paraphrased with a visible uncertainty flag. For high-stakes domains (legal, clinical, compliance), always route verbatim claims that fail substring verification to a human reviewer before publication. Log every invocation with the prompt version, model, retrieval set IDs, validation results, and any human overrides to maintain an audit trail for citation accuracy over time.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the verbatim vs paraphrase attribution response. Every claim must be labeled with its attribution type and linked to a source.

Field or ElementType or FormatRequiredValidation Rule

attribution_label

enum: verbatim | paraphrase

Must be exactly 'verbatim' or 'paraphrase'. No other values allowed. Reject on mismatch.

claim_text

string

Non-empty string. If attribution_label is 'verbatim', claim_text must match source text exactly after whitespace normalization. If 'paraphrase', claim_text must not be a substring match of source.

source_id

string matching [SOURCE_ID] format

Must reference a valid source identifier present in the provided context. Null or missing source_id triggers a retry or human review.

citation_location

string or null

If attribution_label is 'verbatim', must include a locator such as page, paragraph, or chunk index. Null allowed for paraphrase. Format must match [LOCATOR_FORMAT] if present.

confidence

number between 0.0 and 1.0

Must be a float. Values below [CONFIDENCE_THRESHOLD] should trigger a low-confidence flag in the application layer. Values above 0.99 require source exact-match verification.

mislabeling_flag

boolean

Set to true if the model is uncertain whether the claim is verbatim or paraphrase. When true, the claim must be routed for human review before publication.

source_text_snippet

string

The exact passage from the source that supports this claim. Must be a substring of the provided context. Used for automated quote-verification checks.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when distinguishing verbatim quotes from paraphrased synthesis, and how to guard against it.

01

Paraphrase Drift into Fabrication

What to watch: The model labels a statement as 'paraphrased' but introduces facts, dates, or figures not present in the source context. The paraphrase mask hides hallucination. Guardrail: Require a post-generation verification step that diffs each paraphrased claim against the cited source chunk. Flag any claim containing entities or numbers absent from the original.

02

Verbatim Boundary Violation

What to watch: The model marks a passage as 'verbatim' but alters punctuation, drops qualifying words, or merges two non-adjacent sentences. The quote is close but not exact, breaking audit and legal requirements. Guardrail: Implement a string-similarity check (e.g., Levenshtein distance or substring match) between the labeled verbatim output and the source text. Reject or re-label outputs below a configurable threshold.

03

Misattributed Source Mapping

What to watch: A verbatim quote or paraphrase is correctly labeled but linked to the wrong source ID or document. The attribution looks valid but points to irrelevant context. Guardrail: Before finalizing the output, run a cross-check: does the cited source chunk actually contain the quoted or paraphrased text? Use a retrieval verification loop that re-queries the cited chunk.

04

Over-Citation of Paraphrased Content

What to watch: The model applies a single citation to a large block of paraphrased synthesis that actually blends three separate sources. The citation implies one source supports all claims. Guardrail: Enforce a citation granularity rule in the prompt: one citation per distinct claim or sentence. Post-process the output to detect multi-claim citation spans and split them.

05

Quote-to-Paraphrase Ratio Collapse

What to watch: Under pressure to avoid verbatim copying, the model paraphrases everything, including content that should be quoted exactly (legal definitions, technical specs, policy language). Guardrail: Define explicit categories of content that must be quoted verbatim in the system prompt. Add a post-generation check that scans for these categories and flags missing quotes.

06

Label Inconsistency Across Turns

What to watch: In multi-turn or long-form generation, the model starts by carefully labeling verbatim vs. paraphrase but gradually drops labels or mixes the two styles. Guardrail: Include a self-consistency check in the output schema that requires every sentence to carry an explicit label. Run a structural validator that rejects outputs with unlabeled claims before they reach the user.

IMPLEMENTATION TABLE

Evaluation Rubric

Score each criterion on a pass/fail basis. Run against a golden dataset of at least 50 question-context pairs with known correct labels.

CriterionPass StandardFailure SignalTest Method

Statement-Level Labeling

Every sentence or independent clause is labeled as verbatim or paraphrase.

Unlabeled statements or ambiguous markers like 'based on' without a label.

Parse output into statements; verify each has a label field present and non-null.

Verbatim Quote Fidelity

Text inside a verbatim label matches the source document character-for-character.

Added, removed, or altered words inside a verbatim block. Ellipsis used without brackets.

String equality check between the verbatim output and the source substring. Flag any edit distance > 0.

Paraphrase Semantic Equivalence

Paraphrased statements preserve the original claim without introducing new facts.

Paraphrase adds claims not present in the source or reverses the source's meaning.

Human review or LLM judge compares the paraphrase claim to the source sentence. Fail if entailment is contradicted.

Citation Presence

Every verbatim and paraphrase statement has a corresponding source citation.

A statement with no citation or a citation that points to a non-existent source ID.

Schema check: each statement object must have a non-null citation field. Validate source ID exists in the provided context.

Mislabeling Detection

No verbatim text is labeled as paraphrase, and no paraphrase is labeled as verbatim.

A direct copy-paste from the source is tagged as paraphrase, or a reworded sentence is tagged as verbatim.

For each statement, compute string similarity to the nearest source sentence. If similarity > 0.95 and label is paraphrase, fail. If similarity < 0.85 and label is verbatim, fail.

Quote Boundary Accuracy

Verbatim quotes start and end at logical sentence or clause boundaries without cutting words in half.

A verbatim quote that starts mid-word, ends mid-clause, or omits a necessary prefix for grammatical sense.

Check that the first and last characters of the verbatim string are not mid-word in the source. Verify the quote is a contiguous substring.

No Fabricated Quotes

All verbatim quotes exist exactly in the provided source documents.

A quote that cannot be found as a substring in any source document.

Substring search across all provided source documents. Fail if no match is found for a verbatim string.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of source documents. Use a single [LABEL] instruction: "Label each statement as [VERBATIM] or [PARAPHRASED] before the citation." Keep the output format loose (markdown or plain text) and manually spot-check 10-20 outputs for obvious mislabeling.

Watch for

  • The model silently paraphrasing verbatim text and labeling it [VERBATIM]
  • Inconsistent label placement (before vs. after the citation)
  • Missing labels on statements that blend quote and paraphrase
  • No validation of quote accuracy against source text
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.