Inferensys

Prompt

Judge Instruction Rewriting Prompt After Misalignment Detection

A practical prompt playbook for evaluation engineers who need to repair LLM judges that have drifted from human scoring standards. Produces revised judge instructions targeting specific misalignment patterns with before/after comparison and regression risk assessment.
Risk analyst performing AI risk assessment on laptop, risk matrices visible, casual office risk session.
PROMPT PLAYBOOK

When to Use This Prompt

Targeted repair of LLM judge instructions after concrete misalignment with human raters is detected.

This prompt is a surgical repair tool for evaluation engineers and MLOps teams who have already detected that an LLM judge is scoring outputs differently from human raters. It is not a starting point for designing a new judge, nor is it a general-purpose prompt improvement tool. You should reach for this prompt only when you have specific, diagnosed misalignment evidence in hand: a set of test cases where the judge's score diverged from the human reference score, a clear articulation of the misalignment pattern (e.g., 'judge overpenalizes short responses on the completeness dimension'), and the current judge instructions that produced the bad scores. Without these three inputs, the prompt cannot produce a targeted fix and risks introducing new failure modes.

The ideal user is an evaluation pipeline owner who has already run a calibration exercise, identified systematic scoring gaps, and needs to rewrite judge instructions without breaking correct behavior on cases the judge already handles well. For example, if your judge consistently scores factual answers as 4/5 when human raters give 5/5 because the judge misinterprets cautious language as uncertainty, this prompt will produce revised instructions that clarify the distinction between appropriate hedging and actual uncertainty. It will also generate a before/after comparison table and a regression risk assessment so you can review the proposed changes before deploying them. Do not use this prompt when you lack specific misalignment examples, when the judge has never been calibrated against human ratings, or when you are building a judge from scratch—those scenarios require the calibration set construction and initial judge design prompts elsewhere in this pillar.

Before running this prompt, assemble your evidence package: the misaligned test cases with both judge scores and human reference scores, a written diagnosis of the pattern you believe is causing the gap, and the exact judge instructions currently in production. The prompt will produce revised instructions that target only the diagnosed pattern while preserving the judge's existing behavior on aligned cases. After receiving the output, review the regression risk assessment carefully—any instruction change can shift scores on previously stable cases. Run the revised instructions against your full calibration set and compare score distributions before promoting to production. If the misalignment pattern is severe or spans multiple dimensions, consider running the root cause analysis prompt first to ensure you are treating the cause, not a symptom.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it fails, and what you must have in place before running it.

01

Good Fit: Post-Drift Judge Repair

Use when: An LLM judge's scores have measurably drifted from a human-annotated calibration set, and you have identified specific misalignment patterns (e.g., systematic leniency on short answers). Guardrail: Run this only after a drift detection prompt has confirmed the issue; never use it to 'improve' a judge that is already aligned.

02

Bad Fit: Initial Judge Design

Avoid when: You are writing a judge prompt from scratch without an existing calibration baseline. This prompt rewrites existing instructions—it cannot invent a scoring rubric. Guardrail: Use a rubric design prompt first, calibrate against human ratings, then return here only if misalignment is detected.

03

Required Input: Misalignment Evidence

Risk: Rewriting without concrete evidence of what went wrong produces random instruction changes that may break previously working dimensions. Guardrail: You must supply specific misalignment patterns, affected score ranges, and example test cases that triggered the failure. Vague complaints ('scores feel off') are insufficient.

04

Operational Risk: Regression on Previously Passing Cases

Risk: Fixing one misalignment pattern can silently break scoring accuracy on dimensions or examples that were previously correct. Guardrail: Always run the revised judge against a full golden dataset, not just the failure cases. Require a regression gate that checks all dimensions before accepting the rewrite.

05

Bad Fit: Multi-Judge Fleet Without Per-Judge Analysis

Avoid when: You have a fleet of judges with different severity profiles and haven't isolated which specific judge instructions need rewriting. Guardrail: Run a judge severity analysis prompt first to attribute misalignment to individual judges, then rewrite only the problematic instructions.

06

Required Input: Human-Annotated Calibration Set

Risk: Rewriting judge instructions without a ground-truth reference set produces instructions that sound better but aren't actually more accurate. Guardrail: You must have a stratified calibration set with human-verified labels spanning difficulty tiers and score boundaries. The rewrite prompt uses this to validate that changes improve alignment, not just change behavior.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt for rewriting judge instructions after detecting misalignment with human standards.

This prompt template is designed to be pasted directly into your LLM interface. It takes the original judge instructions, a set of test cases where the judge's scoring drifted from human ratings, and a description of the misalignment pattern, and produces revised instructions that target the specific failure modes. The output includes a before-and-after comparison, a regression risk assessment, and the test cases that previously triggered the misalignment so you can immediately validate the fix.

code
You are an evaluation engineer fixing an LLM judge that has drifted from human scoring standards.

## ORIGINAL JUDGE INSTRUCTIONS
[ORIGINAL_INSTRUCTIONS]

## MISALIGNMENT DATA
[MISALIGNMENT_DESCRIPTION]

## FAILING TEST CASES
These are examples where the judge's scores diverged from human raters. Each case includes the input, the judge's score and reasoning, and the human reference score and reasoning.

[TEST_CASES]

## CONSTRAINTS
- Preserve the original evaluation dimensions and scoring scale unless the misalignment requires structural changes.
- Do not overfit to the failing test cases; the revised instructions must generalize.
- Add explicit guidance that addresses the root cause of the misalignment pattern.
- If the misalignment stems from rubric ambiguity, add clarifying examples and boundary definitions.
- If the misalignment stems from judge severity or leniency, add calibration anchors.

## OUTPUT SCHEMA
Return a JSON object with these fields:
{
  "revised_instructions": "The complete revised judge prompt, ready to deploy.",
  "changes_summary": [
    {
      "change": "Description of what was changed.",
      "rationale": "Why this change addresses the misalignment.",
      "affected_test_cases": ["test_case_id_1", "test_case_id_2"]
    }
  ],
  "regression_risk_assessment": {
    "risk_level": "low | medium | high",
    "risk_description": "What could break with the new instructions.",
    "mitigation_steps": ["Step 1", "Step 2"]
  },
  "validation_plan": {
    "immediate_checks": ["Check 1", "Check 2"],
    "backtest_on_failing_cases": true,
    "backtest_on_held_out_cases": true,
    "recommended_sample_size": 100
  }
}

## INSTRUCTIONS
1. Analyze the misalignment pattern across the failing test cases.
2. Identify the root cause: rubric ambiguity, severity drift, context misinterpretation, or other.
3. Rewrite the judge instructions to correct the root cause while preserving the original evaluation intent.
4. Produce the output in the exact JSON schema specified.

To adapt this template, replace [ORIGINAL_INSTRUCTIONS] with the full text of the judge prompt that is producing misaligned scores. For [MISALIGNMENT_DESCRIPTION], provide a clear summary of the drift pattern—for example, "Judge is scoring factual accuracy 0.5–1.0 points lower than human raters on technical answers longer than 500 words." The [TEST_CASES] placeholder should contain a structured list of at least 5–10 examples, each with a unique ID, the input that was scored, the judge's score and reasoning, and the human reference score and reasoning. More test cases produce better root cause analysis.

Before deploying the revised instructions, run the validation plan produced by this prompt. Backtest on the failing cases to confirm the fix, then backtest on a held-out set of previously passing cases to check for regressions. If the regression risk is medium or high, run a larger backtest before shipping. For high-risk evaluation pipelines where judge scores gate production deployments, always require human review of the revised instructions and the backtest results before cutting over.

IMPLEMENTATION TABLE

Prompt Variables

Each placeholder the Judge Instruction Rewriting Prompt needs to produce a revised judge prompt targeting a specific misalignment pattern. Validate each variable before execution to prevent the rewriter from hallucinating fixes or ignoring the original misalignment evidence.

PlaceholderPurposeExampleValidation Notes

[CURRENT_JUDGE_INSTRUCTIONS]

The full system prompt or instruction set of the LLM judge that exhibited the misalignment

You are an expert evaluator. Score the assistant's response on helpfulness from 1-5 using the following rubric...

Must be a non-empty string. Validate that it contains a scoring rubric, output format, or evaluation criteria. Reject if it is a generic system prompt with no evaluation logic.

[MISALIGNMENT_DESCRIPTION]

A structured description of how the judge's scores diverged from human ratings

Judge systematically overscores verbose but inaccurate responses by 1.5 points on average compared to human raters. Discrepancy is most severe in the 'accuracy' dimension.

Must be a non-empty string. Should reference a specific dimension, direction of bias, and magnitude if known. Reject if it only says 'judge is wrong' without a pattern.

[REPRESENTATIVE_FAILURE_CASES]

A set of input-output-score tuples where the judge's rating disagreed with the human gold label

[{"input": "...", "output": "...", "judge_score": 4, "human_score": 2, "judge_rationale": "..."}]

Must be a valid JSON array with at least 3 objects. Each object must contain input, output, judge_score, and human_score fields. Validate that judge_score and human_score differ by more than a trivial margin.

[EVALUATION_DIMENSION]

The specific scoring dimension or criterion where misalignment was detected

accuracy

Must be a non-empty string matching a dimension name present in [CURRENT_JUDGE_INSTRUCTIONS]. Reject if the dimension does not appear in the current instructions or if it is 'overall' without a defined sub-criterion.

[HUMAN_RATING_GUIDELINES]

The instructions or rubric used by human raters that the judge should align with

Score accuracy based on factual correctness against the provided source document. A response with any unsupported claim cannot score above 2.

Must be a non-empty string. Should contain explicit scoring rules or boundary definitions. Reject if it is identical to [CURRENT_JUDGE_INSTRUCTIONS] with no human-specific guidance.

[REGRESSION_TEST_CASES]

A set of previously passing cases that the rewritten judge must still score correctly

[{"input": "...", "output": "...", "expected_score": 5, "expected_rationale_keywords": ["concise", "accurate"]}]

Must be a valid JSON array with at least 5 objects. Each object must contain input, output, and expected_score. Validate that expected_score falls within the rubric range defined in [CURRENT_JUDGE_INSTRUCTIONS].

[CONSTRAINTS]

Rules the rewritten instructions must follow, such as preserving output format or not changing the score range

Preserve the original 1-5 scale. Do not change the JSON output schema. The rewritten prompt must be self-contained with no external references.

Must be a non-empty string or array of strings. Validate that constraints do not contradict each other. Reject if a constraint demands a change that the misalignment description proves is necessary.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the judge instruction rewriting prompt into an evaluation repair workflow with validation, versioning, and deployment gates.

This prompt is not a one-shot fix. It is a repair step inside a larger calibration pipeline. The typical trigger is a drift alert from your monitoring system: an LLM judge's scores have diverged from a human-annotated gold set or from peer judges beyond an acceptable threshold. The misalignment detection step produces a structured report identifying specific scoring dimensions, example clusters, and failure patterns. That report becomes the primary input to this rewriting prompt. The output is a revised judge instruction set that must pass regression tests, human review, and a staged rollout before replacing the production judge. Do not auto-apply rewritten instructions without gates.

Build the harness as a versioned artifact pipeline. Store each judge instruction set with a semantic version (e.g., judge-v2.3.1), the calibration window it was trained against, and the misalignment report that triggered the rewrite. The rewriting step should produce a diff against the previous version, not just a new prompt. Run the candidate instructions through a regression suite containing: (a) the original calibration set to verify baseline performance is preserved, (b) the specific test cases that triggered the misalignment to confirm improvement, and (c) a held-out adversarial set probing known failure modes. Log per-dimension scores, agreement coefficients, and confidence intervals. If any dimension regresses by more than a configured tolerance (e.g., 0.05 drop in Cohen's kappa), block promotion and flag for human review.

Validation must include both automated checks and human sign-off. Automated checks: schema conformance (the output must contain a complete judge prompt with scoring rubric, examples, and edge-case guidance), keyword safety (no accidental instruction leakage like 'ignore previous instructions'), and format stability (the prompt structure must match the expected template so downstream parsing doesn't break). Human review: an evaluation engineer must inspect the diff, verify that the rewritten instructions address the reported misalignment without introducing new biases, and approve the change. For high-stakes domains like healthcare or legal evaluation, require a second reviewer and document the approval in an audit log. Never deploy a rewritten judge without a rollback plan—keep the previous version hot and monitor score distributions for 48 hours post-deployment.

Model choice matters for this workflow. The rewriting prompt benefits from strong instruction-following and reasoning capabilities. Use a frontier model (e.g., GPT-4, Claude 3.5 Sonnet) for the rewrite step itself, even if your production judge runs on a smaller model. The rewrite requires understanding nuanced scoring failures and producing precise, unambiguous instructions. Run the candidate instructions through your actual production judge model during regression testing—a prompt that works perfectly on a frontier model may produce different behavior on the lighter model you deploy. If the production judge model cannot reliably execute the rewritten instructions, you may need to simplify the rubric or accept a performance ceiling.

Wire observability into every step. Log the misalignment report, the candidate rewritten prompt, regression test results, human review decisions, and deployment timestamps. This audit trail is essential for debugging future drift events and demonstrating evaluation governance to compliance teams. Set up automated alerts if a newly deployed judge's score distribution shifts significantly from the baseline (e.g., mean score change > 0.3 on a 1-5 scale, or pass rate change > 10%). These alerts catch deployment issues that regression tests missed. Finally, schedule periodic recalibration—even a well-aligned judge drifts as your product, user behavior, and content distribution evolve. Run the full detect-rewrite-validate-deploy cycle on a regular cadence (monthly for stable domains, weekly for fast-moving products) rather than waiting for a crisis.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the structured response produced by the Judge Instruction Rewriting Prompt After Misalignment Detection.

Field or ElementType or FormatRequiredValidation Rule

rewritten_judge_instructions

string

Must differ from original_judge_instructions by at least one substantive change. Parse check: non-empty string.

misalignment_pattern_addressed

array of strings

Each entry must match a pattern listed in the input [MISALIGNMENT_DIAGNOSIS]. Schema check: array of non-empty strings.

change_log

array of objects

Each object must contain 'change_type' (enum: added, removed, modified, reordered), 'original_text', 'revised_text', and 'rationale'. Schema check: required fields present.

regression_risk_assessment

object

Must contain 'risk_level' (enum: low, medium, high), 'affected_dimensions' (array of strings), and 'mitigation_notes' (string). Schema check: required fields present and enum valid.

test_cases_previously_failed

array of objects

Each object must contain 'input', 'previous_score', 'expected_new_score', and 'rationale'. Schema check: required fields present. Previous score must be numeric.

before_after_comparison_summary

string

Must summarize the key differences between original and rewritten instructions. Parse check: non-empty string with minimum 50 characters.

confidence_self_assessment

object

If present, must contain 'confidence_score' (number 0-1) and 'uncertainty_notes' (string). Schema check: confidence_score within range.

human_review_required

boolean

Must be true if regression_risk_assessment.risk_level is high or if any test case expected_new_score is worse than previous_score. Approval check: flag for review queue.

PRACTICAL GUARDRAILS

Common Failure Modes

When rewriting judge instructions after misalignment detection, these failures surface first. Each card explains what breaks, why it happens, and how to prevent it before the revised judge ships.

01

Overcorrection on the Calibration Set

What to watch: The rewritten instructions fix the specific misalignment examples but break previously correct judgments. The judge becomes tuned to the calibration set rather than the general evaluation task. Guardrail: Always run the revised judge against a held-out regression set of previously passing cases. Require zero regressions on high-confidence examples before accepting the rewrite.

02

Instruction Bloat and Judge Confusion

What to watch: Adding patches for each detected misalignment pattern produces long, contradictory instructions. The judge starts ignoring sections or applying rules inconsistently across dimensions. Guardrail: After rewriting, run a self-consistency check by asking the judge to explain its scoring policy in its own words. Flag contradictions between the stated policy and the written instructions.

03

Severity Shift Across Score Boundaries

What to watch: The rewrite shifts the judge's severity profile—harsher on some dimensions, more lenient on others—without the team noticing until production scores drift. Guardrail: Compare the score distribution of the rewritten judge against the baseline on a fixed evaluation batch. Flag any dimension where the mean score shifts by more than the acceptable tolerance defined in the calibration window.

04

Misalignment Root Cause Left Unaddressed

What to watch: The rewrite treats symptoms (wrong scores) without fixing the underlying cause—rubric ambiguity, missing edge-case definitions, or conflicting scoring criteria. The same misalignment returns within weeks. Guardrail: Before rewriting, run a root cause analysis prompt that categorizes the discrepancy as judge error, rubric ambiguity, or reference label noise. Only rewrite instructions when the cause is confirmed as judge error.

05

Test Case Leakage into Instructions

What to watch: The rewritten instructions inadvertently reference specific test cases, examples, or patterns from the calibration set. The judge memorizes answers rather than learning the evaluation principle. Guardrail: After drafting the rewrite, scan for any language that matches calibration examples too closely. Use a separate held-out set with different surface patterns to verify generalization.

06

Regression on Previously Aligned Dimensions

What to watch: Fixing misalignment on one evaluation dimension silently degrades performance on other dimensions that were previously well-calibrated. The overall judge quality drops even though the targeted dimension improves. Guardrail: Run the rewritten judge through the full multi-dimension evaluation suite. Require that no dimension falls below its minimum alignment threshold, not just the dimension being fixed.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing whether the revised judge instructions correct the detected misalignment before shipping. Run these checks against the test cases that previously triggered the misalignment.

CriterionPass StandardFailure SignalTest Method

Misalignment Pattern Resolution

All previously misaligned test cases now score within 0.5 points of human reference on the target scale

Any previously misaligned case still deviates by more than 0.5 points from human reference

Run full misalignment test suite; compare score deltas pre-rewrite vs post-rewrite

Non-Regression on Aligned Cases

Zero previously aligned test cases shift by more than 0.3 points from their original human-aligned score

Any previously aligned case score changes by more than 0.3 points after rewrite

Run aligned-case regression suite; flag any score shift exceeding threshold

Rubric Dimension Coverage

Every dimension in the evaluation rubric has at least 2 test cases exercising it at distinct score levels

Any rubric dimension lacks test coverage or only has cases at a single score level

Cross-reference test case metadata against rubric dimension list; count score-level diversity per dimension

Instruction Clarity and Specificity

Revised instructions contain concrete decision rules for the target misalignment pattern, not vague guidance

Instructions use phrases like 'consider context' or 'use judgment' without specific criteria for the misaligned dimension

Manual review of instruction diff; keyword check for vague directives in changed sections

Justification Quality

Judge justifications for corrected cases explicitly reference the revised instruction criteria

Justifications repeat generic language or fail to mention the specific dimension that was previously misaligned

Sample 10 corrected-case justifications; check for presence of revised-criterion keywords

Edge Case Handling

Boundary cases at score thresholds are resolved consistently with human reference direction, even if exact score differs by 0.5

Boundary cases flip to the opposite side of the pass/fail threshold compared to human reference

Run boundary test subset; check threshold-side agreement rather than exact score match

Overcorrection Detection

No dimension shows a systematic score shift greater than 0.4 points in the opposite direction from the original misalignment

Mean score for the corrected dimension shifts by more than 0.4 points past the human reference mean

Calculate per-dimension mean score delta across full test suite; flag overcorrection if delta exceeds threshold

Instruction Length and Complexity Budget

Revised instructions add no more than 30% token count to the original prompt and introduce no new ambiguous terms

Token count increase exceeds 30% or new instructions contain undefined domain jargon

Token count comparison pre-rewrite vs post-rewrite; manual jargon audit on added text

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of 5-10 known misalignment cases. Use the prompt to generate revised judge instructions, then manually review the output. Skip formal schema validation and focus on whether the rewritten instructions address the misalignment pattern described in the input.

Strip the output to the core fields: revised_instructions, changes_summary, and before_after_comparison. Drop the regression risk assessment and test case validation sections until you confirm the rewrite logic works.

Watch for

  • The model producing vague rewrites that don't target the specific misalignment pattern
  • Over-correction that breaks previously working evaluation dimensions
  • Missing the misalignment_pattern field in the input and producing generic improvements instead of targeted fixes
  • Rewrites that add complexity without addressing the root cause described in the drift analysis
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.