This prompt is a repair tool, not a generation tool. It belongs in the workflow after a model has drafted a customer support response from CRM context but before that draft is reviewed by a human agent or delivered to the customer. Its job is to catch the most dangerous class of hallucination in support systems: fabricated customer data. When a model invents a customer name, order number, subscription tier, or prior interaction detail that does not exist in the source CRM record, the result is not just a bad answer—it is a trust-destroying error that can trigger privacy incidents, compliance violations, and escalations. This prompt takes the draft response and the CRM record that should have grounded it, identifies every piece of invented data, strips it, replaces it with explicit placeholders, and logs each removal with a reason code so your team can monitor hallucination patterns over time.
Prompt
Invented Customer Data Removal Prompt for Support Tickets

When to Use This Prompt
A post-generation safety net that identifies and strips invented customer PII, account details, and interaction history from AI-drafted support replies before they reach an agent or customer.
Use this prompt when your support AI generates drafts from retrieved CRM context and you have observed hallucinations in customer identifiers, account attributes, or interaction history. It is designed for systems where the CRM record is the single source of truth and any customer-facing data not present in that record is considered fabricated. The prompt expects two inputs: the model-generated draft response and the structured CRM record containing verified customer fields. It returns a cleaned response with invented data replaced by placeholders like [VERIFY CUSTOMER NAME] and a structured removal log that your application can store for quality monitoring. This is not a prompt for general fact-checking, tone adjustment, or response quality scoring—it is narrowly scoped to invented customer data detection and removal.
Do not use this prompt as your primary defense against hallucination. It is a safety net, not a prevention mechanism. If your model frequently invents customer data, the root cause is likely in your retrieval pipeline, prompt construction, or context grounding—fix those first. This prompt also cannot detect subtle errors where the model uses a real customer name but associates it with the wrong account or interaction. It only flags data that has no match in the provided CRM record. For high-risk support domains such as healthcare, financial services, or insurance, always route cleaned outputs through human agent review before customer delivery. The removal log this prompt produces should feed into your observability stack so you can track hallucination frequency by model version, prompt version, and support category.
Use Case Fit
Where the Invented Customer Data Removal Prompt works, where it fails, and the operational conditions required before putting it into a production support ticket pipeline.
Good Fit: Post-Retrieval Sanitization
Use when: A model drafts a support reply after retrieving CRM records, and you need to strip any PII or account details the model invented beyond the retrieved context. Guardrail: Always pass the original CRM retrieval payload as the ground-truth input alongside the draft.
Bad Fit: Real-Time Chat Without Retrieval Logs
Avoid when: You cannot supply the source CRM record or retrieval context. Without a ground-truth artifact, the prompt cannot distinguish invented data from legitimate user-provided information. Guardrail: Gate invocation on the presence of a non-empty source record.
Required Inputs
Must provide: (1) The model-generated support reply, (2) the CRM customer record used during generation, and (3) a defined PII taxonomy (email, phone, account ID, address). Guardrail: Validate all three inputs are present and non-empty before calling the removal prompt.
Operational Risk: Silent Passthrough
Risk: The removal prompt returns the original draft unchanged when it fails to detect invented data, creating a false sense of safety. Guardrail: Always diff the input and output; if no removals occurred, log the event and sample for manual review.
Latency and Cost Sensitivity
Risk: Adding a second model call for sanitization doubles latency and cost for every support ticket. Guardrail: Use a smaller, faster model for the removal step and consider batching non-urgent tickets. Skip the check entirely for low-risk, non-customer-facing internal notes.
Human Review Threshold
Risk: High-severity tickets or regulated industries cannot rely solely on an automated removal prompt. Guardrail: Route any ticket where invented data was detected and removed to a human reviewer before sending, and always require human approval for healthcare, financial, or legal support contexts.
Copy-Ready Prompt Template
A copy-ready prompt that identifies and strips invented customer PII, account details, and interaction history from support ticket responses before they reach a user or a system of record.
This prompt template is designed to be placed as a post-generation repair step in your support ticket workflow. After your primary model drafts a response, this prompt acts as a safety net, comparing the draft against a verified CRM record. Its job is to identify any customer-specific information the model fabricated—such as a name, email, order number, or past interaction—and remove it, replacing it with a [REDACTED] token and logging the removal. The prompt is structured to produce a clean, safe response and a structured audit log in a single JSON output, making it easy to integrate into an automated pipeline.
textYou are a data integrity auditor for a customer support system. Your task is to compare a drafted support response against a verified CRM record and remove any customer-specific information that was invented by the model rather than retrieved from the record. # INPUTS - [DRAFT_RESPONSE]: The model-generated support ticket reply. - [CRM_RECORD]: The verified customer data retrieved from the system of record. This is the only source of truth. # DEFINITION OF INVENTED DATA Invented data is any customer-specific information in the draft that is not explicitly present in the CRM record. This includes, but is not limited to: - Personally Identifiable Information (PII): Names, emails, phone numbers, physical addresses. - Account Details: Account IDs, subscription tiers, billing amounts, payment methods. - Interaction History: Dates of past contacts, names of previous agents, details of prior cases. - Order Information: Order numbers, product names, shipping details, tracking numbers. # INSTRUCTIONS 1. Analyze the [DRAFT_RESPONSE] sentence by sentence. 2. For every piece of customer-specific information, check if it is present in the [CRM_RECORD]. 3. If the information is NOT in the [CRM_RECORD], it is invented. Replace the invented text with the token `[REDACTED]`. 4. Do not modify any text that is generic advice, a greeting, a closing, or information that is correctly sourced from the [CRM_RECORD]. 5. Do not redact information that is correctly present in the [CRM_RECORD]. # OUTPUT_SCHEMA Return a single valid JSON object with the following keys: - `clean_response`: The full text of the draft response with all invented customer data replaced by `[REDACTED]`. - `audit_log`: An array of objects, each representing a redaction. Each object must have the keys: - `original_text`: The exact text that was removed. - `reason`: A brief explanation of why it was flagged (e.g., "Email not in CRM record"). - `location`: A string describing where in the text the redaction occurred (e.g., "Second paragraph, first sentence"). # CONSTRAINTS - Base all decisions strictly on the [CRM_RECORD]. If you are unsure, flag it for redaction. - Do not add any new information to the `clean_response`. - Do not alter the structure or tone of the original draft beyond the redactions.
To adapt this template, replace the [DRAFT_RESPONSE] and [CRM_RECORD] placeholders with your actual data. The [CRM_RECORD] should be a structured text block containing all verified fields you have on the customer. For high-risk deployments, the audit_log is critical; pipe it to your observability stack to monitor the frequency and type of redactions. If the audit_log is not empty, consider routing the final clean_response for a quick human review before sending, as a high redaction rate can indicate a deeper prompt engineering or retrieval issue upstream.
Prompt Variables
Placeholders required by the Invented Customer Data Removal Prompt. Wire these into your application harness before sending the prompt. Each variable must be populated from a trusted system of record; never pass raw model output into the source-of-truth fields.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[SUPPORT_TICKET_TEXT] | The full model-generated support ticket response that may contain invented customer data | Thank you for contacting us, John Smith. Your account #45678 was last accessed from 192.168.1.1 on March 3rd. | Must be non-empty string. Minimum 10 characters. Reject if input is null or whitespace-only. Log input length for trace analysis. |
[CRM_CUSTOMER_RECORD] | The verified customer record from the CRM system of record, used as ground truth for comparison | {"customer_id": "CUST-1234", "name": "Jane Doe", "email": "jane.doe@example.com", "account_number": "ACC-98765"} | Must be valid JSON object. Required fields: customer_id, name, email. Validate schema before prompt assembly. If CRM lookup fails, abort prompt and escalate to human agent. |
[CRM_INTERACTION_HISTORY] | Recent verified interaction history from the CRM, used to detect fabricated interaction claims | ["2025-02-15: Called about billing discrepancy", "2025-02-20: Emailed regarding password reset"] | Must be valid JSON array. May be empty array if no history exists. Each entry must have date and description fields. Null allowed if CRM has no interaction log feature. |
[OUTPUT_SCHEMA] | The expected JSON schema for the cleaned output, defining the structure of the response after invented data removal | {"type": "object", "properties": {"cleaned_text": {"type": "string"}, "removals": {"type": "array"}, "confidence": {"type": "number"}}} | Must be valid JSON Schema. Required fields: cleaned_text, removals, confidence. Validate schema parse before prompt assembly. Reject if schema is malformed. |
[PII_PATTERNS] | Regex patterns or field definitions for known PII types to assist detection of fabricated personal data | ["email": "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}", "phone": "\d{3}-\d{3}-\d{4}"] | Must be valid JSON object mapping PII type names to regex strings. Validate regex compilation before use. May be empty object if no custom patterns needed. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score required to flag a data point as invented; values below this threshold are kept | 0.85 | Must be float between 0.0 and 1.0. Default 0.80 if not provided. Values below 0.70 increase false positive risk. Log threshold used for each run. |
[REMOVAL_LOG_ENDPOINT] | API endpoint or logging target where removal events should be recorded for quality monitoring and audit | Must be valid URL or null. If null, removals are only returned in output payload, not logged externally. Validate URL format. Require HTTPS for production deployments. |
Implementation Harness Notes
How to wire the Invented Customer Data Removal prompt into a production support ticket workflow with validation, logging, and human review gates.
This prompt is designed to operate as a post-generation filter within a customer support ticketing pipeline. It should be invoked after a draft reply is generated by a model—whether from a RAG system, a fine-tuned assistant, or a general-purpose LLM—and before that reply is sent to a customer or written to the CRM. The harness must provide the draft reply as [DRAFT_REPLY] and the ground-truth customer context as [CRM_CONTEXT]. The [CRM_CONTEXT] should be a structured JSON object containing the verified fields your system of record holds: customer_name, account_number, email, phone, recent_tickets, subscription_tier, and any other fields the model is allowed to reference. The prompt's job is to strip anything that appears in the draft but not in this context, not to enrich the reply with missing data.
The implementation should follow a strict validate-then-log pattern. After receiving the prompt's JSON output, parse the cleaned_reply and removals array. Run a structural validator that confirms: (1) every entry in removals has a non-empty field, invented_value, and reason; (2) no invented_value from the removals list appears in the cleaned_reply text; (3) the cleaned_reply contains no PII patterns (emails, phone numbers, account IDs) that are absent from [CRM_CONTEXT]. If validation fails, do not retry with the same prompt—escalate to a human reviewer with the original draft, the CRM context, and the failed validation report. If validation passes, log the full removals array to your quality monitoring system (e.g., a hallucination_log table or Datadog custom metric) keyed by ticket_id and agent_id. This log becomes your primary signal for model drift, RAG retrieval gaps, and prompt effectiveness over time.
For high-risk deployments—such as financial services, healthcare, or any workflow where a fabricated customer detail could cause regulatory exposure—add a human approval gate for any reply where removals is non-empty. Route the cleaned reply and the removals diff to a review queue. The reviewer should see a side-by-side view: original draft on the left, cleaned reply on the right, with invented fields highlighted. Only after explicit approval should the reply enter the send path. For lower-risk deployments, you can auto-send replies with zero removals and sample a percentage of replies with removals for human audit. Do not silently drop removals without logging; that destroys the observability you need to improve the upstream generation prompt or retrieval step.
Model choice matters here. This prompt works best with models that have strong instruction-following and JSON mode support, such as GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro. Avoid using smaller or older models that may hallucinate the removals list itself. Set temperature=0 and enable structured output mode (JSON schema constraint) if your provider supports it. The output schema should be enforced at the API level, not just described in the prompt. If your model provider does not support strict JSON mode, add a retry layer: if the response fails to parse as valid JSON matching the expected schema, retry once with the same inputs and a stronger instruction prefix. If the second attempt fails, escalate to human review rather than risking a malformed filter passing bad data through.
Finally, treat this prompt as one component in a defense-in-depth strategy. It catches fabrication after generation, but it does not prevent the model from inventing data in the first place. Pair it with upstream improvements: tighten your RAG retrieval to ensure CRM context is complete and correctly chunked, add a system instruction that prohibits generating customer details not present in the provided context, and monitor the removals log for patterns. If you see the same field being invented repeatedly (e.g., the model keeps fabricating a last_contact_date), that's a signal to improve your context assembly or add an explicit negative example to the generation prompt. The removal prompt is your safety net, not your primary defense.
Expected Output Contract
Schema contract for the Invented Customer Data Removal Prompt. Every field in the model response must conform to these rules before downstream systems consume the output.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
original_ticket_id | string | Must match the [TICKET_ID] input exactly; reject if missing or altered | |
removal_timestamp | ISO 8601 datetime string | Must be a valid ISO 8601 timestamp; reject if unparseable or in the future | |
removals | array of objects | Must be a JSON array; reject if null, missing, or not an array; allow empty array if no invented data found | |
removals[].field_path | string (JSONPath-style) | Must reference a field present in the original model output; reject if path does not resolve to an existing field | |
removals[].removed_value | string or null | Must contain the exact value that was removed; null allowed only when value was empty string or whitespace | |
removals[].reason_code | enum: [INVENTED_PII, INVENTED_ACCOUNT, INVENTED_HISTORY, INVENTED_OTHER] | Must be one of the four enumerated values; reject any other reason code | |
removals[].confidence | number (0.0 to 1.0) | Must be a float between 0.0 and 1.0 inclusive; reject if out of range or non-numeric | |
cleaned_output | string | Must be the full original model output with all removed values replaced by [REDACTED] markers; reject if length differs from original by more than 5% without removals accounting for the difference |
Common Failure Modes
When stripping invented customer data from support ticket responses, these failure modes surface first. Each card pairs a specific risk with a concrete guardrail you can implement before production.
Over-Redaction of Legitimate CRM Data
What to watch: The prompt becomes too aggressive and strips real customer details that were correctly retrieved from the CRM—account numbers, order IDs, or verified contact information—leaving the support agent with an empty or useless response. Guardrail: Require the prompt to cite the specific source field or retrieval chunk for every piece of customer data it flags for removal. If a value can be traced to the CRM input, it must be preserved.
Model Hallucinates Removal Justifications
What to watch: The model invents plausible-sounding reasons for removing data (e.g., 'this email was not in the source') when the data was actually present but the model failed to match it. The removal log becomes misleading and masks real retrieval failures. Guardrail: Add a verification step that compares removed values against the original CRM payload using exact string matching before accepting any removal reason. Log mismatches for human review.
Partial PII Leakage Through Paraphrasing
What to watch: The model correctly strips explicit PII fields like email addresses and phone numbers but retains the same information in paraphrased form—'the customer at the Gmail address' or 'the phone number on file'—which still exposes identifying context. Guardrail: Include explicit instructions to also strip indirect references, descriptions of PII, and contextual clues that could re-identify a customer. Test with examples that contain PII only in narrative form.
Silent Failure on Nested or Embedded Data
What to watch: Invented customer data hides inside nested JSON structures, code blocks, markdown tables, or quoted reply chains within the support ticket response. The prompt only scans top-level text and misses fabricated account details buried in structured sub-fields. Guardrail: Instruct the prompt to recursively traverse all structured fields, code fences, and quoted content blocks. Validate with test cases that embed invented data at multiple nesting levels.
Removal Log Contains the Invented Data It Flagged
What to watch: The prompt correctly identifies and strips invented PII from the response body but includes the same fabricated data in the removal log or audit trail output, defeating the purpose of redaction. Guardrail: Require the removal log to reference data by field path, type, and reason code only—never by the raw value. Validate that the log output passes the same PII scan as the cleaned response.
False Confidence on Ambiguous Matches
What to watch: The model encounters a customer name or account detail that partially matches CRM data but differs in formatting, spelling, or completeness. It confidently flags the variant as invented rather than recognizing it as a fuzzy match, removing valid information. Guardrail: Add a fuzzy-match tolerance rule: if a value shares a high-similarity match with CRM data (e.g., normalized string distance), preserve it and flag for agent confirmation rather than automatic removal.
Evaluation Rubric
Test criteria for evaluating the Invented Customer Data Removal Prompt before shipping to production. Each row defines a pass standard, a failure signal to watch for, and a concrete test method.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
PII Removal Completeness | All invented PII fields (name, email, phone, address) are removed from output | Output retains a fabricated customer name, email, or phone number not present in [CRM_CONTEXT] | Diff output against [CRM_CONTEXT] fields; flag any PII value not found in source records |
Account Detail Grounding | All account numbers, subscription tiers, and plan details match [CRM_CONTEXT] exactly | Output includes an account ID, plan name, or billing tier not present in [CRM_CONTEXT] | Exact string match between output account fields and [CRM_CONTEXT] account fields; fail on any mismatch |
Interaction History Fidelity | All referenced past interactions (dates, ticket IDs, agent names) are traceable to [TICKET_HISTORY] | Output mentions a prior call, email, or ticket that does not exist in [TICKET_HISTORY] | Parse all date and ticket ID references; cross-reference against [TICKET_HISTORY] record set |
Removal Log Completeness | Every removed value is logged with field name, removed value, and reason code | A value is stripped from output but missing from the removal log | Count removed values in output diff; assert removal log entry count matches diff count |
Preservation of Valid Content | All content grounded in [CRM_CONTEXT] or [TICKET_HISTORY] is preserved unchanged | A valid customer detail or interaction reference is incorrectly stripped or altered | Spot-check preserved fields against source records; assert byte-level match for grounded content |
Null Marker Consistency | All stripped fields are replaced with [NULL_MARKER] and not with empty strings or placeholder text | A removed field is replaced with empty string, 'N/A', or model-generated placeholder | Scan output for empty strings and common placeholder patterns; assert only [NULL_MARKER] appears for removed fields |
Reason Code Accuracy | Each removal log entry carries a correct reason code from [REASON_CODE_LIST] | A removal is logged with an incorrect or fabricated reason code not in [REASON_CODE_LIST] | Validate each log entry reason code against [REASON_CODE_LIST] enum; fail on unknown codes |
No Fabricated CRM Fields | Output introduces zero new fields not present in the expected [OUTPUT_SCHEMA] | Output includes a hallucinated field such as 'loyalty_tier' or 'churn_risk' not in [OUTPUT_SCHEMA] | Validate output keys against [OUTPUT_SCHEMA]; flag any extra keys as fabrication |
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
Add strict output schema with removal justifications, confidence scores, and traceability. Include few-shot examples showing edge cases: partial name matches, masked emails, and CRM fields that look invented but are real. Wire in a validator that checks every removed field against the source ticket's entity list.
codeFor each field in [MODEL_OUTPUT] containing customer data, verify it exists in [SOURCE_TICKET_ENTITIES]. If absent, flag with: - field_path: [FIELD_PATH] - removed_value: [VALUE] - reason: [INVENTED | MISMATCHED | UNVERIFIABLE] - confidence: [0.0-1.0]
Watch for
- Silent format drift when the model changes removal reason codes
- Missing human review for high-confidence invented PII that might actually be real
- Schema validation failures when nested objects contain mixed real and invented fields

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