Use this prompt when an LLM judge produces a score that diverges from an expected reference score, and you need to understand why. This playbook is for evaluation platform engineers, MLOps teams, and AI quality leads who operate automated scoring pipelines. The prompt performs a structured root cause analysis, categorizing the discrepancy into one of four causes: judge error, rubric ambiguity, input edge case, or reference label noise. It extracts supporting evidence from the judge's own justification and the input context, producing a machine-readable diagnosis you can log, aggregate, and act on.
Prompt
Score Discrepancy Root Cause Analysis Prompt

When to Use This Prompt
Diagnose why an LLM judge's score diverged from an expected reference score by performing structured root cause analysis.
This prompt is a diagnostic tool for offline debugging and continuous improvement of your evaluation infrastructure. It expects you to provide the original input that was scored, the LLM judge's score and full justification, the expected reference score, and the evaluation rubric that was used. The output is a structured JSON object containing the root cause category, a confidence score, extracted evidence snippets, and a concise explanation. Wire this into your evaluation pipeline as a post-scoring analysis step that runs only when score deltas exceed a configured threshold. Log the structured output to your observability platform so you can track recurring failure patterns across judges, rubrics, and input types over time.
Do not use this prompt for real-time scoring decisions or as a substitute for judge calibration. It is not designed to correct scores on the fly or to override a judge's output in production. It is also not a replacement for inter-rater reliability metrics or systematic calibration workflows. If you find that a particular root cause category dominates your diagnostics, the correct next step is to address the systemic issue—retrain the judge, clarify the rubric, expand your edge-case test suite, or audit your reference labels—rather than running this prompt on every sample.
Use Case Fit
Where the Score Discrepancy Root Cause Analysis Prompt works and where it introduces risk. Use these cards to decide if this prompt fits your evaluation debugging workflow.
Good Fit: Structured Judge Outputs
Use when: Your LLM judges produce structured scores with justifications, and you have a reference score (human or golden) to compare against. The prompt excels at parsing justification text for evidence of rubric misinterpretation or input edge cases. Avoid when: Judges only return a numeric score with no explanation—the prompt needs reasoning traces to perform root cause analysis.
Bad Fit: Real-Time Scoring Pipelines
Risk: This prompt is designed for offline debugging and retrospective analysis, not inline scoring. Running root cause analysis on every evaluation call will add latency and cost with no operational benefit. Guardrail: Reserve this prompt for sampled discrepancy investigations, calibration audits, and post-mortem analysis of scoring failures.
Required Inputs
What you must provide: The original input that was scored, the judge's score and full justification text, the expected or reference score, and the evaluation rubric used. Without all four inputs, the prompt cannot reliably distinguish between judge error, rubric ambiguity, and input edge cases. Guardrail: Validate input completeness before invoking the prompt—return a structured error if any required field is missing.
Operational Risk: Judge Self-Diagnosis
Risk: Using the same model that produced the original score to diagnose its own errors can mask systematic blind spots. The analyzing model may share the same biases or reasoning failures as the judge. Guardrail: Cross-validate root cause classifications using a different model family or human review for high-stakes discrepancies. Log cases where the analyzer agrees with the original judge despite a reference mismatch.
Operational Risk: Ambiguous Rubrics
Risk: When the rubric itself is vague or contradictory, the prompt may attribute discrepancies to 'judge error' when the real cause is rubric ambiguity. This leads to unnecessary judge retuning and masks the need for rubric clarification. Guardrail: Track how often 'rubric ambiguity' is flagged as the root cause. If it exceeds 20% of discrepancies, prioritize rubric revision over judge recalibration.
Escalation Path: Unresolvable Cases
Risk: Some discrepancies cannot be resolved by the prompt alone—conflicting evidence, missing context, or genuine edge cases where reasonable raters disagree. Guardrail: Define a clear escalation threshold. When the prompt's confidence is low or multiple root causes are equally likely, flag the case for human review rather than forcing a classification. Track escalation rates as a metric for rubric and judge health.
Copy-Ready Prompt Template
A copy-ready prompt for diagnosing why an LLM judge's score diverged from an expected or reference score, producing a structured root cause analysis with evidence extraction.
This template is designed to be pasted directly into your evaluation debugging harness. It forces the model to act as a diagnostic analyst rather than a judge, focusing on explaining the gap between two scores rather than re-evaluating the output. Replace every square-bracket placeholder with the specific instance you are investigating. The prompt is structured to extract concrete evidence from the judge's own justification and the input context, preventing the common failure mode where the analysis itself becomes a new, equally opaque judgment.
textYou are a diagnostic analyst investigating a scoring discrepancy. Your job is to explain why an LLM judge's score differs from an expected score, not to re-score the output. You must ground every finding in specific evidence from the provided materials. ## INPUTS - **Original Prompt:** [ORIGINAL_PROMPT] - **Model Output Under Evaluation:** [MODEL_OUTPUT] - **Evaluation Rubric:** [RUBRIC] - **LLM Judge Score:** [JUDGE_SCORE] - **LLM Judge Justification:** [JUDGE_JUSTIFICATION] - **Expected Score:** [EXPECTED_SCORE] - **Expected Score Rationale (optional):** [EXPECTED_RATIONALE] - **Input Metadata (optional):** [INPUT_METADATA] ## OUTPUT SCHEMA Produce a JSON object with the following structure: { "discrepancy_summary": { "judge_score": number, "expected_score": number, "absolute_difference": number, "direction": "judge_higher" | "judge_lower" | "match", "significant": boolean }, "root_cause_categories": [ { "category": "judge_error" | "rubric_ambiguity" | "input_edge_case" | "reference_label_noise" | "other", "confidence": "high" | "medium" | "low", "evidence": ["string of specific evidence from judge justification or input context"], "explanation": "Clear reasoning linking evidence to this category." } ], "evidence_analysis": { "judge_justification_key_claims": ["extracted claims the judge made"], "claims_contradicting_rubric": ["claims that appear to misapply the rubric"], "claims_contradicting_expected_rationale": ["claims that conflict with expected reasoning"], "input_factors_judge_may_have_missed": ["context elements the judge overlooked"] }, "rubric_ambiguity_analysis": { "ambiguous_criteria": ["rubric dimensions open to interpretation"], "suggested_clarifications": ["concrete wording changes to reduce ambiguity"] }, "recommended_action": { "primary_action": "fix_judge_instructions" | "clarify_rubric" | "add_edge_case_example" | "review_reference_label" | "investigate_further" | "no_action", "rationale": "Why this action addresses the most likely root cause.", "urgency": "critical" | "high" | "medium" | "low" } } ## CONSTRAINTS - Do NOT produce a new score for the model output. - Every root cause category MUST cite specific evidence from the judge justification or input context. - If the judge justification is missing or empty, flag this as a judge_error with high confidence. - Treat the expected score as ground truth for this analysis; do not question it unless you have direct evidence of label noise. - If multiple root causes are present, list them in order of likely contribution to the discrepancy. - If the scores match (difference of 0), set significant to false and explain why no analysis is needed.
To adapt this template, start by populating the required fields from your evaluation logs. The [JUDGE_JUSTIFICATION] field is critical—without it, the analysis defaults to flagging a judge error. If you have multiple judges or a human rationale for the expected score, include those in [EXPECTED_RATIONALE] to enable richer contradiction analysis. For production pipelines, wrap this prompt in a validation layer that checks the output JSON schema before accepting the analysis. If the model returns a recommended_action.urgency of critical or high, route the case for human review before applying any automated fixes to your judge instructions or rubric. Avoid using this prompt on cases where the score difference is trivially small unless you are specifically investigating cumulative drift across many low-difference cases.
Prompt Variables
Required inputs for the Score Discrepancy Root Cause Analysis Prompt. Each placeholder must be populated before the prompt is assembled. Missing or malformed inputs are the most common cause of false-negative root cause classifications.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[JUDGE_OUTPUT] | The raw LLM judge response containing the score, justification, and any structured fields the judge produced. | {"score": 2, "justification": "The response partially addressed the constraint but missed the formatting requirement.", "dimension_scores": {"accuracy": 3, "completeness": 1}} | Must be valid JSON if judge outputs structured data. Parse check required. If justification field is missing or empty, flag as insufficient evidence for root cause analysis. |
[EXPECTED_SCORE] | The reference score or score range the judge output is being compared against. May come from human annotation, a golden dataset, or a prior judge version. | 4 or {"min": 3, "max": 5} | Must be numeric or a valid range object with min and max fields. Null allowed only when performing exploratory discrepancy detection without a known reference. Type check required before comparison. |
[RUBRIC_DEFINITION] | The full scoring rubric the judge was instructed to use, including scale definitions, dimension descriptions, and scoring criteria per level. | "Score 1: Response is completely off-topic. Score 2: Response addresses topic but contains factual errors. Score 3: Response is factually correct but misses key constraints. Score 4: Response meets all constraints with minor style issues. Score 5: Response exceeds expectations with no errors." | Must be non-empty string. If rubric is versioned, include version identifier. Incomplete rubrics cause false attribution to judge error when the real cause is rubric ambiguity. Length check: minimum 50 characters. |
[INPUT_CONTEXT] | The original input, prompt, or task that was evaluated. Includes user query, system instructions, retrieved context, and any constraints the model was expected to follow. | "System: You are a helpful assistant. User: Summarize the following article in 3 bullet points. Article: [text]" | Must be non-empty string. If the evaluation target was a multi-turn conversation, include all turns with speaker labels. Truncated context is a known failure mode that produces false edge-case classifications. |
[MODEL_OUTPUT] | The actual output produced by the model under evaluation. This is what the judge scored. | "• The article discusses climate policy changes. • It highlights three major regulatory shifts. • The author argues for faster implementation." | Must be non-empty string. If the model output was empty or the model refused to answer, provide the exact refusal text. Empty outputs should be classified as input edge cases, not judge errors. |
[JUDGE_IDENTIFIER] | A label identifying which judge produced the score. Used to track per-judge error patterns and severity tendencies across multiple discrepancy analyses. | "judge-gpt4-v3" or "human-annotator-pool-a" | Must be non-empty string. Consistent naming across analyses enables judge-level drift detection. If comparing two judges, provide both identifiers and designate which produced [JUDGE_OUTPUT]. |
[DISCREPANCY_THRESHOLD] | The minimum score difference that triggers a discrepancy classification. Differences below this threshold are considered within acceptable variance and not analyzed. | 1.5 or {"absolute": 1, "relative": 0.2} | Must be a positive number or a threshold object. If set too low, noise dominates the analysis. If set too high, systematic small drifts are missed. Recommended default: absolute difference of 1 or greater on a 5-point scale. |
[ANALYSIS_DEPTH] | Controls whether the prompt produces a quick classification or a detailed evidence-backed analysis with extracted justification quotes and alternative score estimates. | "detailed" or "quick" | Must be one of enum: ["quick", "detailed"]. Quick mode returns category only. Detailed mode returns evidence extraction, alternative score estimate, and rubric clause citations. Use detailed mode for calibration workflows; quick mode for triage. |
Implementation Harness Notes
How to wire the Score Discrepancy Root Cause Analysis Prompt into an evaluation pipeline with validation, retries, and human review gates.
This prompt is designed to sit inside an evaluation debugging loop, not as a standalone chat interaction. When an LLM judge produces a score that diverges from an expected value—whether that expected value comes from a human annotator, a golden dataset, or a peer judge—this prompt receives the judge's output, justification, input context, and the expected score, then returns a structured root cause classification. The typical integration point is a post-scoring hook in your evaluation pipeline: after scores are collected, any discrepancy exceeding a configured threshold triggers this analysis prompt before the result is written to your evaluation store or surfaced to an analyst.
Wire the prompt into your application with a discrepancy detection gate first. Compare the judge's score against the reference score using a tolerance window (e.g., absolute difference > 1 on a 5-point scale, or categorical mismatch for pass/fail). Only invoke this prompt when a discrepancy is detected—running it on aligned scores wastes tokens and adds noise. Pass the full judge response object, the input that was scored, the reference score and its source (human label, golden answer, peer judge), and any rubric or scoring guidelines that were in effect. The prompt returns a JSON object with root_cause_category (one of judge_error, rubric_ambiguity, input_edge_case, reference_label_noise, or multi_factor), a confidence score, extracted evidence from the judge's justification, and a brief diagnostic narrative. Parse this JSON in your application code—do not treat the output as display text.
Validation and retry logic is critical because this prompt itself can fail. Validate that the returned JSON contains a recognized root_cause_category enum value. If the category is missing, malformed, or the confidence is below your threshold (we recommend 0.7 as a starting floor), retry once with the same inputs. If the second attempt also fails validation, escalate to a human review queue with the raw judge output and discrepancy details attached. Log every invocation—input hash, judge ID, discrepancy magnitude, root cause category, confidence, and whether human review was required—so you can track whether the root cause analyzer itself drifts over time or shows systematic blind spots.
Model choice matters. This prompt requires careful reasoning over multiple hypotheses, so prefer models with strong instruction-following and structured output capabilities. Claude 3.5 Sonnet, GPT-4o, and Gemini 1.5 Pro are all suitable. Avoid smaller or faster models (Claude Haiku, GPT-4o-mini, Gemini Flash) for this task unless you've validated their root cause accuracy against a labeled discrepancy dataset—they tend to default to rubric_ambiguity without sufficient evidence extraction. If latency is a concern, run this prompt asynchronously after scores are collected rather than blocking the scoring pipeline. The output should be written to your evaluation database alongside the original score for later aggregation and trend analysis.
When to escalate instead of trusting the prompt: if the discrepancy magnitude is extreme (e.g., judge scored 1, reference is 5), if the input contains sensitive or regulated content, or if the root cause analysis will trigger an automated action like judge instruction rewrites or calibration set changes, require human review of the analysis before acting on it. This prompt is a diagnostic aid, not an automated remediation system. Use its output to prioritize which judges, rubrics, or input types need human attention—don't close the loop automatically without verifying that the diagnosis is correct across a sample of cases.
Expected Output Contract
Defines the structured fields, types, and validation rules for the root cause analysis output. Use this contract to parse, validate, and store the analysis before routing to downstream debugging or reporting systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
analysis_id | string (UUID v4) | Must match regex pattern for UUID v4. Generate if not provided. | |
discrepancy_summary | object | Must contain | |
root_cause_category | enum string | Must be one of: | |
confidence_level | number (0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. Values below 0.6 should trigger a human review flag. | |
evidence_excerpts | array of strings | Each string must be a verbatim quote from the judge justification or input context. Array must contain at least 1 item. Empty array is invalid. | |
alternative_hypotheses | array of objects | If present, each object must contain | |
recommended_action | enum string | Must be one of: | |
human_review_required | boolean | Must be |
Common Failure Modes
When LLM judge scores diverge from expected values, the root cause is rarely obvious. These failure modes break automated evaluation pipelines and erode trust in judge outputs. Each card identifies a specific failure pattern and the guardrail that catches it before it poisons your metrics.
Judge Blames the Rubric Instead of the Output
What to watch: The judge justification cites rubric ambiguity as the reason for a score discrepancy, masking whether the output was actually wrong. This shifts accountability from output quality to instruction clarity and prevents actionable fixes. Guardrail: Require the root cause analysis prompt to separate 'rubric ambiguity' from 'output error' as distinct categories. If the judge cannot decide, flag for human review and rubric revision rather than accepting an ambiguous score.
Reference Labels Contain Systematic Noise
What to watch: Human-annotated reference scores carry rater fatigue, inconsistent standards, or outdated expectations. The judge appears to drift when the reference labels were never stable. Guardrail: Run inter-rater reliability checks on reference labels before diagnosing judge error. The prompt should extract evidence of label noise by comparing multiple human annotations on the same examples and flagging low-agreement cases as 'reference noise' rather than 'judge error.'
Edge Cases Trigger Confident but Wrong Scores
What to watch: Inputs at distribution boundaries—unusual formats, rare languages, domain-specific jargon—produce high-confidence scores that are completely wrong. The judge doesn't recognize its own ignorance. Guardrail: The root cause analysis prompt must extract the judge's confidence signals and cross-reference them with input complexity markers. When confidence is high but the input is an outlier, classify as 'input edge case' and route for human calibration rather than trusting the score.
Justification Doesn't Match the Score
What to watch: The judge provides a plausible-sounding justification that contradicts the numeric score it assigned. Reviewers trust the text and miss the scoring error. Guardrail: The analysis prompt must extract both the score and the justification, then check for internal consistency. Flag cases where the justification describes a different severity level than the score implies. This mismatch is a strong signal of judge error requiring instruction revision.
Score Discrepancy Attributed to Wrong Category
What to watch: Teams misclassify judge calibration drift as a one-off error, or treat a reference label mistake as judge failure. Wrong diagnosis leads to wrong fixes—retuning a judge when the rubric is broken, or rewriting the rubric when the judge instructions are stale. Guardrail: The root cause analysis prompt must force mutually exclusive categorization with evidence requirements per category. Require at least two pieces of evidence before assigning a root cause label, and default to 'needs human investigation' when evidence is thin.
Context Truncation Silently Drops Evidence
What to watch: Long inputs or multi-turn conversations exceed context windows, and the judge scores based on partial information without indicating anything was missing. Scores look plausible but are based on incomplete evidence. Guardrail: The analysis prompt should check whether the judge's justification references all required input sections. If key context is absent from the justification, flag as 'incomplete context' and recommend either context window expansion or input summarization before scoring.
Evaluation Rubric
Use this rubric to test whether the root cause analysis output is correct, complete, and actionable before integrating the prompt into a debugging pipeline.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Root cause category assignment | Output selects exactly one category from the allowed set: judge_error, rubric_ambiguity, input_edge_case, or reference_label_noise | Missing category, multiple categories without a primary designation, or category not in the allowed set | Schema validation: parse output, extract category field, check membership in allowed enum |
Evidence extraction from judge justification | Output includes at least one direct quote or paraphrase from the judge's justification that supports the root cause claim | Evidence field is empty, contains generic statements not traceable to the justification, or fabricates quotes not present in the input | Manual spot-check on 10 cases: compare extracted evidence against [JUDGE_JUSTIFICATION] input; automated substring match against justification text |
Discrepancy magnitude quantification | Output states whether the score gap is minor (1 point), moderate (2 points), or severe (3+ points) on the scoring scale used | Magnitude missing, inconsistent with the actual score difference between [JUDGE_SCORE] and [EXPECTED_SCORE], or uses undefined scale | Parse [JUDGE_SCORE] and [EXPECTED_SCORE], compute absolute difference, verify magnitude label matches threshold rules |
Input context reference | Output references at least one specific feature of [INPUT_TEXT] that contributed to the discrepancy (e.g., length, ambiguity, domain terminology) | Context reference is absent, vague ("the input was confusing"), or hallucinates features not present in [INPUT_TEXT] | Manual review: compare context reference against [INPUT_TEXT]; automated check for non-empty context_reference field |
Rubric ambiguity detection quality | When category is rubric_ambiguity, output identifies the specific rubric criterion or phrase that is ambiguous and explains how it could be interpreted differently | Rubric ambiguity claimed but no specific criterion cited, or explanation is circular ("the rubric was unclear because the score was wrong") | For rubric_ambiguity cases: verify criterion reference exists in [RUBRIC_TEXT]; check that explanation describes at least two plausible interpretations |
Actionable recommendation presence | Output includes at least one concrete recommendation tied to the root cause (e.g., rewrite rubric criterion X, add few-shot example for edge case Y, re-label reference Z) | Recommendation is missing, generic ("improve the prompt"), or not logically connected to the identified root cause | Manual review: verify recommendation field is non-empty and references specific elements from the analysis; automated non-empty check |
Confidence calibration | Output includes a confidence indicator (high/medium/low) that correlates with evidence strength and discrepancy clarity | Confidence always high regardless of evidence quality, or confidence indicator missing entirely | Compare confidence level against evidence count and discrepancy magnitude across 20 test cases; flag cases where high confidence pairs with thin evidence |
No hallucinated input features | Output does not invent input characteristics, judge behaviors, or rubric details not present in the provided [INPUT_TEXT], [JUDGE_JUSTIFICATION], or [RUBRIC_TEXT] | Output claims the input contained a specific term, format, or feature that is absent from [INPUT_TEXT]; attributes reasoning to judge statements not in [JUDGE_JUSTIFICATION] | Automated: extract all claims about input/judge/rubric, verify each claim against source fields; manual audit on flagged cases |
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 set of known discrepancies. Use manual review of the output to validate the root cause categories before adding automation. Keep the output format flexible—accept plain text or loosely structured markdown while you iterate on the taxonomy.
Simplify the evidence extraction step: ask the model to quote the most relevant sentence from the judge justification and the input context rather than requiring structured evidence blocks.
Prompt snippet
codeAnalyze why the LLM judge score of [JUDGE_SCORE] differs from the expected score of [EXPECTED_SCORE]. Judge Justification: [JUDGE_JUSTIFICATION] Input Context: [INPUT_CONTEXT] Classify the root cause as one of: judge error, rubric ambiguity, input edge case, or reference label noise. Provide one sentence of evidence.
Watch for
- The model defaulting to 'rubric ambiguity' when evidence is thin
- Overly broad categories that don't help debugging
- Missing the interaction between multiple root causes

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