Inferensys

Prompt

LLM Judge Deduplication Rubric Prompt

A practical prompt playbook for evaluation and QA engineers who need a calibrated LLM judge to score whether two records, paragraphs, or claims are duplicates. Includes a copy-ready rubric, pairwise comparison format, calibration examples, and an inter-rater reliability tracking harness.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
PROMPT PLAYBOOK

When to Use This Prompt

Learn when to deploy the LLM Judge Deduplication Rubric Prompt and when to choose a different tool for your quality assurance pipeline.

This prompt is for evaluation and quality assurance engineers who need to automate the detection of duplicate content in AI-generated outputs. Instead of relying on brittle string-matching or embedding-distance thresholds alone, this playbook provides a calibrated rubric for an LLM judge. The judge scores pairs of records, paragraphs, or claims on a defined ordinal scale, producing structured decisions that can be tracked, audited, and compared against human raters. Use this when you need a repeatable, explainable deduplication signal that fits into a regression testing suite, a data quality pipeline, or a human-in-the-loop review queue.

This is not a prompt for performing deduplication itself; it is a prompt for evaluating whether a deduplication decision is correct. If your goal is to remove duplicates from a dataset, use a sibling playbook like the Exact Duplicate Removal Prompt Template or the Near-Duplicate Paragraph Detection Prompt. This rubric is designed for the meta-evaluation layer: measuring how well your deduplication system works, calibrating thresholds, and catching edge cases where semantic similarity does not equal functional duplication. It is particularly valuable when you are tuning a fuzzy matching system, comparing the performance of multiple deduplication approaches, or building a golden test set for ongoing quality monitoring.

Do not use this prompt when you need real-time deduplication in a user-facing product flow. The pairwise comparison format introduces latency and cost that is appropriate for offline evaluation, not synchronous request paths. Also avoid this prompt when the definition of 'duplicate' is purely syntactic—simple string equality checks are faster, cheaper, and more reliable for exact matches. Reserve this rubric for cases where semantic overlap, paraphrasing, or partial redundancy create ambiguity that requires judgment. For high-stakes domains like healthcare or legal content, always include human review as a final arbiter and track inter-rater agreement between the LLM judge and domain experts before relying on automated scores.

PRACTICAL GUARDRAILS

Use Case Fit

Where the LLM Judge Deduplication Rubric Prompt works, where it breaks, and what you must provide before using it in a production evaluation pipeline.

01

Good Fit: Pairwise Record Comparison

Use when: you need to score whether two structured records, paragraphs, or claims are duplicates on a defined scale. Guardrail: define the scale explicitly (e.g., 1-5) with behavioral anchors for each level before running the judge.

02

Good Fit: Inter-Rater Reliability Tracking

Use when: you need to measure agreement between human reviewers and the LLM judge over time. Guardrail: log every pairwise judgment with the judge's rationale, then compute Cohen's kappa or Krippendorff's alpha against human labels on a fixed calibration set before trusting production scores.

03

Bad Fit: Real-Time Deduplication in High-Throughput Pipelines

Avoid when: you need millisecond deduplication across millions of records. Risk: LLM judge latency and cost make this impractical for real-time dedup. Guardrail: use the rubric prompt for offline evaluation and calibration; deploy deterministic fuzzy matching or embedding-based dedup in the hot path, reserving the judge for spot-checking and threshold tuning.

04

Bad Fit: Uncalibrated or Vague Similarity Standards

Avoid when: your team cannot define what counts as a duplicate with concrete examples. Risk: the judge will produce inconsistent, unactionable scores. Guardrail: invest in a calibration workshop first—collect 50-100 labeled pairs, resolve disagreements, and lock the rubric before prompting the judge.

05

Required Inputs

You must provide: a pairwise comparison format, a defined scoring scale with per-level descriptions, at least 5 calibration examples per score level, and a labeled ground-truth set for ongoing reliability checks. Guardrail: version the rubric alongside your prompt; treat rubric changes as breaking changes that require re-calibration.

06

Operational Risk: Judge Drift Over Time

What to watch: the LLM judge's scoring behavior shifts as models update or as the data distribution changes. Guardrail: run the judge against a held-out calibration set on a schedule (weekly or per-deployment) and alert if agreement with human labels drops below your accepted threshold. Rotate calibration examples periodically to prevent overfitting.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A calibrated rubric prompt for an LLM judge to score pairwise record duplication on a defined scale with structured reasoning.

This template provides a complete, copy-ready prompt for an LLM judge tasked with evaluating whether two records, paragraphs, or claims are duplicates. It enforces a structured JSON output, requires the judge to explain its reasoning before scoring, and uses a configurable scale with calibration examples. The prompt is designed to be pasted directly into your evaluation harness after replacing the square-bracket placeholders with your specific domain, scale, and examples.

text
You are an expert data quality judge. Your task is to evaluate whether two records are duplicates according to a defined scale. You must explain your reasoning before providing a final score.

## SCALE DEFINITION
[SCALE_DEFINITION]

## CALIBRATION EXAMPLES
[EXAMPLES]

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

## OUTPUT SCHEMA
You must respond with a single JSON object conforming to this schema:
{
  "reasoning": "A step-by-step explanation of the evidence considered, the semantic overlap observed, and how the scale definition applies to this pair.",
  "score": [SCORE_VALUE],
  "confidence": [CONFIDENCE_VALUE]
}

## CONSTRAINTS
- Base your judgment only on the provided records and the scale definition.
- If the records are in different formats or contexts, note this in your reasoning.
- If you are uncertain, reflect that in the confidence field rather than guessing.
- Do not invent information not present in the records.

After copying the template, replace [SCALE_DEFINITION] with your duplication scale (e.g., a 1-5 Likert scale from 'Completely Distinct' to 'Identical', or a binary 'Duplicate'/'Not Duplicate' definition). Replace [EXAMPLES] with 3-5 calibrated example pairs that demonstrate boundary cases for each score level. Replace [RECORD_A] and [RECORD_B] with the actual pair to judge. [SCORE_VALUE] and [CONFIDENCE_VALUE] should be replaced with the expected types (e.g., integer or string and float between 0.0 and 1.0). For high-stakes deduplication (e.g., customer records, clinical data), always route ambiguous cases (where confidence is below your defined threshold) to a human review queue rather than auto-resolving. Validate the JSON output before accepting the score, and log the reasoning for inter-rater reliability tracking.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder must be populated before the prompt is sent to the model. Validation notes describe what makes a value well-formed.

PlaceholderPurposeExampleValidation Notes

[RECORD_A]

First record, paragraph, or claim for pairwise comparison

{"id": "rec-001", "text": "The user reported a login failure on iOS 17.2."}

Must be a non-empty string or object with a text field. Null or whitespace-only values should be rejected before prompt assembly.

[RECORD_B]

Second record, paragraph, or claim for pairwise comparison

{"id": "rec-002", "text": "Login failure reported by user on iOS 17.2."}

Must be a non-empty string or object with a text field. If identical to [RECORD_A] at the byte level, skip the LLM call and return score 1.0 directly.

[RUBRIC_LEVELS]

Ordered list of duplication levels with definitions and score anchors

[{"score": 1.0, "label": "Exact Duplicate", "definition": "Identical meaning and surface form."}, {"score": 0.8, "label": "Near Duplicate", "definition": "Same core claim, minor wording differences."}, {"score": 0.4, "label": "Related", "definition": "Same topic, different specific claim."}, {"score": 0.0, "label": "Unrelated", "definition": "No shared claim or topic."}]

Must be a JSON array of at least 2 objects, each with score (float 0.0-1.0), label (string), and definition (string). Scores must be strictly decreasing. Validate schema before prompt assembly.

[CALIBRATION_EXAMPLES]

Few-shot examples to anchor the judge's scoring behavior

[{"record_a": "User cannot log in.", "record_b": "Login is broken for user.", "score": 0.9, "rationale": "Same claim, paraphrased."}]

Must be a JSON array of 2-5 objects, each with record_a, record_b, score, and rationale. Scores must align with [RUBRIC_LEVELS] anchors. Validate that example scores are consistent with rubric definitions.

[OUTPUT_SCHEMA]

Expected JSON structure for the judge's response

{"score": 0.85, "label": "Near Duplicate", "rationale": "Both describe the same login failure on the same OS version.", "confidence": 0.92}

Must be a valid JSON Schema or example object with required fields: score (float), label (string), rationale (string). Optional: confidence (float 0.0-1.0). Validate that the schema is parseable before injection.

[CONFIDENCE_THRESHOLD]

Minimum confidence below which the pair is flagged for human review

0.7

Must be a float between 0.0 and 1.0. If the judge's confidence is below this value, the pair should be routed to a human review queue rather than auto-resolved. Default to 0.7 if not specified.

[MAX_PAIRS_PER_BATCH]

Upper limit on pairwise comparisons per LLM call to avoid context overflow

50

Must be a positive integer. Calculate based on average token length of records plus rubric and examples. Exceeding this limit risks truncation or degraded judgment quality. Validate against context window size of target model.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the LLM Judge Deduplication Rubric Prompt into an evaluation pipeline with candidate pair generation, prompt assembly, response validation, and inter-rater reliability tracking.

The deduplication rubric prompt is not a one-shot tool; it is a scoring function inside a larger evaluation harness. The harness is responsible for generating candidate pairs from your dataset, assembling the rubric prompt with the correct [RECORD_A], [RECORD_B], and [RUBRIC] placeholders, calling the judge model, and collecting structured scores. This section describes how to build that harness so you can run pairwise comparisons at scale, track judge consistency, and calibrate thresholds before promoting the rubric to production use.

Start with candidate pair generation. For a dataset of N records, avoid the O(N²) trap of comparing all pairs. Instead, use a blocking strategy: group records by a shared key such as a normalized name prefix, a locality-sensitive hash, or an embedding cosine-similarity threshold above 0.85. Within each block, generate all unique pairs. For each pair, assemble the prompt by injecting [RECORD_A] and [RECORD_B] as JSON strings with a consistent field order. The [RUBRIC] placeholder should contain the full scoring scale, definitions, and calibration examples. Call the judge model with temperature=0 and a structured output schema that enforces { "score": int, "rationale": string, "key_differences": [string] }. Validate every response: reject any output where score is outside the defined scale or where rationale is empty. On validation failure, retry once with the same prompt; if it fails again, log the pair for human review and emit a null score.

Inter-rater reliability tracking is essential because the judge model is a single rater that can drift or exhibit systematic bias. Maintain a holdout set of 50–100 human-labeled pairs with known duplicate/non-duplicate ground truth. After every scoring run, compute Cohen's kappa between the judge scores and the human labels on this holdout set. If kappa drops below 0.7, pause automated scoring and investigate: check for prompt drift, model version changes, or distribution shift in your record pairs. Log every judge decision with the pair ID, score, rationale, model version, and timestamp. This audit trail lets you trace disagreements back to specific rubric weaknesses. When you update the rubric, re-run the holdout set and compare kappa before and after the change. Do not deploy a new rubric version until holdout agreement is stable.

For production integration, wrap the harness in a queue-based worker. Enqueue candidate pairs, call the judge model with retry logic, write validated scores to a results table, and update the inter-rater dashboard. Set a maximum concurrency based on your judge model's rate limits. If you are scoring thousands of pairs, batch the holdout evaluation at the start and end of each run to detect drift without slowing throughput. The harness should also emit a summary report: total pairs scored, score distribution, validation failure rate, retry rate, and holdout kappa. This report is your release gate—if any metric crosses a predefined threshold, block the results from downstream deduplication and escalate to the evaluation owner.

IMPLEMENTATION TABLE

Expected Output Contract

The exact JSON structure the LLM judge must return for each pairwise comparison. Validate every field before accepting the decision. Reject any response that does not conform to this contract.

Field or ElementType or FormatRequiredValidation Rule

decision

string enum: ["duplicate", "not_duplicate", "ambiguous"]

Must be exactly one of the three allowed enum values. Reject any other string.

confidence_score

number (float between 0.0 and 1.0)

Must be a valid float. Reject if < 0.0 or > 1.0. If decision is "ambiguous", confidence must be ≤ 0.75.

rationale

string (1-3 sentences)

Must be a non-empty string. Reject if null, empty, or whitespace-only. Must reference specific fields from [RECORD_A] and [RECORD_B].

matched_fields

array of strings

Must be a JSON array. Each element must be a string matching a field name present in both [RECORD_A] and [RECORD_B]. Reject if array contains field names not in the input records.

divergent_fields

array of strings

Must be a JSON array. Each element must be a string matching a field name present in both [RECORD_A] and [RECORD_B]. Reject if array contains field names not in the input records.

suggested_merge_action

string enum: ["keep_a", "keep_b", "merge", "keep_both", "none"]

Must be exactly one of the five allowed enum values. If decision is "not_duplicate", this must be "keep_both". If decision is "ambiguous", this must be "none".

calibration_flag

boolean

Must be true or false. Set to true if the judge detects that the pair matches a known calibration edge case from the rubric. Reject if not a boolean.

review_required

boolean

Must be true or false. Automatically set to true if confidence_score < [CONFIDENCE_THRESHOLD] or decision is "ambiguous". Reject if not a boolean.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when using an LLM judge for deduplication, and how to guard against each failure.

01

False Positives on Stylistic Variation

Risk: The judge marks records as duplicates because they share a topic or use similar phrasing, even when they contain distinct facts, arguments, or entities. This is common in summarization and research synthesis where multiple passages discuss the same subject from different angles. Guardrail: Include explicit counterexamples in the calibration set that demonstrate topic overlap without semantic duplication. Add a rubric criterion that requires a difference in core claim or entity before flagging as duplicate.

02

False Negatives on Paraphrased Content

Risk: The judge fails to recognize that two records express the same information using different vocabulary, sentence structure, or level of detail. This is especially common when one record is a compressed version of the other or when domain-specific synonyms are used. Guardrail: Provide few-shot examples that pair verbose and concise versions of the same claim. Use a similarity threshold that accounts for paraphrase, not just lexical overlap, and validate against a human-annotated paraphrase dataset.

03

Threshold Drift Across Batches

Risk: The judge's effective decision boundary shifts across different batches of comparisons due to context effects, fatigue in long sessions, or distribution shift in the input data. A threshold calibrated on one batch produces inconsistent precision and recall on the next. Guardrail: Embed fixed calibration examples at regular intervals within each batch. Track inter-rater reliability against a held-out gold set and trigger recalibration when agreement drops below a predefined threshold.

04

Position Bias in Pairwise Comparison

Risk: The judge systematically favors the first or second record in a pair when assigning duplicate status, especially in borderline cases. This skews results when record order is not randomized and undermines the fairness of the deduplication decision. Guardrail: Run each pair in both orders and require consistent scoring. If the scores diverge, flag the pair for human review or use the average score. Log position-order effects for ongoing monitoring.

05

Over-Reliance on Surface Features

Risk: The judge latches onto shared proper nouns, dates, or numeric values as strong duplicate signals, ignoring that the surrounding context makes the records semantically distinct. Two records mentioning the same company on the same date may describe entirely different events. Guardrail: Add a rubric dimension that explicitly separates entity overlap from claim overlap. Include calibration examples where shared entities are present but the records are not duplicates, and require the judge to articulate the distinguishing factor.

06

Confidence Miscalibration on Ambiguous Cases

Risk: The judge assigns high confidence to borderline or genuinely ambiguous comparisons, leading to automated decisions that should have been escalated for human review. This is dangerous in regulated domains where incorrect merges have compliance consequences. Guardrail: Require the judge to output a confidence score alongside the duplicate decision. Route all comparisons below a confidence threshold to a human review queue. Calibrate the confidence scale against human inter-annotator disagreement rates.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a labeled dataset of at least 100 pairs with human-annotated duplication levels before relying on the judge in production.

CriterionPass StandardFailure SignalTest Method

Agreement with human labels

Cohen's kappa >= 0.75 against human-annotated duplication levels

Kappa below 0.75 or systematic bias toward over-flagging or under-flagging

Compute kappa on held-out labeled pairs; stratify by duplication level

Calibration of confidence scores

Mean confidence for true duplicates >= 0.8; mean confidence for non-duplicates <= 0.3

Confidence scores cluster near 0.5 or invert the expected relationship

Bin confidence scores by ground-truth label; compute mean per bin

False-positive rate on distinct pairs

FPR <= 5% on pairs labeled as clearly distinct by humans

More than 5% of distinct pairs scored as duplicate or likely-duplicate

Measure on a subset of 50+ human-verified distinct pairs

False-negative rate on exact duplicates

FNR <= 2% on pairs labeled as exact duplicates by humans

More than 2% of exact duplicates missed or scored as distinct

Measure on a subset of 50+ human-verified exact-duplicate pairs

Near-duplicate boundary discrimination

Judge correctly distinguishes near-duplicate from exact-duplicate in >= 85% of boundary cases

Near-duplicate pairs consistently scored as exact or vice versa

Curate 30+ boundary pairs; compare judge label to human consensus

Stability across prompt variations

Score change <= 0.1 on same pair when non-semantic prompt elements vary

Score flips more than 0.2 when rephrasing instructions or reordering fields

Run 20 pairs through 3 prompt variants; measure max score delta per pair

Output schema compliance

100% of judge responses parse into expected [OUTPUT_SCHEMA] fields

Missing required fields, unparseable JSON, or extra hallucinated keys

Validate all responses against schema; count parse failures and schema violations

Latency and cost budget

Median response time <= 2s; 95th percentile <= 5s per pair

Tail latency exceeds 10s or cost per 1k pairs exceeds budget threshold

Benchmark on 500-pair sample; measure p50, p95 latency and token cost

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base rubric with a single calibration example and manual review of all judge outputs. Run pairwise comparisons on a small labeled dataset (20-30 pairs) to tune the scale anchors before scaling up.

code
[PAIRWISE_COMPARISON]
Record A: [RECORD_A]
Record B: [RECORD_B]

Score: [1-5 scale where 1=completely distinct, 5=exact duplicate]
Rationale: [BRIEF_EXPLANATION]

Watch for

  • Judge scoring all pairs as 3 (midpoint bias)
  • Missing calibration examples causing inconsistent scale interpretation
  • No inter-rater reliability tracking against human labels
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.