This prompt is for RAG-augmented assistant deployments where every factual claim must be traceable to a provided source, and citation discipline is a non-negotiable product requirement. The primary job-to-be-done is automated compliance surveillance: you need a secondary evaluator that reads recent assistant responses and checks whether they adhere to the session's citation policy. The ideal user is an AI engineer or platform operator who already has a working RAG pipeline but is seeing citation fatigue, unsupported claims, or source drift in long-running sessions. You should use this prompt when your assistant operates in a domain where unsupported statements carry regulatory, clinical, financial, or brand risk, and where human review of every turn does not scale.
Prompt
Citation Policy Enforcement Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Citation Policy Enforcement Prompt.
This prompt is not a replacement for a well-structured system prompt or retrieval pipeline. It is a guardrail that sits in the evaluation layer, typically invoked every N turns or when a confidence threshold is crossed. You should not use this prompt for single-turn Q&A where citation requirements are simple enough to enforce in the generation prompt itself. It is also not suitable for creative or open-ended conversational use cases where factual grounding is not expected. The prompt requires access to the original retrieved sources, the assistant's recent responses, and the session's citation policy definition. Without these three inputs, the compliance check will produce unreliable results.
Before deploying this prompt, ensure you have defined a concrete citation policy that specifies what requires a citation, acceptable citation formats, and how to handle conflicting sources. The prompt works best when paired with a re-prompting workflow: if the compliance check fails, the flagged response should be regenerated with the violation details injected as corrective context. Start by running this prompt on a sample of historical sessions to calibrate your failure thresholds, then integrate it into your production evaluation loop with logging and human spot-checking for edge cases.
Use Case Fit
Where the Citation Policy Enforcement Prompt works and where it introduces risk. Use these cards to decide if this prompt fits your workflow before integrating it into a production harness.
Good Fit: RAG Pipelines with Mandatory Attribution
Use when: your product requires every factual claim to be traceable to a retrieved source chunk, and missing citations are a compliance or trust defect. Guardrail: Run this enforcement prompt as a post-generation check before the user sees the output, blocking uncited claims from reaching the UI.
Bad Fit: Creative or Open-Ended Dialogue
Avoid when: the assistant is designed for brainstorming, creative writing, or casual conversation where strict source grounding would degrade the user experience. Guardrail: Gate the enforcement prompt behind a session type classifier so it only activates for research or factual sub-workflows.
Required Inputs: Citation Policy Contract
Risk: Without a machine-readable policy defining what counts as a valid citation, the enforcement prompt produces inconsistent judgments. Guardrail: Provide a structured policy object specifying required fields (source_id, quote_offset, confidence) and minimum citation density per claim before invoking the check.
Operational Risk: Citation Fatigue Over Long Sessions
Risk: In sessions exceeding 20 turns, the assistant may gradually reduce citation frequency as the policy scrolls out of the context window. Guardrail: Pair this prompt with an Instruction Re-Injection Trigger that re-inserts the citation policy into the context window when turn count exceeds a threshold.
Bad Fit: Latency-Sensitive Streaming Responses
Avoid when: your product streams tokens to users in real time and cannot afford a synchronous post-generation validation step. Guardrail: Use this prompt asynchronously for offline audit and drift detection rather than blocking the response path, or apply it only to non-streaming summary turns.
Required Inputs: Source Evidence Snapshot
Risk: The enforcement prompt cannot verify grounding if the retrieved sources used during generation are no longer available or have been truncated. Guardrail: Persist the exact source chunks and their IDs alongside each assistant turn so the enforcement check has an immutable evidence snapshot to compare against.
Copy-Ready Prompt Template
A reusable prompt template for evaluating whether recent assistant responses comply with a defined citation policy, detecting missing citations, unsupported claims, and citation fatigue across multiple turns.
This template is designed to be inserted into a multi-turn RAG-augmented assistant workflow as a compliance check. It evaluates the last N assistant responses against the session's citation policy and produces a structured compliance report. The prompt is model-agnostic and expects the conversation history, citation policy, and retrieved sources as inputs. Use it as a guardrail before delivering a response to the user or as a periodic audit step in long-running sessions.
textYou are a citation compliance auditor. Your task is to evaluate whether the assistant's recent responses comply with the session's citation policy. ## CITATION POLICY [CITATION_POLICY] ## CONVERSATION HISTORY (last [TURN_COUNT] assistant turns) [CONVERSATION_HISTORY] ## RETRIEVED SOURCES (available during these turns) [RETRIEVED_SOURCES] ## INSTRUCTIONS 1. For each assistant response, identify every factual claim, data point, or quoted passage. 2. Check whether each claim is backed by a citation to a specific source from the retrieved sources. 3. Flag claims that are: - **MISSING_CITATION**: No source provided for a factual statement. - **WEAK_CITATION**: Citation exists but does not clearly support the claim. - **HALLUCINATED_SOURCE**: Citation references a source ID or quote not present in the retrieved sources. - **CITATION_FATIGUE**: Earlier turns cited properly but later turns dropped citations. 4. For each flagged issue, provide the exact assistant text, the turn number, and the specific violation type. 5. If the assistant correctly abstained or expressed uncertainty where sources were insufficient, mark those as **APPROPRIATE_ABSTENTION**. ## OUTPUT SCHEMA Return a JSON object with this exact structure: { "overall_compliance": "COMPLIANT" | "PARTIALLY_COMPLIANT" | "NON_COMPLIANT", "turns_evaluated": <number>, "violations": [ { "turn_number": <number>, "assistant_text": "<excerpt>", "violation_type": "MISSING_CITATION" | "WEAK_CITATION" | "HALLUCINATED_SOURCE" | "CITATION_FATIGUE", "claim": "<the unsupported or weakly supported claim>", "available_sources": ["<source_id>"] | null, "severity": "CRITICAL" | "MAJOR" | "MINOR" } ], "appropriate_abstentions": [ { "turn_number": <number>, "assistant_text": "<excerpt>", "reason": "<why abstention was correct>" } ], "corrective_action": "<if non-compliant, what should be re-prompted or corrected>" } ## CONSTRAINTS - Do not flag stylistic choices or tone unless they affect citation accuracy. - If a claim is common knowledge within the domain and the policy allows it, do not flag it. - If the citation policy explicitly permits uncited summaries, respect that boundary. - Return ONLY the JSON object. No preamble, no commentary.
To adapt this template, replace [CITATION_POLICY] with the session's specific citation rules—such as 'every factual claim must cite a source ID' or 'direct quotes require inline citations, summaries require source attribution.' The [TURN_COUNT] variable controls how far back the audit looks; set it based on your context window budget and session length. [CONVERSATION_HISTORY] should contain only the assistant's responses, not user messages, to keep the evaluation focused. [RETRIEVED_SOURCES] must include the source IDs and content that were available to the assistant during those turns. If your RAG pipeline uses source metadata, include it here to enable more precise hallucination detection.
Before deploying this prompt, test it against known violation cases: a response with no citations, a response citing a non-existent source ID, and a response where citations gradually disappear across turns. Validate that the JSON output parses correctly and that violation types match your operational definitions. For high-stakes domains such as healthcare or legal, always route CRITICAL severity violations to human review before the response reaches the user. Do not use this prompt as the sole enforcement mechanism—pair it with a re-prompting step that injects the corrective action back into the assistant's context.
Prompt Variables
Required inputs for the Citation Policy Enforcement Prompt. Each placeholder must be populated before the prompt is assembled and sent. Missing or malformed inputs are the most common cause of false negatives in citation compliance checks.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CITATION_POLICY] | The session-level citation rules the assistant must follow, including when citations are required, permitted formats, and minimum evidence thresholds. | Every factual claim must include a bracketed source ID from retrieved documents. Direct quotes require line numbers. Speculation must be labeled with [SPECULATIVE]. | Must be a non-empty string. Validate that policy contains at least one actionable rule. If policy is truncated or missing, abort the check and flag for re-injection. |
[ASSISTANT_TURNS] | The recent assistant responses to evaluate for citation compliance, typically the last N turns or a time-bounded window. | Turn 12: 'The Q3 revenue was $4.2M [doc-7, line 42]. This represents a 12% increase [SPECULATIVE].' Turn 13: 'Customer churn decreased by 3%.' | Must contain at least one assistant turn. Each turn must include the turn identifier and full response text. Empty or null turns should be excluded. Validate that turn count does not exceed context budget. |
[RETRIEVED_SOURCES] | The set of source documents, passages, or evidence chunks available to the assistant during the evaluated turns, with identifiers that match citation references. | doc-7: 'Q3 revenue reached $4.2 million, up from $3.8 million in Q2.' doc-12: 'Customer retention improved across all segments.' | Must be a non-empty array of source objects with id and content fields. Validate that source IDs referenced in citations exist in this set. Missing sources cause false citation-failure flags. |
[OUTPUT_SCHEMA] | The expected structure for the compliance check output, defining how violations, scores, and corrective actions should be formatted. | JSON object with fields: compliance_score (0-100), violations (array of {turn_id, claim, violation_type, evidence}), corrective_re_prompt (string), requires_human_review (boolean). | Must be a valid JSON Schema or structured format description. Validate that schema includes fields for score, violations, and corrective action. Schema mismatch with downstream parser causes integration failures. |
[COMPLIANCE_THRESHOLD] | The minimum acceptable compliance score below which the session requires intervention, re-prompting, or human review. | 85 | Must be an integer between 0 and 100. Validate that threshold is consistent with organizational risk tolerance. Threshold set too low permits citation drift; too high generates excessive false positives and re-prompt fatigue. |
[SESSION_METADATA] | Contextual information about the session including session ID, turn count, domain, and any prior compliance flags or re-prompt history. | session_id: 'sess-442', total_turns: 28, domain: 'financial_reporting', prior_flags: ['missing_citation_turn_8', 'speculation_unlabeled_turn_15'] | Must include session_id for traceability. Prior flags field enables detection of recurring violations and citation fatigue patterns. Null allowed for first compliance check in a session. |
[RE_PROMPT_TEMPLATE] | The corrective instruction template to inject when violations are detected, instructing the assistant how to repair non-compliant responses. | Your previous response contained unsupported claims. Re-generate with citations for every factual statement using [source_id, line]. Label speculation as [SPECULATIVE]. Do not omit citations for numerical claims. | Must be a non-empty string with actionable repair instructions. Validate that template does not contradict [CITATION_POLICY]. Overly generic re-prompts fail to correct specific violation patterns. |
Implementation Harness Notes
How to wire the Citation Policy Enforcement Prompt into a production RAG pipeline with validation, retries, and logging.
The Citation Policy Enforcement Prompt is designed to run as a post-generation guardrail, not as part of the primary answer generation step. After your RAG pipeline produces an assistant response, pass that response—along with the original retrieved sources and the session's citation policy—to this prompt. The output is a structured compliance check that your application can act on: pass the response through to the user, re-prompt the generator with corrective instructions, or escalate for human review. This separation keeps citation enforcement decoupled from answer generation, making it easier to tune thresholds, swap models, or add new citation rules without touching the core RAG logic.
Wire the prompt into an async post-generation hook in your orchestration layer. The hook receives three inputs: the candidate assistant response, the list of retrieved source chunks with their identifiers, and the session's citation policy contract. Call the enforcement prompt with a fast, cost-efficient model (such as GPT-4o-mini or Claude Haiku) since the task is structured classification, not generation. Parse the JSON output and check the compliance_status field. If compliant, release the response. If non_compliant with corrective_re_prompt populated, feed that re-prompt back to your generator model for a single correction attempt. If non_compliant after the retry, or if the initial check returns requires_human_review, route to a review queue. Log every enforcement decision—including the original response, sources, policy version, compliance verdict, and any corrective re-prompts—for auditability and prompt iteration. This log becomes your dataset for tuning citation thresholds and detecting systemic failure patterns.
Validation and failure handling must be explicit. Validate that the enforcement prompt's JSON output parses correctly and contains the required fields (compliance_status, violations, corrective_re_prompt). If parsing fails, retry once with a stricter output format instruction. If the retry also fails, treat it as a requires_human_review escalation. Common production failure modes include: the enforcement model hallucinating violations for correctly cited claims, missing violations when sources are long or dense, and producing corrective re-prompts that are too vague to fix the issue. Mitigate these by setting a confidence threshold—if the enforcement model's violations array is empty but the response contains factual claims without inline citations, flag for review anyway. For high-stakes domains, run a periodic spot-check eval where a human reviewer compares enforcement decisions against ground truth for a sample of turns, and use discrepancies to refine the citation policy contract or adjust escalation thresholds.
Model choice and latency budgeting are critical because this prompt adds a synchronous dependency in your response pipeline. Target under 500ms for the enforcement check by using a small, fast model and keeping the input context tight—send only the candidate response and the specific source chunks that were used, not the entire retrieval set. If latency is a hard constraint, consider running enforcement as a near-real-time async check that flags violations after the response is sent, with a mechanism to issue a correction follow-up message. For RAG systems using streaming responses, buffer the complete response before running enforcement, or implement a sentence-level streaming check that accumulates citations and flags gaps mid-stream. Avoid the temptation to skip enforcement on low-risk queries—citation fatigue is most likely to appear exactly when the system has been running smoothly for many turns and operators stop watching.
Common Failure Modes
Citation discipline erodes silently over long sessions. These are the most common failure patterns for citation policy enforcement prompts and how to catch them before users lose trust.
Citation Fatigue After Context Shift
What to watch: The assistant cites sources diligently for the first 5-10 turns, then gradually drops citations after a topic shift or long tool output. The model treats the new sub-topic as common knowledge rather than retrieved content. Guardrail: Include a persistent citation requirement in every re-injected system message, not just the initial prompt. Run the enforcement check every N turns regardless of topic continuity.
Synthetic Source Hallucination
What to watch: The assistant fabricates plausible-sounding source identifiers, DOIs, or section numbers that were never in the retrieved context. This often happens when the model tries to match the citation style of real sources it has seen. Guardrail: Validate every citation string against the actual retrieved document set. If a cited source ID doesn't appear in the retrieval payload, flag it as hallucinated and trigger a re-generation with strict source-linking.
Paraphrase Drift Without Attribution
What to watch: The assistant rewrites retrieved content in its own words but drops the inline citation. The claim is factually grounded but the attribution chain is broken, making it indistinguishable from model-generated speculation. Guardrail: Require inline citation markers at the sentence level, not just a bibliography at the end. The enforcement prompt should check for claim-to-source alignment, not just presence of a sources section.
Over-Citation of Irrelevant Sources
What to watch: To comply with citation policy, the assistant cites sources that are present in context but don't actually support the specific claim being made. This creates a false sense of grounding. Guardrail: Add an evidence-relevance check to the enforcement prompt. For each citation, verify that the cited passage contains the specific fact being attributed to it. Flag mismatches as grounding failures.
Context Window Truncation Silently Drops Sources
What to watch: As the session grows, older retrieved documents are truncated from the context window. The assistant continues to reference them but the actual evidence is gone, leading to degraded or hallucinated citations. Guardrail: Track which source chunks are still in the active context window. The enforcement prompt should cross-reference cited sources against currently available context and flag any citation whose source has been evicted.
Citation Policy Itself Gets Diluted
What to watch: The enforcement prompt becomes less effective over time because the original citation policy instructions have scrolled out of the context window or been diluted by accumulated conversation. The checker starts accepting weaker citations. Guardrail: Re-inject the full citation policy contract at fixed intervals or when context compression events occur. The enforcement prompt should self-check whether it still has access to the complete policy before evaluating compliance.
Evaluation Rubric
Use this rubric to test the Citation Policy Enforcement Prompt before deploying it in a production RAG pipeline. Each criterion targets a specific failure mode observed in multi-turn citation compliance.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Missing Citation Detection | Flags every unsupported factual claim in [ASSISTANT_RESPONSE] that is not backed by a [CITATION] marker. | Output reports 'No violations' when a claim about a specific statistic lacks a source reference. | Inject a response with a fabricated statistic. Assert the compliance check returns at least one violation with the exact unsupported text. |
Citation Fatigue Detection | Identifies a drop in citation density in the last N turns compared to the session baseline defined in [SESSION_CITATION_POLICY]. | Output reports 'Compliant' when the last 3 turns have zero citations but earlier turns averaged 2 citations per response. | Simulate a 10-turn session where citation frequency drops to zero after turn 7. Assert the check flags a fatigue warning for turns 8-10. |
Source Hallucination Check | Verifies that every [CITATION] source ID exists in the [RETRIEVED_CONTEXT] for the current turn. | Output passes a citation with a source ID like 'doc_45' when the provided context only contains 'doc_12' and 'doc_33'. | Provide a response citing a non-existent source. Assert the evaluation returns a 'Source Not Found' error for that specific citation. |
Policy Adherence Classification | Correctly classifies the response as 'Compliant', 'Warning', or 'Violation' based on the thresholds in [CITATION_POLICY]. | Classifies a response with a single missing citation as 'Compliant' when the policy defines any missing citation as a 'Violation'. | Run the prompt with a strict zero-tolerance policy. Assert that a response missing one citation is classified as 'Violation', not 'Warning'. |
Corrective Re-Prompt Generation | Generates a [CORRECTIVE_REPROMPT] that explicitly instructs the assistant to add the missing citation for the specific unsupported claim. | The re-prompt is a generic 'add citations' message that doesn't specify which claim needs fixing. | Check that the generated re-prompt string contains the exact unsupported claim text from the violation and the required source format. |
False Positive Resistance | Does not flag claims that are common knowledge, logical deductions, or explicitly marked as the assistant's own analysis. | Flags the phrase 'Based on the evidence provided' as an unsupported claim. | Include a response with the phrase 'Synthesizing the two sources, the trend suggests...'. Assert that this analytical statement is not flagged as a violation. |
Multi-Turn Context Awareness | Evaluates citations against the correct turn's [RETRIEVED_CONTEXT], not a global context pool. | Uses a source from turn 2 to validate a citation in turn 5, even though the source was dropped from the context window. | Simulate a session where context changes between turns. Assert that a citation in turn 5 is only validated against turn 5's provided context. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base citation compliance check as a single-turn evaluation. Remove the session-level tracking and focus on one assistant response at a time. Use a simple pass/fail structure without severity scoring or corrective re-prompting. Accept raw text input without schema validation.
codeEvaluate whether the following assistant response complies with the citation policy: CITATION POLICY: [POLICY_TEXT] ASSISTANT RESPONSE: [RESPONSE] Return JSON: {"compliant": true/false, "violations": ["..."]}
Watch for
- Missing schema checks on the output JSON
- Overly broad policy descriptions that produce inconsistent rulings
- No handling of edge cases like partial citations or paraphrased claims
- False positives when the model assumes compliance without checking each claim

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us