This prompt is for pipeline engineers who need to prevent redundant verification work by identifying and merging near-duplicate claims before they hit expensive evidence retrieval and matching stages. The job-to-be-done is cost control and processing efficiency: when a batch of extracted claims contains semantically equivalent statements with minor wording differences, running each through the full verification pipeline wastes compute, API budget, and human review time. The ideal user is a platform engineer or verification pipeline operator who already has a claim extraction step producing structured claim objects and needs a deduplication stage that produces a canonical claim set plus a mapping of duplicates to their canonical representatives.
Prompt
Batch Processing Claim Deduplication Prompt Template

When to Use This Prompt
Define the job, reader, and constraints for the batch claim deduplication prompt.
Use this prompt when your claim volume exceeds a few hundred items per batch and you observe that 15-40% of claims are near-duplicates of each other—common in multi-document extraction runs where the same fact appears in slightly different phrasings across sources. The prompt expects structured input: each claim must have a unique ID, the claim text, and optionally its source document reference. Do not use this prompt for exact string matching (a simple hash or text comparison is cheaper and more reliable) or for claims that differ in factual content rather than phrasing—semantic deduplication should merge 'The CEO resigned in March 2024' and 'The chief executive stepped down last March' but must not merge 'Revenue grew 12%' and 'Revenue grew 20%' even if they share structure.
Before deploying this prompt into production, you must implement a pre-filter for exact duplicates using normalized text hashing, and a post-validation step that checks the deduplication output for false merges—cases where claims with different factual content were incorrectly grouped. The prompt is designed for a single model call per batch, but for batches exceeding 50 claims, you should split into chunks of 30-50 claims with overlap windows to avoid missing cross-chunk duplicates. Always log the duplicate mappings for auditability, and route any claims where the model's confidence in a merge decision is below your threshold to a human review queue before the canonical claim proceeds to evidence retrieval.
Use Case Fit
Where the Batch Processing Claim Deduplication prompt template delivers value and where it introduces risk. Use these cards to decide if this template fits your verification pipeline stage.
Good Fit: High-Volume Claim Ingestion
Use when: your pipeline ingests thousands of claims from multiple documents or extraction runs and near-duplicates waste verification budget. Guardrail: run deduplication as a mandatory stage after extraction and before evidence retrieval to prevent redundant API calls and scoring cycles.
Bad Fit: Single-Document, Low-Volume Review
Avoid when: processing fewer than 50 claims or a single document where human review is faster and more accurate. Guardrail: bypass the batch deduplication stage and route directly to manual triage when claim count is below a configurable threshold.
Required Inputs: Atomic Claims with Source Anchors
What to watch: the deduplication prompt fails silently if claims lack original text spans, source document IDs, or extraction timestamps. Guardrail: validate that every incoming claim carries a source pointer and extraction metadata before invoking the deduplication template; reject or quarantine incomplete records.
Operational Risk: False Merges of Distinct Claims
What to watch: semantically similar but factually distinct claims (e.g., 'revenue grew 10% in Q1' vs. 'revenue grew 10% in Q2') may be incorrectly merged into one canonical representation. Guardrail: implement a post-deduplication sampling check where a human or LLM judge reviews a random subset of merges for temporal, numerical, or entity-level divergence.
Operational Risk: Canonical Claim Drift
What to watch: the canonical representation generated during deduplication may subtly alter the original claim's meaning, breaking downstream evidence matching. Guardrail: require the prompt to output both the canonical form and a fidelity score; route claims with low fidelity scores to human review before they enter the evidence retrieval stage.
Cost Risk: Unbounded Pairwise Comparison
What to watch: naive all-pairs comparison of claims scales quadratically, blowing up token usage and latency on large batches. Guardrail: pre-cluster claims by entity, topic, or embedding similarity before invoking the deduplication prompt; set a hard maximum batch size and split larger sets with overlap windows.
Copy-Ready Prompt Template
A reusable prompt for deduplicating claims in batch verification pipelines, producing canonical representations and duplicate mappings.
This prompt template is designed for pipeline engineers who need to prevent redundant verification of near-duplicate claims. It takes a batch of extracted claims and identifies semantic duplicates, producing a canonical claim set with explicit duplicate-to-canonical mappings. The template uses square-bracket placeholders so you can wire it into your verification pipeline with your own claim schemas, deduplication thresholds, and output contracts.
textYou are a claim deduplication engine in a fact-checking pipeline. Your task is to process a batch of extracted claims, identify semantic near-duplicates, and produce a canonical claim set with explicit duplicate mappings. ## INPUT [BATCH_INPUT] ## DEDUPLICATION RULES 1. Two claims are duplicates if they assert the same factual proposition, even if wording, granularity, or framing differs. 2. Claims that are more specific versions of a general claim should be treated as duplicates of the more specific claim, not the general one. 3. Claims about different entities, time periods, locations, or numerical values are NOT duplicates, even if structurally similar. 4. Claims that differ in modality (e.g., "X happened" vs. "X may have happened") are NOT duplicates. 5. Claims that differ in attribution (e.g., "Source A says X" vs. "Source B says X") are NOT duplicates if the attribution is part of the claim. ## OUTPUT SCHEMA Return a JSON object with the following structure: { "canonical_claims": [ { "canonical_id": "string", "canonical_text": "string", "original_claim_ids": ["string"], "claim_count": integer, "representative_claim_id": "string" } ], "duplicate_mappings": [ { "original_claim_id": "string", "canonical_id": "string", "similarity_notes": "string" } ], "singleton_claims": ["string"], "merge_statistics": { "input_claim_count": integer, "canonical_claim_count": integer, "duplicate_claim_count": integer, "singleton_claim_count": integer, "largest_merge_group_size": integer }, "uncertain_merges": [ { "claim_id_a": "string", "claim_id_b": "string", "uncertainty_reason": "string", "recommendation": "manual_review | auto_merge | keep_separate" } ] } ## CONSTRAINTS - Every input claim must appear in exactly one canonical group or as a singleton. - Canonical text should be the clearest, most complete version among the duplicates. - If unsure whether two claims are duplicates, flag them in `uncertain_merges` rather than forcing a decision. - Do not invent claims. Every canonical claim must be traceable to at least one input claim. - Preserve all original claim IDs for audit trail purposes. ## EXAMPLES [FEW_SHOT_EXAMPLES] ## RISK LEVEL [RISK_LEVEL] Process the batch and return only the JSON output.
To adapt this template, replace [BATCH_INPUT] with your serialized claim batch—typically a JSON array of claim objects with at minimum claim_id and claim_text fields. Provide [FEW_SHOT_EXAMPLES] with 2-4 annotated examples showing clear duplicates, near-duplicates, and non-duplicates that are structurally similar. Set [RISK_LEVEL] to high if downstream verification actions are irreversible, which should trigger stricter merge thresholds and mandatory human review for uncertain_merges. For production use, add a [CONFIDENCE_THRESHOLD] parameter to control the boundary between auto-merge and flag-for-review, and consider adding a [DOMAIN_CONTEXT] field if your claims use domain-specific terminology that affects semantic equivalence judgments.
Before deploying this prompt into a batch pipeline, validate that your input schema matches the expected claim structure, test with known duplicate sets to measure merge precision and recall, and implement a post-processing validator that checks the output JSON for completeness—every input claim ID must appear in either canonical_claims, duplicate_mappings, or singleton_claims. For high-stakes verification pipelines, route all uncertain_merges to a human review queue and log merge decisions for audit trail assembly.
Prompt Variables
Required inputs for the Batch Processing Claim Deduplication Prompt Template. Each placeholder must be populated before the prompt is assembled and sent to the model. Validation notes describe how to programmatically verify the input before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[CLAIM_BATCH] | Array of claim objects extracted from upstream processing, each with a unique claim_id, full claim_text, source_document_id, and extraction_timestamp | [{"claim_id":"c-001","claim_text":"Revenue grew 14% YoY in Q3","source_document_id":"doc-42","extraction_timestamp":"2025-01-15T10:00:00Z"}] | Must be a non-empty JSON array. Each element requires claim_id (string, non-empty), claim_text (string, non-empty), source_document_id (string, non-empty). Reject batch if array length is 0 or any required field is missing or null. |
[DEDUP_THRESHOLD] | Semantic similarity threshold above which two claims are considered duplicates and merged into a canonical representation | 0.92 | Must be a float between 0.0 and 1.0. Values below 0.80 risk false merges; values above 0.98 risk missed duplicates. Validate range and type before prompt assembly. Log threshold for audit trail. |
[CANONICAL_STRATEGY] | Instruction for how the model should select or synthesize the canonical claim text from a duplicate cluster | select_most_specific | Must be one of: select_most_specific, select_longest, synthesize_union, select_first_extracted. Reject unknown values. Strategy affects downstream verification accuracy; document choice in pipeline config. |
[MAX_CLUSTER_SIZE] | Upper bound on the number of claims allowed in a single duplicate cluster before the batch is split or flagged for review | 50 | Must be a positive integer. Clusters exceeding this size should trigger a partial-batch split or human-review flag. Validate type and positivity. Used to prevent memory overruns in large document sets. |
[OUTPUT_SCHEMA_VERSION] | Schema version identifier for the deduplication output format, enabling downstream consumers to parse results correctly | 2.1 | Must match a known schema version in the pipeline registry. Reject unrecognized versions. Schema version determines field expectations for canonical_claim, duplicate_ids, and merge_confidence. |
[SOURCE_PREFERENCE_RULES] | Ordered rules for selecting which source_document_id to retain as primary when merging claims from multiple documents | [{"priority":1,"rule":"prefer_authoritative_source","source_list":["audited_financials","regulatory_filing"]},{"priority":2,"rule":"prefer_earliest_extraction"}] | Must be a JSON array of rule objects with priority (integer), rule (string from allowed set), and optional source_list. Validate JSON parse, rule name membership, and priority uniqueness. Empty array allowed; defaults to prefer_earliest_extraction. |
[FALSE_MERGE_SAFEGUARDS] | List of claim attributes that must differ to prevent merging, even when semantic similarity exceeds the threshold | ["negation_presence","temporal_scope","numerical_value"] | Must be a JSON array of strings from the allowed safeguard set: negation_presence, temporal_scope, numerical_value, subject_entity, claim_type. Validate array membership. Empty array disables safeguards; log warning if safeguards are disabled in production. |
[BATCH_ID] | Unique identifier for this deduplication batch, used for tracing, logging, and checkpointing in the verification pipeline | dedup-batch-2025-01-15-001 | Must be a non-empty string. Should be unique within the pipeline run. Validate non-emptiness. Used in all log events and output records for traceability. Generate via UUID or timestamped counter if not provided upstream. |
Implementation Harness Notes
How to wire the deduplication prompt into a production verification pipeline with validation, retries, and observability.
The deduplication prompt is designed to operate as a stateless batch processor within a larger verification pipeline. It receives a batch of claims, produces a canonical claim set with duplicate mappings, and returns structured output that downstream stages consume. The implementation harness must handle input batching, output validation, idempotency, and failure recovery. Because deduplication errors can cascade—either by merging distinct claims (false positives) or by treating near-duplicates as separate (false negatives)—the harness must include strict validation gates before the deduplicated set proceeds to evidence retrieval or scoring stages.
Input assembly requires grouping claims into batches sized for the model's context window and latency budget. For a typical 8K–32K context model, batch sizes of 50–200 claims work well, depending on average claim length. Each batch should include a unique batch_id, a run_id for the pipeline execution, and the full claim objects with their source provenance. The harness should deduplicate claims within a batch first, then optionally run a second pass across batch boundaries for high-recall use cases. Output validation must check: (1) every input claim appears in exactly one canonical group or the duplicate mapping, (2) canonical claim IDs are stable and unique, (3) no claim is mapped to itself as a duplicate, and (4) the output schema matches the expected contract. A validation failure should trigger a retry with the same batch and an error context appended to the prompt, not silently pass malformed output downstream.
Retry and recovery logic should distinguish between transient failures (malformed JSON, partial output) and persistent failures (consistent semantic errors, repeated false merges). For transient failures, implement up to three retries with exponential backoff, appending the validation error message to the prompt on each retry. For persistent failures, route the batch to a dead-letter queue with the full input, output, and validation trace for human review. Model selection matters: smaller models may struggle with subtle semantic distinctions between claims that differ only in quantification, temporal scope, or attribution. Use a capable model (GPT-4-level or equivalent) for the deduplication step, and consider running a cheaper model as a consistency check on a sample of outputs. Observability requires logging: batch size, input claim count, output canonical count, duplicate count, merge ratio, validation pass/fail, retry count, and latency. Set an alert if the merge ratio exceeds 0.9 (suggesting over-aggressive deduplication) or falls below 0.05 on known-duplicate-heavy batches (suggesting under-deduplication).
Integration points with the broader pipeline: the deduplication stage should sit immediately after claim extraction and before evidence retrieval. This prevents redundant retrieval calls for near-duplicate claims, directly reducing cost and latency. The canonical claim set should preserve a source_claim_ids array linking back to original claims for audit trail purposes. When a downstream verification stage produces a verdict for a canonical claim, the harness must propagate that verdict to all duplicate claims in the mapping. Human review gates are essential when the model flags claims as 'uncertain' or when the merge confidence falls below a configurable threshold (default: 0.7). Package uncertain cases with both claims, the model's reasoning, and a structured review prompt for a human operator. Do not auto-merge uncertain pairs without review, as false merges are harder to detect and correct downstream than false duplicates.
Common Failure Modes
What breaks first when deduplicating claims at scale and how to guard against it.
Semantic False Positives
What to watch: The model merges claims that sound similar but assert different facts (e.g., 'revenue grew 15%' vs 'revenue grew to 15%'). This is the most common and damaging failure mode because it silently discards distinct claims. Guardrail: Require the model to output a merge_confidence score and a difference_summary field. Route merges below a 0.9 threshold to human review. Add eval cases with near-duplicate but factually distinct claim pairs.
Canonical Representation Drift
What to watch: The canonical claim chosen to represent a cluster loses critical nuance from the original claims—dates shift, quantities round, or attribution drops. Downstream verification then checks a distorted version of the claim. Guardrail: Validate that every key entity (numbers, dates, named entities) in the canonical claim appears in at least one source claim. Add a preservation_check field listing any information present in source claims but absent from the canonical form.
Boundary Over-Merging in Long Documents
What to watch: Claims from different sections of a long document (e.g., Q1 results vs Q3 projections) get incorrectly merged because the model loses positional context. The deduplication prompt sees only the claim text, not its document location. Guardrail: Include a source_location field (section header, paragraph index) in each claim's metadata. Add a constraint that claims from different document sections require explicit justification to merge.
Batch Boundary Inconsistency
What to watch: When processing claims in batches, a claim in batch N might duplicate a claim in batch N-1, but the model has no visibility across batch boundaries. This creates duplicate canonical claims across batches that downstream systems treat as distinct. Guardrail: Maintain a cross-batch canonical claim cache. Before finalizing a batch, check new canonical claims against the cache using embedding similarity. Flag cross-batch matches for merge or append.
Negation and Polarity Blindness
What to watch: The model treats 'the system passed the test' and 'the system did not pass the test' as duplicates because embedding similarity is high. The negation word carries low weight in semantic comparison but flips the claim's truth value entirely. Guardrail: Add a polarity_check step that explicitly compares the assertion polarity of candidate duplicates. Require exact polarity match for auto-merge. Route polarity mismatches to human review regardless of confidence score.
Temporal Scope Collapse
What to watch: Claims with different temporal scopes ('in 2023' vs 'in Q3 2023' vs 'as of September 2023') get merged into a single canonical claim with a vague or incorrect time reference. The resulting claim becomes unverifiable because the time window is ambiguous. Guardrail: Extract and normalize all temporal expressions before deduplication. Add a constraint that merged claims must share the same normalized time range. If temporal scopes differ, keep claims separate and note the relationship.
Evaluation Rubric
Test criteria for evaluating the quality of deduplicated claim sets before integrating this prompt into a production verification pipeline.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Canonical Claim Selection | The canonical claim is the most specific, self-contained version of the semantic cluster | Canonical claim is vaguer than a duplicate or omits a key qualifier present in all duplicates | Pairwise human review of 50 random clusters; canonical must be rated as 'best representative' in >90% of cases |
Duplicate Recall | All claims sharing the same verifiable fact are grouped, with no false negatives | Two claims making the same factual assertion appear in different clusters | Inject 20 known near-duplicate pairs into a batch of 200 claims; require 100% pair co-clustering |
False-Merge Avoidance | Claims with different verifiable facts are never merged into the same cluster | Claims about different entities, time periods, or metrics appear in the same cluster | Inject 20 known distinct-but-similar claim pairs; require 0% incorrect co-clustering |
Duplicate Mapping Completeness | Every non-canonical claim has a | A claim in a multi-claim cluster lacks a | Schema validation: assert |
Cluster Size Distribution | Clusters reflect natural duplication patterns without over-merging or fragmentation | All claims end up in one cluster, or every claim is its own singleton cluster | Check cluster size histogram; flag if >30% of claims are in clusters of size 1 when known duplicates exist, or if max cluster size exceeds 50% of batch |
Semantic Boundary Handling | Claims with different verification outcomes are never merged even if lexically similar | A claim about 'revenue grew 10%' is merged with 'revenue grew 12%' or 'revenue declined 10%' | Construct 10 adversarial pairs with identical structure but different numbers, entities, or polarity; require 0% merge rate |
Output Schema Compliance | Output strictly matches the expected JSON schema with all required fields | Missing | Validate output against JSON Schema; reject any response that fails structural validation |
Idempotency | Running deduplication twice on the same input produces identical cluster assignments | Cluster boundaries or canonical selections change on re-run with identical input | Run prompt 3 times on the same 100-claim batch with temperature=0; require identical cluster ID assignments across all runs |
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 deduplication prompt using a small batch of 20-50 claims. Use the canonical representation instruction but skip strict schema validation. Focus on getting semantically similar claims grouped correctly before adding production constraints. Replace [SIMILARITY_THRESHOLD] with a descriptive instruction like "claims that make the same factual assertion even if worded differently."
Prompt modification
Remove the [OUTPUT_SCHEMA] placeholder and ask for a simple JSON array of groups with canonical_claim and duplicate_ids fields. Drop the confidence_score and merge_rationale fields until you've validated grouping quality.
Watch for
- Over-merging claims that differ in scope, timeframe, or attribution
- Under-merging identical claims with minor word order changes
- Missing edge cases where one claim is a subset of another
- No baseline accuracy measurement before iterating

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