This playbook is for evaluation infrastructure teams who need to verify that their LLM judges produce stable scores regardless of which few-shot examples are included or how they are ordered. If your judge prompt includes examples to calibrate scoring behavior, you must test whether those examples introduce bias. This prompt template produces a consistency report that compares scoring behavior across multiple example sets, detects example-induced drift, and flags sensitivity to example ordering. Use this before deploying a new judge prompt, after changing your example pool, or when inter-rater agreement drops unexpectedly.
Prompt
Few-Shot Example Consistency Check Prompt Template

When to Use This Prompt
Determine whether your evaluation pipeline needs a few-shot consistency check before deploying or updating a judge prompt.
Do not use this for testing the judge's accuracy against ground truth; that requires a separate alignment workflow. This prompt assumes you already have a functioning judge prompt with few-shot examples and a set of evaluation items to score. The ideal user is an evaluation engineer or ML platform developer who owns the judge prompt lifecycle and needs evidence that example selection is not silently degrading score reliability. You should have at least 20–50 evaluation items ready, a pool of candidate few-shot examples, and a baseline judge prompt whose instructions remain constant while only the examples vary.
Before running this consistency check, confirm that your judge prompt's core instructions, output schema, and scoring rubric are version-locked. If you change instructions and examples simultaneously, you won't be able to attribute drift to examples alone. After generating the consistency report, use the findings to either prune unstable examples, randomize example ordering in production, or increase the example pool size until scores stabilize. If the report reveals high sensitivity to example ordering, consider switching to zero-shot judging with a stricter rubric or implementing example selection strategies that sample diverse, representative cases rather than fixed few-shot sets.
Use Case Fit
Where this prompt works and where it does not. Use it to detect example-induced bias before it corrupts your evaluation pipeline.
Good Fit: Pre-Deployment Judge Audits
Use when: you are about to deploy or update a few-shot judge prompt and need to verify that the examples do not skew scoring. Guardrail: Run this check as a gate in your prompt release pipeline before the judge scores production traffic.
Bad Fit: Single-Example or Zero-Shot Judges
Avoid when: the judge prompt has only one example or no examples at all. The consistency check requires multiple examples to measure sensitivity. Guardrail: Fall back to instruction adherence audits and human calibration for zero-shot judges.
Required Inputs
What you need: a judge prompt template with few-shot examples, a set of test items with expected score distributions, and at least two example-set variants to compare. Guardrail: Validate that test items cover your scoring range and include edge cases before running the check.
Operational Risk: Example Overfitting
What to watch: the judge may learn to match surface patterns in examples rather than applying the rubric. Guardrail: Include counter-examples and negative demonstrations in your test sets. Flag judges where example reordering changes scores by more than your tolerance threshold.
Operational Risk: Representativeness Gap
What to watch: examples that do not reflect production input diversity will hide consistency problems until deployment. Guardrail: Audit example coverage against production input distributions. Regenerate examples when input patterns shift or new failure modes appear.
When to Escalate to Human Review
What to watch: consistency failures that persist across example-set variants and cannot be resolved by reordering or replacing examples. Guardrail: Escalate to rubric redesign or human annotation when the consistency report shows systematic bias rather than example-specific noise.
Copy-Ready Prompt Template
A reusable prompt that checks whether few-shot examples produce consistent scoring behavior across different example sets and orderings.
This template is designed to be pasted directly into your evaluation harness. It instructs an LLM judge to analyze scoring consistency when few-shot examples are varied, reordered, or replaced. The prompt detects example-induced bias, sensitivity to example ordering, and overfitting signals that can silently degrade judge reliability in production. Replace each square-bracket placeholder with your actual data before running the check.
textYou are an evaluation auditor analyzing the consistency of an LLM judge's scoring behavior when few-shot examples are modified. ## INPUT **Judge System Prompt (without examples):** [JUDGE_SYSTEM_PROMPT] **Evaluation Rubric:** [RUBRIC_TEXT] **Test Items (items being scored):** [TEST_ITEMS] **Example Sets (multiple sets of few-shot examples to test):** [EXAMPLE_SETS] **Example Orderings (permutations tested per set):** [EXAMPLE_ORDERINGS] **Scores Produced (score matrix: example_set x ordering x test_item):** [SCORE_MATRIX] **Judge Rationales (optional, for deeper analysis):** [JUDGE_RATIONALES] ## OUTPUT_SCHEMA Return a JSON object with this exact structure: { "consistency_summary": { "overall_stability_score": number (0-1, where 1 = perfectly consistent across all example variations), "stability_classification": "STABLE" | "MODERATELY_STABLE" | "UNSTABLE" | "HIGHLY_UNSTABLE", "items_affected_count": number, "total_items_count": number }, "per_item_analysis": [ { "item_id": string, "score_range": { "min": number, "max": number }, "score_variance": number, "stability": "STABLE" | "UNSTABLE", "example_set_sensitivity": "NONE" | "LOW" | "MODERATE" | "HIGH", "ordering_sensitivity": "NONE" | "LOW" | "MODERATE" | "HIGH", "affected_by_example_set": [string], "affected_by_ordering": [string] } ], "example_set_analysis": [ { "example_set_id": string, "mean_score_shift_vs_baseline": number, "bias_direction": "LENIENCY" | "SEVERITY" | "NONE", "items_with_shift_count": number, "representativeness_flag": "REPRESENTATIVE" | "POTENTIALLY_BIASED" | "UNREPRESENTATIVE" } ], "ordering_effects": [ { "ordering_id": string, "primacy_effect_detected": boolean, "recency_effect_detected": boolean, "position_bias_magnitude": number (0-1), "affected_item_positions": [number] } ], "overfitting_signals": [ { "signal_type": "EXAMPLE_MEMORIZATION" | "SPURIOUS_CORRELATION" | "OVERLY_SPECIFIC_PATTERN", "description": string, "severity": "LOW" | "MODERATE" | "HIGH", "evidence": string, "affected_example_set_ids": [string] } ], "recommendations": [ { "priority": "CRITICAL" | "HIGH" | "MEDIUM" | "LOW", "category": "EXAMPLE_REPLACEMENT" | "EXAMPLE_REORDERING" | "RUBRIC_CLARIFICATION" | "ADDITIONAL_EXAMPLES" | "HUMAN_REVIEW", "description": string, "rationale": string } ] } ## CONSTRAINTS - Compare scores across all example set and ordering combinations for each test item. - Flag any item where the score changes by more than [SCORE_CHANGE_THRESHOLD] across example variations. - Detect position bias: if scores shift systematically when examples are reordered, flag primacy or recency effects. - Identify example sets that produce systematically higher or lower scores (leniency/severity bias). - Check for overfitting: if certain examples cause the judge to over-apply narrow patterns, flag as overfitting risk. - If example sets are meant to be representative of the evaluation domain, flag any set that appears unrepresentative. - Base all findings on the provided score data. Do not speculate beyond what the data supports. - If judge rationales are provided, use them to strengthen root-cause analysis. - If [RISK_LEVEL] is "HIGH", require human review for any UNSTABLE or HIGHLY_UNSTABLE classification.
Adaptation guidance: Replace each placeholder with your actual data. The [SCORE_MATRIX] should be a structured mapping of example sets, orderings, and test items to their scores. If you don't have multiple orderings, set [EXAMPLE_ORDERINGS] to a single ordering and the ordering-effects analysis will return empty. Set [SCORE_CHANGE_THRESHOLD] based on your rubric's tolerance—0.5 is a reasonable default for 5-point scales. For high-stakes evaluation pipelines, set [RISK_LEVEL] to "HIGH" to enforce human review gates on unstable results. Run this check whenever you add, remove, or reorder few-shot examples in your judge prompts, and include it in your prompt release pipeline as a pre-merge gate.
Prompt Variables
Inputs the prompt needs to work reliably. Validate each before running the consistency check.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[FEW_SHOT_EXAMPLES] | The set of few-shot examples being tested for scoring consistency | Array of 3-5 input-output pairs with known ground-truth scores | Must contain at least 3 examples. Each example must have an input, output, and expected score. Validate array length and field presence before prompt assembly. |
[JUDGE_SYSTEM_PROMPT] | The full system prompt the judge uses, including role, rubric, and constraints | You are an expert evaluator. Score outputs on clarity (1-5) and accuracy (1-5)... | Must be non-empty string. Check for rubric presence, scoring scale definition, and output format instructions. Flag if rubric criteria are missing or ambiguous. |
[TARGET_OUTPUT] | The model output being evaluated for consistency across example sets | The API should return a 200 status code with a JSON body containing... | Must be non-empty string. Validate that this output is the same across all consistency test runs. Mismatched target outputs invalidate the comparison. |
[EXAMPLE_ORDERINGS] | List of example permutations to test for ordering sensitivity | [[ex1, ex2, ex3], [ex3, ex1, ex2], [ex2, ex3, ex1]] | Must contain at least 2 distinct orderings. Each ordering must include all examples exactly once. Validate permutation completeness and uniqueness. |
[SCORING_RUBRIC] | The evaluation criteria and scale the judge uses to assign scores | Clarity: 1=incomprehensible, 5=crystal clear. Accuracy: 1=factually wrong, 5=fully correct. | Must define at least one criterion with explicit scale anchors. Validate that each criterion has a numeric range and descriptive anchors. Missing anchors cause judge drift. |
[CONSISTENCY_THRESHOLD] | The minimum acceptable agreement rate across example orderings | 0.85 | Must be a float between 0.0 and 1.0. Validate numeric type and range. Values below 0.7 suggest the judge is unreliable. Set based on risk tolerance for the evaluation pipeline. |
[OUTPUT_SCHEMA] | The expected JSON structure for the consistency report | {"example_id": string, "scores_by_ordering": [[number]], "score_variance": number, "ordering_effect_detected": boolean} | Must be a valid JSON Schema or example structure. Validate parseability. Each field must have a defined type. Missing schema causes unstructured output that breaks downstream parsers. |
[MAX_RETRIES] | Number of retry attempts if judge output fails validation | 3 | Must be a positive integer. Validate type and minimum value of 1. Set to 0 only if the evaluation pipeline has no retry logic. High values without backoff risk rate-limiting. |
Implementation Harness Notes
How to wire the Few-Shot Example Consistency Check into an evaluation pipeline with retry logic, validation, and logging.
This prompt is designed to be run as a meta-evaluation step within a broader judge calibration pipeline, not as a one-off manual check. The implementation harness must treat the consistency check as a batch job: it receives a set of few-shot example configurations, a target judge prompt, and a sample of test inputs, then produces a structured consistency report. The harness is responsible for iterating over example sets, collecting judge outputs, and feeding them into this prompt for analysis. Because the prompt itself performs statistical reasoning over score distributions, the harness must ensure that the input data is complete and correctly shaped before invoking the model.
The harness should be built with three layers: orchestration, validation, and logging. The orchestration layer runs the target judge prompt against a fixed test suite multiple times, each time with a different few-shot example configuration (varying example selection, ordering, and count). For each configuration, collect the judge's scores and rationales into a structured JSON array. The validation layer checks that each score entry contains the required fields (example_config_id, test_item_id, score, rationale) and that score values fall within the expected rubric range. If validation fails for a configuration, log the failure and exclude that configuration from the consistency analysis rather than passing malformed data to the model. The logging layer records the full input payload, the model's consistency report, and any validation errors to an append-only store for auditability.
Retry logic should be applied at two levels. First, if the target judge produces an unparseable output for a test item, retry that single item up to two times with a repair prompt before marking it as a failed evaluation. Second, if this consistency check prompt returns malformed JSON or fails schema validation, retry the entire analysis once with a stricter output format instruction. Implement a circuit breaker: if more than 10% of test items fail evaluation in any example configuration, abort the consistency check for that configuration and flag it for human review. The harness should also enforce a minimum sample size—reject any configuration with fewer than 20 completed test items, as the prompt's statistical claims about bias and sensitivity become unreliable with sparse data.
For model choice, use a model with strong reasoning capabilities and a large context window, as the prompt requires analyzing score matrices and detecting patterns across multiple example sets. The input payload can grow large when many configurations and test items are included. If the combined input exceeds the model's context limit, the harness should implement a windowing strategy: split configurations into batches of no more than five, run the consistency check on each batch, and then run a final aggregation pass that synthesizes the batch-level reports into a single summary. Each batch report must include the example_config_ids it covers so the aggregation pass can trace findings back to specific configurations.
Before deploying this harness to production, validate it against a golden consistency dataset: a set of example configurations with known bias patterns and ordering effects. The harness should correctly identify injected biases and flag configurations that produce unstable scores. Run this validation as part of your CI pipeline whenever the consistency check prompt or the target judge prompt changes. Finally, route any report where the severity field is high or where requires_human_review is true to a review queue. Do not automatically accept or reject example sets based solely on this prompt's output—use it as a diagnostic tool that informs human decisions about which few-shot examples to keep, reorder, or replace.
Expected Output Contract
Parse and validate the consistency report against this schema before accepting the output. Reject or flag any field that violates its validation rule.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
consistency_report_id | string (UUID v4) | Must match regex for UUID v4 format. Reject if missing or malformed. | |
timestamp | string (ISO 8601) | Must parse as valid ISO 8601 datetime. Reject if in the future beyond a 5-minute clock skew tolerance. | |
example_set_id | string | Must be non-empty and match the [EXAMPLE_SET_ID] provided in the prompt input. Reject on mismatch. | |
judge_prompt_version | string | Must be non-empty and match the [JUDGE_PROMPT_VERSION] provided in the prompt input. Reject on mismatch. | |
total_examples_evaluated | integer | Must be a positive integer greater than 0. Reject if null, negative, or zero. | |
score_variance_across_examples | number (float) | Must be a non-negative float. Reject if negative. Flag for human review if variance exceeds [MAX_ACCEPTABLE_VARIANCE]. | |
ordering_sensitivity_flag | boolean | Must be true or false. If true, the ordering_impact_summary field becomes required. | |
ordering_impact_summary | string | Required if ordering_sensitivity_flag is true. Must be a non-empty string summarizing the detected ordering effect. Flag if missing when flag is true. | |
example_representativeness_score | number (float 0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. Flag for human review if below [MIN_REPRESENTATIVENESS_THRESHOLD]. | |
overfitting_signal_detected | boolean | Must be true or false. If true, the overfitting_evidence field becomes required. | |
overfitting_evidence | array of strings | Required if overfitting_signal_detected is true. Each element must be a non-empty string describing a specific overfitting indicator. Reject if array is empty when flag is true. | |
per_example_breakdown | array of objects | Must be a non-empty array. Each object must contain example_id (string), score (number), and rank (integer) fields. Reject if any required sub-field is missing or invalid. |
Common Failure Modes
What breaks first when running few-shot example consistency checks and how to guard against it. Each failure mode includes detection signals and remediation steps.
Example Order Sensitivity
What to watch: Judge scores shift significantly when few-shot examples are reordered, indicating the model is anchoring to position rather than content. Guardrail: Randomize example order across multiple runs and measure score variance. Flag prompts where standard deviation exceeds 0.3 on your scoring scale for investigation.
Overfitting to Example Style
What to watch: The judge learns superficial patterns from examples—sentence length, formatting quirks, or tone—and applies them as scoring criteria rather than the actual rubric. Guardrail: Include counter-examples that violate style expectations but satisfy rubric criteria. Monitor for score divergence between style-matched and style-mismatched test cases.
Example Representativeness Gap
What to watch: Few-shot examples cover only easy or typical cases, causing the judge to fail on edge cases, ambiguous inputs, or distribution-shifted data. Guardrail: Stratify example selection across difficulty levels, failure modes, and input types. Run consistency checks on a held-out edge-case set and compare agreement with the full test suite.
Example-Induced Bias Amplification
What to watch: Examples containing subtle demographic, stylistic, or content biases cause the judge to systematically favor or penalize certain output patterns. Guardrail: Audit examples for bias triggers before inclusion. Run pairwise consistency tests comparing judge behavior with and without each example to isolate bias sources.
Context Window Truncation
What to watch: Long few-shot example sets push the actual evaluation input near or past context limits, causing the judge to score from truncated or missing information. Guardrail: Monitor token usage and set a hard cap reserving at least 50% of the context window for the evaluation target. Test consistency at varying example counts to detect truncation thresholds.
Example-Instruction Conflict
What to watch: Few-shot examples implicitly demonstrate scoring behavior that contradicts the written rubric instructions, and the model follows the examples over the instructions. Guardrail: Include explicit instruction priority language in the prompt. Test for conflict by inserting examples that would score differently under the rubric versus the demonstrated pattern and flag mismatches.
Evaluation Rubric
Run these checks on the consistency report output before accepting it into your evaluation pipeline. Each criterion targets a specific failure mode in few-shot example consistency analysis.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Example-Induced Score Variance | Standard deviation across example sets is below [MAX_VARIANCE_THRESHOLD] | Score range exceeds threshold when examples are swapped or reordered | Compute std dev of scores across all example-set variants; compare against configured threshold |
Order Sensitivity | Score difference between original and reversed example order is less than [ORDER_TOLERANCE] | Reversed example order produces score shift exceeding tolerance | Swap example order in prompt, re-run evaluation, compute absolute score delta |
Example Representativeness Coverage | Report includes coverage analysis for all [DOMAIN_CATEGORIES] specified in input | Missing category coverage or report omits representativeness section | Parse report for category enumeration; verify each input category appears in coverage analysis |
Overfitting Signal Detection | Report flags at least one overfitting indicator when example-to-output similarity exceeds [SIMILARITY_THRESHOLD] | No overfitting flags present despite high lexical overlap between examples and outputs | Check cosine similarity between example embeddings and output embeddings; verify report surfaces anomalies |
Bias Direction Classification | Report categorizes bias direction as lenient, severe, or neutral with supporting evidence | Bias direction is missing, unclassified, or contradicts score distribution evidence | Extract bias direction label; validate against actual score distribution skew relative to baseline |
Confidence Interval Reporting | Report includes 95% confidence intervals for all aggregate scores | Confidence intervals absent or computed on fewer than [MIN_SAMPLE_SIZE] observations | Parse confidence interval fields; verify interval width is plausible given sample size |
Actionable Remediation Output | Report contains at least one concrete remediation suggestion per detected issue | Remediation section is empty, generic, or disconnected from detected issues | Extract remediation list; verify each entry references a specific detected issue with a concrete action |
Reproducibility Metadata | Report includes prompt version, model identifier, timestamp, and example-set hash | Metadata fields missing or placeholder values present | Validate presence and format of version, model, timestamp, and hash fields in output schema |
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
Use the base prompt with a small set of few-shot examples (3-5) and a single judge model. Run consistency checks manually by swapping example order and comparing scores on a fixed eval set of 20-30 items. Focus on detecting gross sensitivity—if swapping examples flips pass/fail decisions, flag it.
Simplify the output schema to a single consistency_score (1-5) and a sensitivity_flag (boolean). Skip statistical rigor; look for patterns.
Watch for
- Example sets that are too small to reveal ordering effects
- Over-interpreting noise as signal with small sample sizes
- Missing the difference between example-induced bias and genuine rubric ambiguity

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