Inferensys

Prompt

Entity Resolution Prompt for Identity Matching

A practical prompt playbook for using Entity Resolution Prompt for Identity Matching in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the operational context for the identity matching prompt, including ideal use cases, required inputs, and critical limitations.

This prompt is designed for fraud, security, and identity resolution teams who need to compare two identity records and determine whether they refer to the same individual. It handles real-world messiness: transliterated names, data entry errors, address changes, and deliberate obfuscation. Use it when you need a structured match decision with rationale, not just a binary yes/no. This prompt belongs in onboarding verification, watchlist screening, duplicate account detection, and KYC remediation workflows. It is not a replacement for deterministic matching on exact government ID numbers; it is the reasoning layer that handles the cases where exact matching fails.

The ideal user is an engineering lead or product manager building an automated identity verification pipeline. The required context includes two identity records—each containing fields like name, date of birth, address, and document numbers—along with a defined risk tolerance. The prompt expects you to specify the match confidence threshold that triggers automatic approval versus human review. You must also define the output schema, typically a JSON object containing a match decision, confidence score, and a rationale field that explains which attributes matched, which conflicted, and why. Without this structured output contract, the model's reasoning is not auditable, and the decision cannot be reliably integrated into downstream systems.

Do not use this prompt for high-volume, real-time matching where latency is critical and deterministic rules suffice. If you have exact matches on government-issued ID numbers, use a database lookup. Do not use this prompt as the sole decision-maker for high-stakes actions like account creation or transaction approval without a human review step for low-confidence matches. The prompt is a reasoning layer, not a source of truth. Always log the full prompt, response, and model version for audit trails. Before deploying, test the prompt against a golden dataset of known matches and non-matches, including edge cases with transliterated names, swapped name components, and address variations, to calibrate your confidence thresholds.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Entity Resolution Prompt for Identity Matching works well and where it introduces unacceptable risk. Use these cards to decide whether a prompt-based approach fits your operational requirements before you invest in integration.

01

Good Fit: High-Volume Triage

Use when: you need to score thousands of identity pairs per day and route only high-likelihood matches for human review. Guardrail: set a confidence threshold below which pairs are automatically queued for manual investigation rather than auto-merged.

02

Bad Fit: Sole Decision-Maker

Avoid when: the prompt output directly triggers account merging, fund transfers, or credential issuance without human approval. Guardrail: always insert a human-in-the-loop step for any action that changes a system of record or affects a customer's legal identity.

03

Required Inputs

What you need: two structured identity records with fields such as name, DOB, address, and document numbers. Guardrail: validate input completeness before calling the prompt. Missing critical fields such as DOB should downgrade the match confidence rather than relying on name-only comparison.

04

Operational Risk: Obfuscation Blindness

What to watch: the prompt may miss deliberate obfuscation patterns such as transposed digits, swapped name parts, or synthetic identity fragments. Guardrail: run a separate anomaly detection pass on input records before resolution and flag records with known obfuscation indicators for specialized review.

05

Operational Risk: Transliteration Drift

What to watch: names transliterated from non-Latin scripts can produce false negatives when different romanization standards are used across records. Guardrail: preprocess names with a deterministic transliteration normalizer before passing them to the prompt and include the original script form in the context.

06

Bad Fit: Real-Time Blocking

Avoid when: you need sub-100ms decisions at transaction time. LLM latency is too high for inline fraud blocking. Guardrail: use the prompt for asynchronous batch resolution and feed resolved identities into a fast lookup cache that your real-time system can query.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready system prompt for comparing identity records and returning a structured match determination with rationale.

This prompt template is designed to be pasted directly into your system instructions for an identity resolution task. It instructs the model to act as an identity resolution analyst, comparing two identity records and determining the likelihood that they refer to the same individual. The template is built for high-stakes fraud and security workflows, so it requires the model to reason about deliberate obfuscation, data entry errors, and transliteration differences rather than just performing a simple string match. Before using this prompt, ensure you have a clear policy on how the output will be used—automated blocking, manual review queue, or audit trail—because a false match in this domain can have severe consequences.

text
You are an identity resolution analyst. Your task is to compare two identity records and determine the likelihood that they refer to the same individual. You must reason carefully about name variations, data entry errors, transliteration differences, and potential deliberate obfuscation.

## INPUT
Record A: [RECORD_A]
Record B: [RECORD_B]

## MATCHING RULES
1. **Exact Match**: All normalized fields match exactly.
2. **High Confidence Match**: Minor variations exist that are explainable by common data entry errors (typos, transpositions), known nickname patterns, or standard transliteration differences. No conflicting fields.
3. **Possible Match**: Some fields match but others are missing, partially match, or have conflicts that could be explained by data aging (e.g., address change) or clerical error. Requires human review.
4. **Low Confidence Match**: Only weak identifiers match (e.g., common name and city only) or there are significant unexplained conflicts.
5. **No Match**: Critical identifiers conflict and cannot be reconciled.

## OUTPUT SCHEMA
Return a JSON object with the following structure:
{
  "match_decision": "EXACT_MATCH" | "HIGH_CONFIDENCE" | "POSSIBLE_MATCH" | "LOW_CONFIDENCE" | "NO_MATCH",
  "confidence_score": 0.0 to 1.0,
  "rationale": "A concise explanation of the key factors that led to this decision.",
  "matched_fields": ["list of fields that matched"],
  "conflicting_fields": ["list of fields with conflicts and a brief description of the conflict"],
  "missing_fields": ["list of fields missing from one or both records"],
  "obfuscation_indicators": ["list of any indicators suggesting deliberate identity manipulation, or an empty list if none"]
}

## CONSTRAINTS
- Do not assume a match based on a single identifier like name or date of birth alone.
- Treat missing data as neutral, not as evidence for or against a match.
- Flag any indicators of deliberate obfuscation, such as: swapped name components, slightly altered document numbers, inconsistent formatting designed to evade exact-match systems, or use of multiple aliases.
- If you cannot make a determination, set the decision to POSSIBLE_MATCH with a low confidence score and explain what information is needed to resolve the ambiguity.

To adapt this template, replace the [RECORD_A] and [RECORD_B] placeholders with your serialized identity records. The records should be provided as structured text, ideally with consistent field labels like Name, DOB, Address, Document_Number, and Phone. If your records contain nested objects or arrays, flatten them into a readable text block before insertion. For production use, you should also add a [RISK_THRESHOLD] parameter if your downstream system needs to automatically escalate matches above a certain confidence level to a human review queue. The output schema is designed to be parsed by an application, so validate the JSON structure before acting on the match_decision field. In high-risk deployments, log the full prompt and response for audit purposes and never automate actions on POSSIBLE_MATCH or LOW_CONFIDENCE decisions without human approval.

IMPLEMENTATION TABLE

Prompt Variables

Required and optional inputs for the Entity Resolution Prompt for Identity Matching. Each variable must be validated before the prompt is assembled to prevent injection, missing data, or schema mismatch failures.

PlaceholderPurposeExampleValidation Notes

[RECORD_A]

Primary identity record to match against. Must contain at minimum a name and one other identifier.

{"name": "John A. Smith", "dob": "1985-03-22", "address": "123 Main St, Springfield, IL 62701", "document_id": "DL-IL-SMITH-1234"}

Validate JSON parse success. Require name field non-empty. Reject if no secondary identifier present. Check for PII redaction compliance before logging.

[RECORD_B]

Comparison identity record. May be partial, contain errors, or use different name formats.

{"name": "Jon Smith", "dob": "1985-03-22", "address": "123 Main Street, Springfield", "document_id": null}

Validate JSON parse success. Allow null or missing fields. Flag if all fields are null or empty. Check for injection patterns in string values.

[MATCH_THRESHOLD]

Confidence score threshold for declaring a match. Values below this trigger a possible-match or no-match result.

0.85

Must be a float between 0.0 and 1.0. Reject values outside range. Default to 0.80 if not provided. Log threshold changes for audit.

[ENTITY_TYPE]

Type of identity entity being resolved. Constrains the comparison logic and output schema.

person

Must be one of: person, organization, location. Reject unknown values. Use to select appropriate matching rules and normalization functions.

[NORMALIZATION_RULES]

Optional array of normalization rules to apply before comparison. Controls handling of nicknames, transliteration, address standardization.

["nickname_expansion", "transliteration_latin", "address_usps_standard"]

Validate each rule against allowed set. Reject unknown rules. If null or empty, apply default ruleset for entity type. Log which rules were applied in output metadata.

[OBFUSCATION_FLAGS]

Optional boolean flags indicating known or suspected deliberate obfuscation in either record.

{"record_a_suspected_fraud": false, "record_b_suspected_fraud": true}

Validate JSON structure. Allow null for both flags. If true, adjust confidence scoring to penalize near-miss patterns and require higher threshold for match. Document flag state in output rationale.

[OUTPUT_SCHEMA_VERSION]

Version of the output schema to produce. Allows evolution of the response contract without breaking existing consumers.

v2

Must match a supported schema version. Reject unsupported versions. Use to select the correct output validator and field set. Default to latest stable version if not provided.

[PREVIOUS_MATCH_RESULTS]

Optional array of prior match results for the same records from other systems or previous runs. Used for consistency checking.

[{"system": "legacy_matcher_v1", "result": "no_match", "confidence": 0.42, "timestamp": "2024-11-15T10:30:00Z"}]

Validate array structure. Allow empty or null. If provided, include in context for consistency analysis. Flag if current result contradicts prior high-confidence results. Do not use prior results as ground truth.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Entity Resolution Prompt into a production identity matching workflow with validation, retries, and human review.

This prompt is not a standalone tool; it is a decision component inside a larger identity resolution pipeline. The application layer is responsible for assembling the input records, enforcing schema contracts, managing model calls, validating the output, and deciding whether to accept, retry, or escalate the match result. Treat the prompt as a function with a strict input signature and a structured output that must pass validation before any downstream system acts on it.

Input assembly starts with two identity records, each containing the fields specified in the prompt template: name, date of birth, address, and document numbers. The application must normalize these fields before they reach the prompt. Convert dates to a consistent format (ISO 8601), trim whitespace, and handle null fields explicitly by passing the string "null" rather than omitting the field. For address fields, run a lightweight normalization step first—expand common abbreviations and standardize casing—so the model spends its reasoning budget on resolution logic rather than surface formatting. If the input records come from different source systems, attach a [SOURCE] label to each record so the model can weigh source reliability when explaining its match decision.

Model selection matters for this task. Use a model with strong reasoning capabilities and a large context window if you are passing full address histories or multiple document numbers. GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro are appropriate starting points. Avoid smaller or older models that may struggle with transliterated name comparison or deliberate obfuscation detection. Set the temperature to 0 or a very low value (0.1 maximum) to reduce variance in match likelihood scores. If your throughput demands are high, consider batching multiple record pairs into a single request with a clear delimiter, but keep each pair's analysis independent to avoid cross-contamination of reasoning.

Output validation is the critical gate before any automated action. Parse the model's JSON response and validate it against a strict schema: match_likelihood must be one of the defined enum values, confidence_score must be a float between 0.0 and 1.0, rationale must be a non-empty string, and flags must be an array of strings from the allowed flag set. If the output fails schema validation, do not silently accept it. Log the failure, capture the raw response, and retry with the same input plus a repair instruction that includes the specific validation error. After two failed retries, escalate to a human review queue with the original records and all model responses attached.

Human review integration is mandatory for high-risk decisions. Any match with a confidence score below your organization's threshold (start with 0.85 and adjust based on observed performance) should route to a review queue, not an automated system. The same applies to matches where the flags array contains "potential_obfuscation", "synthetic_identity_risk", or "conflicting_evidence". Build the review interface to display both input records side by side, the model's match likelihood and rationale, and a simple accept/reject/override control. Log every human decision to build a feedback dataset for future prompt improvements and potential fine-tuning.

Logging and observability are essential for this workflow. Log every request with a unique correlation ID, both input records, the raw model response, the validated output, the final decision (auto-accepted, auto-rejected, or escalated), and any human override. This audit trail is non-negotiable for fraud and security use cases. Monitor the distribution of confidence scores over time—a sudden shift toward higher or lower scores may indicate prompt drift, model behavior changes, or a change in the input data distribution. Set up alerts for spikes in schema validation failures or escalation rates, as these often signal upstream data quality problems or model degradation that require prompt revision.

What to avoid: Do not use this prompt to make fully automated decisions on high-stakes identity matches without human review. Do not pass raw, unnormalized data and expect the model to handle formatting inconsistencies reliably. Do not skip output validation—malformed JSON or missing fields will break downstream systems silently. Do not ignore the flags field; it exists specifically to surface risks that the confidence score alone may not capture. Finally, do not treat this prompt as static. Plan to review and update it quarterly based on production logs, human reviewer feedback, and new obfuscation patterns observed in your domain.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the strict JSON schema for the entity resolution response. Every field must be validated before the output is accepted by downstream identity matching systems.

Field or ElementType or FormatRequiredValidation Rule

match_decision

enum: ["MATCH", "NO_MATCH", "REVIEW"]

Must be one of the three allowed enum values. No null or empty string allowed.

confidence_score

number (0.0 to 1.0)

Must be a float between 0.0 and 1.0 inclusive. If match_decision is REVIEW, confidence must be between 0.4 and 0.7.

matched_record_id

string | null

If match_decision is MATCH, must be a non-empty string matching the canonical ID format. If NO_MATCH, must be null.

rationale_summary

string

Must be a non-empty string (max 500 chars) explaining the primary reason for the decision. Must reference specific fields compared.

field_comparisons

array of objects

Must contain at least one comparison object. Array must not be empty.

field_comparisons[].field_name

string

Must match one of the input field names exactly (e.g., "full_name", "date_of_birth", "document_number").

field_comparisons[].similarity_score

number (0.0 to 1.0)

Must be a float between 0.0 and 1.0. Score of 1.0 requires exact match; fuzzy matches must be below 1.0.

field_comparisons[].match_notes

string

Must describe the comparison method used (e.g., "exact", "fuzzy levenshtein", "transliteration") and any normalization applied.

obfuscation_indicators

array of strings

If present, each string must be from the allowed list: ["transposed_digits", "name_variant", "address_mismatch", "document_anomaly", "dob_inconsistency"]. Empty array allowed.

requires_human_review

boolean

Must be true if match_decision is REVIEW or if any obfuscation_indicators are present. Must be false only for high-confidence MATCH or NO_MATCH decisions.

PRACTICAL GUARDRAILS

Common Failure Modes

Identity resolution prompts fail in predictable ways. Here are the most common failure modes for entity matching, why they happen, and how to guard against them before they reach production.

01

Transliteration Collapse

What to watch: Names transliterated from non-Latin scripts (Cyrillic, Arabic, Hanzi) produce multiple valid Latin spellings. The model matches 'Sergei' to 'Sergey' but misses 'Siarhei' entirely, or over-matches phonetically similar but distinct identities. Guardrail: Pre-process records through a deterministic transliteration library before prompting. Include known alias lists in the context. Add a specific eval set of transliteration pairs with expected match/no-match labels.

02

Date-of-Birth Proximity Overfitting

What to watch: The model treats DOB as a high-precision match field when it should be probabilistic. A single-digit transposition (1987 vs 1978) or month-day swap (03-04 vs 04-03) causes false negatives. Conversely, common DOBs in large populations cause false positives when name evidence is weak. Guardrail: Require the prompt to treat DOB as a weighted signal, not a binary match key. Include explicit instructions for handling single-digit differences and month-day ambiguity. Test with DOB-off-by-one adversarial cases.

03

Obfuscation Blindness

What to watch: Deliberate identity obfuscation—swapped name order, inserted middle initials, address component rotation, or document number character substitution—is treated as innocent data entry error. The model returns 'likely match' when it should flag suspicious patterns. Guardrail: Add a dedicated obfuscation-indicator output field. Include few-shot examples showing deliberate manipulation patterns. Require the model to explain why a mismatch pattern looks intentional versus accidental.

04

Address Drift Over-Penalization

What to watch: Legitimate address changes (moves, street renames, postal code updates) cause false negatives because the model weights address match too heavily. A person who moved between two records is scored as a mismatch despite strong name and DOB alignment. Guardrail: Instruct the model to treat address as corroborating evidence, not a primary match key. Include temporal context—if one record is older, address change is expected. Test with known-relocation cases in the eval set.

05

Document Number Over-Indexing

What to watch: When document numbers (passport, national ID, driver's license) match exactly, the model short-circuits and ignores contradictory evidence elsewhere. A stolen document number paired with a different name and DOB still returns 'match' because the strong signal dominates. Guardrail: Require the prompt to evaluate all fields holistically even when a document number matches. Add a specific check: 'If document number matches but name or DOB conflict, flag for manual review.' Include adversarial test cases with matched documents and mismatched identities.

06

Confidence Calibration Drift

What to watch: The model returns 'high confidence match' for records with only partial alignment (name match, no DOB, no address) or 'low confidence mismatch' when evidence is overwhelmingly negative. Confidence scores don't reflect actual evidentiary weight. Guardrail: Define explicit confidence tiers in the prompt with required evidence thresholds for each tier. Include a calibration eval set where expected confidence is pre-labeled. Log confidence distributions in production and alert on calibration drift.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for evaluating the quality of an Entity Resolution Prompt for Identity Matching before shipping. Use these standards to build a test harness that catches common failure modes in production.

CriterionPass StandardFailure SignalTest Method

Match Decision Accuracy

Correctly identifies true matches and non-matches on a golden dataset of 50 known identity pairs with at least 95% precision and recall.

Output classifies a known non-match as a match or vice versa. Rationale contradicts the provided evidence.

Run prompt against a curated golden dataset containing confirmed matches, non-matches, and edge cases. Compare output decision to ground truth label.

Rationale Grounding

Every reason cited in the rationale field directly references a specific input field value or comparison, not an external assumption.

Rationale contains statements like 'likely the same person' without citing which fields matched, or references information not present in the input records.

Parse the rationale text. For each claim, verify it maps to a specific field comparison in the input. Flag any unsupported assertions.

Transliteration Handling

Correctly identifies a match when names differ only by transliteration (e.g., 'Sergei' vs 'Sergey') and other strong identifiers align.

Output marks a clear transliteration variant as a non-match or flags it with low confidence despite matching DOB and document numbers.

Include 5 test cases with known transliteration variants in the golden dataset. Verify the match decision and confidence score are appropriate.

Obfuscation Flagging

Raises an obfuscation indicator when input records show deliberate mismatches in non-critical fields but perfect matches on hard-to-forge identifiers.

Output treats a record with a slightly altered address but matching passport number as a simple non-match without flagging the anomaly.

Test with crafted obfuscation cases: matching biometric or document numbers but mismatched name spelling or address. Check for the presence and accuracy of the obfuscation indicator.

Confidence Score Calibration

High-confidence scores (>=0.9) correspond to matches on multiple strong identifiers. Low-confidence scores (<=0.5) correspond to ambiguous or conflicting evidence.

Output assigns a confidence score of 0.95 to a match based only on a common name and city, or assigns 0.2 to a match on a unique national ID number.

Bin confidence scores from the golden dataset runs. Verify that high-confidence bins contain predominantly correct decisions and low-confidence bins contain errors or genuinely ambiguous cases.

Schema Compliance

Output is valid JSON that strictly conforms to the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed.

Output is missing the 'match_decision' field, contains a string where a float is expected for 'confidence_score', or includes extra unstructured text outside the JSON object.

Validate the raw model output against the JSON schema programmatically. Reject any response that fails structural or type validation.

Null and Missing Data Handling

When a critical identifier like [DOCUMENT_NUMBER] is missing from one record, the output acknowledges the missing data and adjusts confidence downward rather than hallucinating a value.

Output invents a document number to force a match, or ignores the missing field entirely and assigns a high-confidence score.

Include test cases with intentionally omitted fields. Assert that the output does not contain fabricated values and that the confidence score is appropriately reduced.

Data Entry Error Tolerance

Correctly identifies a match when a single field contains a minor typo (e.g., 'Jhon' for 'John') but all other identifiers align perfectly.

Output treats a single-character typo in the name field as strong evidence of a non-match, ignoring the alignment of DOB, address, and document number.

Use mutation testing: introduce one typo into a strong match case. Verify the output still returns a match decision with a rationale that acknowledges the typo as minor.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a single comparison pair and lighter validation. Focus on getting the rationale structure right before adding strict schema enforcement. Start with a simple JSON output shape: match, confidence, rationale.

Watch for

  • Overly broad instructions that produce narrative instead of structured output
  • Missing schema checks leading to inconsistent field names
  • Model treating transliterated names as completely different entities without flagging
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.