This prompt is designed for identity and account integrity engineers who need a programmatic, auditable method to assess whether a user profile is impersonating a brand, public figure, or another user. It is intended to sit at the ingress layer of an account creation or profile update workflow, acting as a gate before the account is granted platform access. The core job-to-be-done is to transform unstructured profile data—display names, bios, avatar descriptions, and behavioral signals—into a structured impersonation risk score with supporting evidence and a recommended verification action. This output can then trigger downstream enforcement logic such as identity verification, shadowbanning, or human review queues.
Prompt
Impersonation and Fake Account Detection Prompt

When to Use This Prompt
Understand the job-to-be-done, the ideal user, and the operational boundaries for the impersonation detection prompt.
Use this prompt when you need a deterministic classification that can be logged, audited, and used to justify automated enforcement actions. It is most effective when you have a clear definition of what constitutes impersonation on your platform and can provide the model with a taxonomy of protected entities (e.g., verified brands, public figures, internal employees). The prompt requires structured input fields: the profile's display name, bio text, avatar description, and any available behavioral signals like account age or recent activity. Do not use this prompt for real-time chat moderation or content-level abuse detection; it is specifically scoped to account-level identity assessment. It is also not a replacement for cryptographic identity verification or KYC processes—it is a risk-scoring layer that informs those heavier interventions.
Before deploying this prompt, ensure you have defined the escalation paths for each risk tier. A low-risk score might result in automatic approval, a medium-risk score might trigger an email verification challenge, and a high-risk score should route directly to a human review queue with the evidence extracted by the prompt. Avoid using this prompt in isolation without a human review fallback for high-risk classifications, as false positives on impersonation can block legitimate users and create support burdens. The next section provides the copy-ready prompt template you can adapt to your platform's specific impersonation taxonomy and enforcement thresholds.
Use Case Fit
Where this prompt works, where it fails, and the operational prerequisites for production deployment.
Good Fit: Structured Identity Signals
Use when: you have rich, structured profile data (display name, bio, avatar URL, account age) combined with behavioral signals (post frequency, connection patterns). The prompt excels at correlating these signals against a known brand or public figure schema. Guardrail: Pre-process raw event streams into a structured JSON profile summary before prompt injection to ensure consistent feature extraction.
Bad Fit: Real-Time Stream Filtering
Avoid when: you need sub-50ms latency decisions on a raw firehose of user actions. This prompt is designed for asynchronous, case-by-case investigation, not inline packet filtering. Guardrail: Use a lightweight, deterministic rules engine (regex, hash matching) for real-time blocking and route only high-ambiguity cases to this LLM-based prompt for deep analysis.
Required Inputs: Beyond the Display Name
Risk: Sending only a display name (e.g., 'Elon Musk') will produce high false-positive rates due to parody accounts or common names. Guardrail: The prompt harness must enforce a strict input schema requiring at least three signal categories: profile metadata, recent behavioral samples, and a target reference entity (brand/public figure) to compare against.
Operational Risk: Privacy & PII Exposure
Risk: Sending raw, unredacted user profile data to an external LLM API creates a data leakage vector for PII (bio, location, private posts). Guardrail: Implement a pre-processing redaction layer that strips direct PII and replaces it with typed placeholders (e.g., [EMAIL], [PHONE]) before the data reaches the model context window.
Operational Risk: Adversarial Evasion
Risk: Sophisticated impersonators use Unicode homoglyphs (e.g., 'Mіcrosoft' with Cyrillic 'і') or whitespace manipulation to bypass exact-match checks. Guardrail: The prompt must include a specific instruction to normalize Unicode (NFKC) and analyze character-level anomalies, not just string similarity. Eval tests must include homoglyph and zero-width space attacks.
Operational Risk: Evidence Hallucination
Risk: The model may confidently cite 'evidence' (e.g., 'the account was created yesterday') that contradicts the input data, leading to incorrect takedowns. Guardrail: Constrain the output schema to require direct quotes from the input context for every piece of evidence. Implement a post-generation validation step that verifies quoted strings exist in the original input payload.
Copy-Ready Prompt Template
A copy-paste ready prompt template for detecting impersonation risk using profile data and a protected entity list.
The following prompt template is designed to be integrated directly into your trust and safety pipeline. It accepts a list of protected entities (brands, public figures, internal executives) and a target profile's data, then returns a structured JSON risk assessment. The prompt is engineered to request evidence and a recommended action but explicitly stops short of making a final enforcement decision, ensuring that high-stakes account actions always pass through a human review queue when confidence is below a defined threshold.
textSystem: You are an identity integrity analyzer. Your task is to compare the provided [PROFILE_DATA] against the [PROTECTED_ENTITY_LIST] to detect potential impersonation. Analyze display names, usernames, bios, avatar descriptions, and any available behavioral signals. Do not make a final enforcement decision. Input Data: - Protected Entity List: [PROTECTED_ENTITY_LIST] - Profile Data: [PROFILE_DATA] Output Requirements: - Return a single valid JSON object conforming to the [OUTPUT_SCHEMA]. - The `risk_score` must be an integer between 0 (no risk) and 100 (definite impersonation). - The `evidence` array must contain specific, quoted strings from the profile data that support your assessment. - The `recommended_action` must be one of: `clear`, `verify`, `escalate`. - If `confidence` is below the [CONSTRAINTS] threshold, the `recommended_action` must be `escalate` for human review. - Do not include any text outside the JSON object.
To adapt this template for your production environment, replace the placeholders with your actual data structures. The [PROTECTED_ENTITY_LIST] should be a pre-processed, structured list of names, aliases, and known profile attributes you want to safeguard. The [PROFILE_DATA] should be a serialized JSON object containing all available signals from the account under review. The [OUTPUT_SCHEMA] placeholder should be replaced with your exact JSON Schema definition, including required fields like risk_score, confidence, evidence, and recommended_action. The [CONSTRAINTS] placeholder should specify your operational thresholds, such as a minimum confidence score of 85 before automated clear or verify actions are permitted. Before deploying, run this prompt against a golden dataset of known impersonation and legitimate accounts to calibrate the risk scoring.
Prompt Variables
Required inputs for the Impersonation and Fake Account Detection Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of false negatives in production.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[TARGET_PROFILE] | The account, display name, or profile under investigation for impersonation | {"display_name": "ElonMusk_Official", "username": "@elmusk_parody", "bio": "CEO of everything. Parody account.", "avatar_url": "https://cdn.example.com/avatars/1234.jpg"} | Must be a valid JSON object with at least display_name and username fields. Reject if empty or if only an ID is provided without display attributes. |
[REFERENCE_IDENTITY] | The known, verified identity the target is suspected of impersonating | {"verified_name": "Elon Musk", "verified_username": "@elonmusk", "verified_platform_id": "44196397", "category": "public_figure"} | Must include a category field from the allowed enum: public_figure, brand, organization, internal_user, or celebrity. Null allowed only if comparing against internal user directory. |
[BEHAVIORAL_SIGNALS] | Recent account actions, message patterns, or metadata that indicate suspicious behavior | {"account_age_days": 2, "recent_actions": ["follow_spree", "dm_blast"], "content_samples": ["Hey I'm Elon, DM me for a giveaway"]} | Must be a valid JSON array of actions or content samples. At least one signal required. Null allowed if only profile analysis is requested, but confidence will be lower. |
[PLATFORM_CONTEXT] | The platform or service where the account exists, including its impersonation policies | {"platform": "twitter", "impersonation_policy": "Parody accounts must clearly label themselves. Impersonation with intent to deceive is prohibited."} | Platform field must match a known value in the platform taxonomy. Policy field is optional but strongly recommended for accurate classification. |
[OUTPUT_SCHEMA] | The exact JSON schema the model must use for its response | {"risk_score": "number 0-100", "impersonation_type": "enum: direct_impersonation | parody_unlabeled | brand_squatting | fan_account | false_affiliation | not_impersonation", "evidence": "array of strings", "recommended_action": "enum: suspend | verify_identity | add_label | monitor | dismiss"} | Must be a valid JSON Schema or TypeScript interface definition. Reject if schema is missing required fields risk_score, impersonation_type, and evidence. |
[CONSTRAINTS] | Operational constraints that affect the detection decision | {"max_false_positive_rate": 0.01, "require_human_review_below_confidence": 85, "jurisdiction": "EU", "regulatory_framework": "DSA"} | jurisdiction and regulatory_framework fields are optional but trigger additional compliance checks when present. max_false_positive_rate must be a float between 0 and 1. |
[PRIOR_CASES] | Previously adjudicated impersonation cases for few-shot calibration | [{"case_id": "IMP-2024-001", "target_display_name": "MicrosoftSupport_01", "reference": "Microsoft", "outcome": "direct_impersonation", "risk_score": 95}] | Array of case objects. Each must include outcome and risk_score. Null allowed for zero-shot operation, but false positive rate increases without calibration examples. |
Implementation Harness Notes
Wire this prompt into your account creation and profile update pipelines with validation, retries, and audit logging.
This prompt is designed to be a synchronous decision point within an identity verification pipeline. It should be invoked during account registration, profile updates (display name, bio, avatar), and after any reported impersonation event. The model is not a replacement for a deterministic rules engine but a classifier for ambiguous cases where brand names, public figure names, and parody accounts require nuanced judgment. Before invoking the model, assemble the [PROFILE_DATA] object from your user service, including user_id, display_name, username, bio, avatar_description, account_age_days, and verification_status. Assemble the [PROTECTED_ENTITY_LIST] from your trust and safety database, which should include verified brand names, public figure names, and previously flagged impersonation targets. Sanitize all user-supplied strings to remove prompt injection payloads—strip null bytes, escape curly braces, and truncate inputs to a reasonable length (e.g., 1000 characters per field) before inserting them into the prompt template.
After receiving the model response, validate the JSON against the output schema. The risk_score must be an integer between 0 and 100, confidence must be a float between 0.0 and 1.0, and evidence must be a non-empty array of strings. If validation fails, retry once with a repair prompt that includes the original input, the malformed output, and the schema validation error. If the retry also fails, log the failure and route to a human review queue. For successful classifications, implement a decision matrix: if risk_score > 80 and confidence > 0.9, trigger an automated action such as requiring identity verification or temporarily suspending the account. If risk_score > 50 and confidence < 0.7, route to a human review queue with the full evidence payload. For low-risk scores, allow the account action to proceed. Log every classification decision with the model_version, prompt_hash, input_profile_id, risk_score, confidence, action_taken, and timestamp for auditability.
Choose a model that supports structured output and has low latency for real-time account actions. GPT-4o and Claude 3.5 Sonnet are suitable defaults. Avoid using smaller, faster models that may misclassify nuanced impersonation cases. Implement a timeout of 5 seconds for the model call; if it exceeds this, fall back to a rules-based check and flag the account for asynchronous review. Do not cache impersonation classifications, as protected entity lists and user profiles change frequently. Monitor the distribution of risk scores and confidence levels in production to detect drift in model behavior or changes in adversarial patterns. If the rate of high-confidence, high-risk classifications spikes unexpectedly, investigate for coordinated impersonation campaigns rather than assuming a model failure.
Expected Output Contract
Define the exact JSON structure the model must return for the impersonation detection prompt. Use this contract to validate responses before acting on them in production.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
impersonation_risk_score | integer (0-100) | Must be an integer between 0 and 100 inclusive. Reject non-integer or out-of-range values. | |
risk_level | enum: ["none", "low", "medium", "high", "critical"] | Must exactly match one of the five enum values. Case-sensitive check. | |
is_impersonation | boolean | Must be true or false. Reject string 'true'/'false' or null. | |
impersonation_type | enum: ["brand", "public_figure", "individual", "organization", "none"] | Must be 'none' if is_impersonation is false. Otherwise, must be one of the four active types. | |
evidence | array of objects | Must be a non-empty array if is_impersonation is true. Each object must contain 'signal' (string), 'source_field' (string), and 'confidence' (float 0.0-1.0). | |
verification_steps | array of strings | Must contain at least one actionable verification step if is_impersonation is true. Each string must be non-empty. | |
target_entity | string or null | Must be null if is_impersonation is false. Otherwise, must be a non-empty string identifying the impersonated entity. | |
rationale_summary | string | Must be a non-empty string summarizing the decision logic. Maximum 500 characters. |
Common Failure Modes
Impersonation detection prompts fail in predictable ways. These are the most common production failure modes and the concrete guardrails that prevent them.
Over-Indexing on Display Name Similarity
What to watch: The model flags accounts because a display name contains a brand or public figure name (e.g., 'Elon Musk Fan Page') without considering profile context, follower count, or bio disclaimers. This produces high false-positive rates on fan accounts, parody, and commentary. Guardrail: Require the prompt to weigh display name similarity as only one signal among many. Add a structured output field for 'name_similarity_confidence' and a separate 'impersonation_intent_score' that requires behavioral or profile-level corroboration before escalation.
Ignoring Platform-Specific Verification Signals
What to watch: The prompt treats all platforms identically, missing verification badges, account age, follower-to-following ratios, or domain-linked profiles that are strong legitimacy signals. This leads to flagging verified accounts or long-standing community members. Guardrail: Include platform-specific signal fields in the input schema (e.g., 'is_verified', 'account_creation_date', 'follower_count') and instruct the model to treat verified status as a strong but not absolute counter-indicator requiring additional evidence to override.
Cultural and Regional Name Blindness
What to watch: The model fails to distinguish between common names shared across cultures and deliberate impersonation. A 'John Smith' account is flagged for impersonating a public figure named John Smith, or non-Latin script names are misclassified due to transliteration confusion. Guardrail: Add a 'name_uniqueness' assessment step in the prompt that considers global name frequency and cultural context. Require the model to explicitly state whether the name is common enough to explain coincidental matches before raising impersonation risk.
Evidence Hallucination in Risk Justification
What to watch: The model fabricates specific evidence like 'this account messaged users asking for money' or 'the bio previously claimed to be official' when no such signals exist in the input. This creates unverifiable escalation records and erodes trust in the detection pipeline. Guardrail: Constrain the output schema to require inline citations to specific input fields for every piece of evidence. Add a post-processing validation step that verifies each cited claim exists in the source data. If no evidence exists, force the model to output 'insufficient_evidence' rather than generating plausible-sounding justification.
Context Window Truncation Losing Critical Signals
What to watch: When analyzing accounts with long post histories, recent activity, or multi-field profiles, the prompt context window cuts off behavioral signals that would exonerate or implicate the account. The model makes decisions on partial data without indicating information loss. Guardrail: Design the prompt to accept pre-summarized behavioral features rather than raw post history. Add a 'data_completeness' flag to the input schema indicating whether all signals were included. Instruct the model to reduce confidence and recommend human review when completeness is below threshold.
Parody and Commentary Misclassification
What to watch: Satirical accounts, fan pages with clear disclaimers, and critical commentary accounts are flagged as impersonation because the model focuses on name and visual similarity while ignoring explicit 'parody' or 'not affiliated' language in bios. Guardrail: Add a dedicated 'account_type_classification' step before impersonation scoring that categorizes the account as official, fan, parody, commentary, or impersonation. Require the prompt to treat explicit disclaimers as strong mitigators and only escalate parody accounts when they deliberately obscure their non-official status.
Evaluation Rubric
Use this rubric to test the impersonation detection prompt against a golden dataset before deployment. Each criterion targets a specific failure mode common in identity integrity workflows.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
High-Confidence Impersonation Detection | Risk score >= 0.85 for known impersonation cases with correct evidence extraction | Risk score < 0.70 on clear impersonation or evidence field contains hallucinated indicators | Run 50 confirmed impersonation examples; measure recall at 0.85 threshold and spot-check evidence accuracy |
Legitimate Account Clearance | Risk score <= 0.25 for verified legitimate accounts with no suspicious signals | Risk score > 0.40 on verified accounts or false positive flag on parody accounts with clear disclaimers | Run 50 verified legitimate profiles including edge cases (name changes, verified impersonation targets); measure false positive rate |
Evidence Grounding Accuracy | All evidence fields reference specific, extractable profile attributes present in input | Evidence contains fabricated display name patterns, invented follower counts, or attributes not in source data | Parse evidence field against input schema; flag any attribute not present in original profile payload |
Confidence Calibration | Confidence score correlates with evidence strength: ambiguous cases score 0.40-0.70 | High confidence on ambiguous cases or low confidence on obvious impersonation with multiple signals | Bin predictions by evidence count; verify monotonic relationship between signal density and confidence score |
Verification Step Relevance | Recommended verification steps match the impersonation vector detected (e.g., domain verification for brand impersonation) | Generic verification steps unrelated to detected signals or steps that cannot be executed with available data | Classify impersonation vector; check that recommended steps address the specific vector with actionable instructions |
Multi-Signal Correlation | Prompt correctly weights multiple weak signals (name similarity + account age + content pattern) into elevated risk | Treats correlated signals independently or fails to escalate when multiple weak indicators combine | Test cases with 3+ weak signals; verify risk score exceeds single-signal baseline by at least 0.15 |
Schema Compliance | Output matches [OUTPUT_SCHEMA] exactly with all required fields present and correctly typed | Missing risk_score, empty evidence array, or verification_steps as string instead of array | Validate output against JSON Schema; reject any response with missing required fields or type mismatches |
Boundary Case Handling | Returns risk_score null or confidence 0.0 for empty profiles, missing display names, or insufficient data | Hallucinates risk assessment from insufficient data or assigns moderate risk to empty input | Test with empty profile, single-field profile, and null display_name; verify abstention or explicit insufficient-data flag |
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 prompt and a small labeled dataset of known impersonation cases. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with the default system prompt. Focus on getting the JSON output structure right before tuning detection logic.
Simplify the output schema to only risk_score (0-100), is_impersonation (boolean), and evidence_summary (string). Skip the detailed verification_steps and behavioral_signals arrays initially.
Watch for
- Over-flagging common names that match public figures
- Missing context about platform-specific display name conventions
- No baseline false positive rate established before iteration

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