Inferensys

Prompt

Judge Prompt Sensitivity Analysis Template

A practical prompt playbook for using Judge Prompt Sensitivity Analysis Template in production AI workflows.
Operations team reviewing AI workflow automation on laptop, workflow builder visible, casual office setup.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, reader, and constraints for the Judge Prompt Sensitivity Analysis Template.

This prompt is for prompt engineers and evaluation platform teams who need to understand how small changes in judge instructions affect scoring behavior. The job-to-be-done is rigorous: you have a baseline judge prompt that produces scores, and you need to test multiple instruction variants to see which phrasing is fragile, which changes cause statistically significant score shifts, and which wording is most robust against irrelevant input variation. This is not a prompt for casual A/B testing or vibe checks—it is for teams shipping automated evaluation pipelines where score consistency is a product requirement.

Use this prompt when you are finalizing a judge prompt for production and need evidence that your instruction wording is stable. It is appropriate when you have a reference set of scored examples (human-verified or golden dataset) and a list of instruction variants to test—such as reworded criteria, different scale anchors, added constraints, or changed output formats. The prompt expects you to provide the baseline prompt, the variants, the test inputs, and the reference scores. It produces a sensitivity report with per-variant score distributions, statistical tests for significant shifts, and a fragility ranking that identifies which instruction phrases cause the most score variance.

Do not use this prompt when you are still designing the initial rubric or when you lack a stable reference dataset. It is not a substitute for calibration against human ratings—use the Judge Calibration prompt for that. It is also not designed for detecting score drift over time; use the Score Drift Detection prompt instead. This prompt assumes you already have a working judge and need to harden its instructions. If your variants include fundamentally different scoring dimensions rather than wording changes, you are testing rubric redesign, not sensitivity, and should use a rubric comparison workflow. Finally, this prompt requires statistical literacy from the reader—the output includes p-values, effect sizes, and confidence intervals that demand interpretation before acting on the results.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it breaks, and what you must provide before running it.

01

Good Fit: Pre-Release Judge Tuning

Use when: You are iterating on judge prompt wording before locking a scoring rubric. Why: The template systematically tests instruction variants against a fixed evaluation set, revealing which phrases cause score drift. Guardrail: Always run against a held-out calibration set with known human ratings to measure real alignment impact.

02

Bad Fit: Single-Prompt Debugging

Avoid when: You have one broken judge prompt and need a quick fix. Why: This template is designed for comparative analysis across multiple variants, not single-prompt diagnosis. Guardrail: Use a prompt debugging playbook for isolated failures; reserve sensitivity analysis for when you have at least three candidate instruction variants to test.

03

Required Inputs

You must provide: A baseline judge prompt, 2+ variant prompts with specific wording changes, a fixed evaluation dataset with reference scores, and the scoring rubric. Guardrail: Missing any of these turns the analysis into unstructured exploration. Validate that your evaluation dataset covers the full score range before starting.

04

Operational Risk: Statistical Overinterpretation

What to watch: Small evaluation sets produce noisy sensitivity signals. A 5% score shift on 20 examples may be random, not meaningful. Guardrail: Configure a minimum sample size threshold and require a statistical significance check before flagging any instruction phrase as fragile. Report confidence intervals alongside every sensitivity estimate.

05

Operational Risk: Overfitting to the Test Set

What to watch: Iterating judge instructions until sensitivity analysis shows stability can produce a judge that works only on your calibration data. Guardrail: Reserve a separate hold-out set for final validation. If sensitivity drops to zero across all variants, suspect overfitting rather than robustness.

06

Operational Risk: Ignoring Downstream Impact

What to watch: A statistically significant score shift may not matter for your product decision. A 0.3-point drift on a 10-point scale might be irrelevant if your pass/fail threshold is at 5.0. Guardrail: Map sensitivity findings to decision impact before acting. Flag only shifts that cross decision boundaries or change rank ordering.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template with square-bracket placeholders for running judge prompt sensitivity analysis across instruction variants.

This template is the core instruction set you will send to an LLM judge to perform sensitivity analysis on another judge prompt. It asks the model to systematically vary instruction phrasing, apply each variant to a held-out set of scored examples, measure score shifts, and identify fragile wording. The output is a structured sensitivity report, not a single score. Use this template when you are iterating on an evaluation prompt and need to know which phrases are load-bearing and which are cosmetic.

text
You are an evaluation engineer performing prompt sensitivity analysis on a judge prompt.

Your task is to test how variations in judge instructions affect scoring behavior and produce a sensitivity report.

## JUDGE PROMPT UNDER TEST
[JUDGE_PROMPT]

## SCORED EXAMPLES
[SCORED_EXAMPLES]

## INSTRUCTION PHRASES TO VARY
[PHRASES_TO_VARY]

## VARIATION STRATEGY
[VARIATION_STRATEGY]

## OUTPUT SCHEMA
Return a JSON object with this structure:
{
  "baseline_summary": {
    "mean_score": number,
    "score_distribution": { "score_value": count },
    "example_count": number
  },
  "variants": [
    {
      "variant_id": "string",
      "original_phrase": "string",
      "variant_phrase": "string",
      "variant_scores": [number],
      "mean_shift": number,
      "score_change_distribution": { "example_id": "old_score -> new_score" },
      "statistical_significance": {
        "test_used": "string",
        "p_value": number,
        "significant_at_0_05": boolean
      },
      "fragility_rating": "low" | "medium" | "high",
      "affected_dimensions": ["string"]
    }
  ],
  "fragile_phrases": [
    {
      "phrase": "string",
      "fragility_rating": "low" | "medium" | "high",
      "max_score_shift": number,
      "recommendation": "string"
    }
  ],
  "robustness_recommendations": [
    {
      "original_phrase": "string",
      "recommended_replacement": "string",
      "rationale": "string",
      "expected_stability_improvement": "low" | "medium" | "high"
    }
  ]
}

## CONSTRAINTS
- Apply each variant independently; do not combine phrase variations unless [VARIATION_STRATEGY] specifies combinatorial testing.
- Use the same set of [SCORED_EXAMPLES] for every variant.
- Report statistical significance using [SIGNIFICANCE_TEST] with a threshold of [SIGNIFICANCE_THRESHOLD].
- Flag any phrase as "high" fragility if the mean score shift exceeds [FRAGILITY_THRESHOLD] or if significance is below [SIGNIFICANCE_THRESHOLD].
- If a variant causes the judge to refuse, produce an error, or output an unparseable score, record the failure in variant_scores as null and set fragility_rating to "high".
- Do not invent examples or scores. Work only from the provided [SCORED_EXAMPLES].

## EVALUATION NOTES
- A phrase is "fragile" if small wording changes cause large, statistically significant score shifts.
- A phrase is "robust" if score distributions remain stable across reasonable paraphrases.
- Recommendations should prefer concrete replacement text over vague advice like "be clearer."

Adaptation guidance: Replace [JUDGE_PROMPT] with the full text of the evaluation prompt you are testing. [SCORED_EXAMPLES] should contain at least 20–50 examples with known scores, ideally from human raters or a stable baseline judge. [PHRASES_TO_VARY] is a list of specific instruction fragments you suspect may be brittle—such as severity adverbs, constraint wording, or rubric descriptors. [VARIATION_STRATEGY] controls whether you test single-phrase substitutions or combinatorial pairs; start with single-phrase for tractability. [SIGNIFICANCE_TEST] should be set to a method like "paired t-test" or "Wilcoxon signed-rank" depending on your score distribution. [FRAGILITY_THRESHOLD] and [SIGNIFICANCE_THRESHOLD] let you tune sensitivity—start with 0.5 points mean shift and p < 0.05.

Before running this at scale, validate the output schema against a single variant to confirm your judge model produces parseable JSON. If the judge model is the same model family as the judge under test, be aware of self-consistency biases—consider using a different model for the sensitivity analysis itself. For high-stakes evaluation pipelines where score drift could affect product decisions, always review the fragile_phrases and robustness_recommendations with a human before rewriting the judge prompt. Store each sensitivity report alongside the judge prompt version it analyzed so you can track which phrases caused instability over time.

IMPLEMENTATION TABLE

Prompt Variables

Inputs required by the Judge Prompt Sensitivity Analysis Template. Each variable must be populated before running the sensitivity harness to ensure reliable comparison across prompt variants.

PlaceholderPurposeExampleValidation Notes

[BASE_JUDGE_PROMPT]

The original judge instruction template being tested for sensitivity

You are an expert evaluator. Score the following response on a scale of 1-5 for clarity, accuracy, and completeness.

Must contain at least one scoring instruction. Validate that the prompt includes a scoring scale or rubric reference. Null not allowed.

[PROMPT_VARIANTS]

Array of modified judge prompts with specific phrase substitutions, reorderings, or wording changes to test

[{"variant_id": "v1", "change_description": "Removed politeness prefix", "prompt_text": "Score the response..."}]

Must contain at least 2 variants. Each variant requires a unique variant_id, change_description, and prompt_text field. Validate array length >= 2.

[EVALUATION_SAMPLES]

Set of input-output pairs that the judge will score across all variants

[{"sample_id": "s1", "input": "Explain quantum computing", "output": "Quantum computing uses qubits..."}]

Must contain at least 20 samples for statistical validity. Each sample requires sample_id, input, and output fields. Validate sample count >= 20.

[SCORING_DIMENSIONS]

List of dimensions the judge evaluates, used to detect dimension-specific sensitivity

["clarity", "accuracy", "completeness", "conciseness"]

Must be a non-empty array of strings. Each dimension should appear in the base judge prompt. Validate array length >= 1 and all dimensions are referenced in [BASE_JUDGE_PROMPT].

[SIGNIFICANCE_THRESHOLD]

P-value threshold for flagging statistically significant score shifts between variants

0.05

Must be a float between 0.0 and 1.0. Common values: 0.01, 0.05, 0.10. Validate 0.0 < value <= 0.10. Null defaults to 0.05.

[MIN_EFFECT_SIZE]

Minimum Cohen's d or standardized mean difference required to consider a score shift practically meaningful

0.3

Must be a positive float. Typical thresholds: 0.2 small, 0.5 medium, 0.8 large. Validate value > 0. Null defaults to 0.2.

[OUTPUT_FORMAT]

Desired structure for the sensitivity report

json

Must be one of: json, markdown, csv. Validate enum membership. Null defaults to json.

[BASELINE_SCORES]

Pre-computed scores from the base judge prompt on the evaluation samples, used as the reference distribution

[{"sample_id": "s1", "scores": {"clarity": 4, "accuracy": 3}}]

Optional. If provided, must contain scores for all samples in [EVALUATION_SAMPLES] across all [SCORING_DIMENSIONS]. Validate sample_id coverage is complete. Null triggers fresh baseline scoring.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the sensitivity analysis prompt into an evaluation pipeline with controlled variant injection, statistical validation, and actionable reporting.

The sensitivity analysis prompt is not a one-shot query; it is a batch evaluation harness that compares scoring behavior across multiple judge instruction variants against a fixed, curated test set. The harness must iterate over a list of prompt variants, run each variant against the same set of test cases, collect structured score outputs, and then feed those results into the analysis prompt. This means the application layer is responsible for variant management, parallel execution, result aggregation, and statistical computation—the LLM prompt itself only performs the final analysis and report generation.

Start by defining a test case dataset of at least 30–50 examples that span your score range and include known edge cases. Each test case needs an id, the input to be judged, and optionally a reference_score if you have human labels. Next, define your variant list as an array of objects, each containing a variant_id and the full judge_instructions string. Common variants to test include: reworded criteria, changed scale anchors, added or removed constraints, and different output format instructions. Run each variant against every test case, capturing the raw score and justification. Store results in a structured format (JSON Lines or a database table) with fields: test_case_id, variant_id, score, justification, and timestamp. For high-stakes evaluation pipelines, log the full prompt and response for auditability.

Before calling the analysis prompt, precompute the statistical comparisons in application code. For each variant pair, calculate the mean score difference, the percentage of test cases where scores changed, and a simple significance test (e.g., Wilcoxon signed-rank for paired ordinal data). Package these precomputed statistics alongside the raw score matrix into the [SCORE_DATA] placeholder. This reduces hallucination risk in the LLM's statistical reasoning and ensures the prompt focuses on interpretation—identifying fragile phrases, explaining why certain variants caused shifts, and recommending robust wording. Validate the analysis output against your precomputed numbers; if the LLM reports a significant shift where your code found none, flag it for human review. For production evaluation pipelines, run this sensitivity analysis as a pre-release gate whenever judge instructions change, and store the report alongside your prompt version history.

IMPLEMENTATION TABLE

Expected Output Contract

Validate the sensitivity report JSON structure before integrating it into an evaluation pipeline. Each field must satisfy the listed validation rule.

Field or ElementType or FormatRequiredValidation Rule

report_id

string

Matches pattern sensitivity-[timestamp]-[variant_count]. Parse check.

base_prompt_id

string

Non-empty. Must match a known prompt version in the registry.

variants

array of objects

Length >= 2. Each object must contain variant_id, instruction_diff, and score_distribution.

variants[].variant_id

string

Unique within the array. No empty strings.

variants[].instruction_diff

string

Non-empty. Describes the exact wording change from the base prompt.

variants[].score_distribution

object

Must contain mean, std_dev, sample_size. sample_size >= 30.

significant_shifts

array of objects

Each object must contain variant_a, variant_b, p_value, and effect_size. p_value must be a float between 0 and 1.

fragile_phrases

array of strings

Each string must be a substring found in at least one variant's instruction_diff. Null allowed if no fragility detected.

recommendations

array of strings

Length >= 1. Each recommendation must reference at least one variant_id or fragile_phrase.

PRACTICAL GUARDRAILS

Common Failure Modes

Judge prompt sensitivity analysis reveals how small instruction changes cause large score shifts. These failure modes help you detect fragile phrasing, prevent silent evaluation drift, and build judge prompts that survive iteration.

01

Synonym Substitution Causes Score Collapse

What to watch: Replacing a single word like 'excellent' with 'outstanding' in a rubric can shift score distributions by 0.5+ points on a 5-point scale. The model overweights specific adjectives rather than the underlying intent. Guardrail: Run pairwise sensitivity tests on every adjective and qualifier in your rubric. Flag any word whose substitution changes scores beyond your acceptable threshold. Maintain a controlled vocabulary list for judge prompts.

02

Instruction Order Reverses Preference Judgments

What to watch: Moving the 'safety check' instruction before the 'quality assessment' instruction can cause the judge to reject outputs it previously accepted. Models exhibit recency and primacy bias in multi-criteria evaluation. Guardrail: Test at least three instruction orderings for every judge prompt. If score agreement drops below 0.85 across orderings, your criteria are interacting. Split into separate evaluation passes or add explicit priority rules.

03

Example Anchoring Distorts Score Calibration

What to watch: Adding a single high-score example to a judge prompt can pull all subsequent scores upward by 0.3-0.7 points. The model anchors to the example distribution rather than the rubric scale. Guardrail: Run calibration checks with and without examples. If examples shift mean scores significantly, either remove them or provide balanced examples across all score tiers. Validate that example-free and example-anchored judges agree on holdout cases.

04

Length Bias Masks Real Quality Differences

What to watch: Judge prompts that don't explicitly control for output length will assign higher scores to longer responses, even when the extra content is repetitive or irrelevant. Score inflation correlates with token count above 200 tokens. Guardrail: Add explicit length normalization instructions: 'Do not reward or penalize based on response length. A concise correct answer scores the same as a verbose correct answer.' Validate by correlating scores with output length on a controlled test set.

05

Constraint Interactions Produce False Negatives

What to watch: When a judge prompt has 5+ constraints, the model often fails to satisfy all simultaneously, producing failing scores for outputs that meet the core requirement. Constraint interference increases non-linearly with constraint count. Guardrail: Test each constraint in isolation, then test all combinations. Identify which constraint pairs cause interference. Consider splitting complex evaluations into sequential single-constraint checks rather than one multi-constraint pass.

06

Temperature Sensitivity Destroys Reproducibility

What to watch: Judge prompts that produce consistent scores at temperature 0 become unreliable at temperature 0.3, with score variance exceeding 0.5 points across repeated runs. Some instruction phrasings are inherently high-variance. Guardrail: Run each judge prompt variant at temperatures 0, 0.3, and 0.7 with 5+ repetitions each. Flag any variant where standard deviation exceeds 0.2 at temperature 0. Prefer phrasings that remain stable across temperature settings.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing whether a judge prompt sensitivity analysis report is actionable, statistically sound, and safe to use for production prompt decisions.

CriterionPass StandardFailure SignalTest Method

Score Variance Detection

Report identifies all prompt variants where mean score shifted by more than [SENSITIVITY_THRESHOLD] with p < 0.05

Report lists zero significant shifts despite known fragile phrases in [PROMPT_VARIANT_LIST]

Run analysis against a synthetic dataset with injected score shifts at known magnitudes; verify detection recall > 0.95

Fragile Phrase Attribution

Each significant score shift is attributed to a specific instruction phrase or structural change in the variant

Report attributes shifts to entire prompt blocks or uses vague language like 'wording changes' without specifics

Parse report for phrase-level attribution strings; verify each attribution maps to an actual diff in [PROMPT_DIFF_MAP]

Statistical Test Appropriateness

Report uses a named statistical test appropriate for the score distribution type, with test assumptions checked

Report applies a t-test to binary pass/fail scores or uses no statistical test at all

Validate that test selection logic in [ANALYSIS_CONFIG] matches score type; check for assumption-violation warnings in report

Confidence Interval Reporting

Every reported score shift includes a 95% confidence interval for the magnitude of change

Report states significance without interval bounds or reports intervals that cross zero for 'significant' findings

Parse all reported shifts; confirm each has lower_bound and upper_bound fields; verify zero is not inside intervals flagged as significant

Multiple Comparison Correction

Report applies a correction method when testing more than 5 variant pairs simultaneously

Report reports raw p-values across 20+ comparisons with no adjustment and flags many as significant

Count variant pairs in [PROMPT_VARIANT_LIST]; if > 5, verify presence of Bonferroni, Holm, or FDR correction in methodology section

Robust Wording Recommendation

Report recommends at least one alternative phrasing for each fragile instruction identified, with predicted score stability

Report only flags fragility without suggesting replacements, or suggests replacements that are semantically identical

Extract recommendation list; verify each fragile phrase has a corresponding replacement; run replacements through a semantic similarity check against originals to confirm meaningful difference

Effect Size Classification

Report classifies each shift as negligible, small, medium, or large using a predefined effect size scale

Report treats all significant shifts as equally important regardless of magnitude

Parse effect_size field per finding; verify classification matches [EFFECT_SIZE_SCALE] thresholds; confirm no finding with d < 0.2 is flagged as actionable

Reproducibility Check

Report includes a seed, sample count, and variance estimate enabling independent reproduction of results

Report omits sample size, uses a single evaluation run, or hides random seed

Verify presence of n_samples, random_seed, and variance fields in report metadata; confirm n_samples >= [MIN_SAMPLE_SIZE]

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base sensitivity template with a single judge model and a small set of instruction variants (3-5). Skip statistical significance tests and focus on raw score deltas. Replace [STATISTICAL_TEST] with a simple mean-difference threshold. Use [JUDGE_MODEL] as a single frontier model.

Watch for

  • Small variant sets missing fragile phrases
  • Score differences from sampling noise mistaken for sensitivity
  • No baseline anchor to compare against
  • Over-interpreting single-digit score shifts
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.