Inferensys

Prompt

LLM-as-Judge Evidence Scoring Prompt Template

A practical prompt playbook for evaluation engineers building automated evidence quality assessment pipelines. This template uses rubric-based scoring and pairwise comparison to rank evidence passages, producing calibrated scores with confidence intervals and bias detection.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required context, and limitations for the LLM-as-Judge Evidence Scoring Prompt Template.

This prompt is a measurement instrument for evaluation engineers and RAG pipeline architects who need to automate evidence quality assessment at scale. Use it when you must rank retrieved passages by their support for a specific claim, calibrate those scores against human judgments, and detect systematic biases like position or length effects. The core job-to-be-done is not generating an answer for an end user, but producing a structured, explainable, and auditable quality signal that can be fed into an offline evaluation suite, a CI/CD quality gate, or a periodic production audit. You should reach for this prompt when a simple relevance classifier or an embedding cosine similarity score is insufficient—specifically, when you need multi-factor scores, pairwise comparisons, confidence intervals, or a detailed rubric-based justification that your team can review and debug.

Deploy this prompt in controlled, non-real-time evaluation pipelines first. A typical integration point is an offline scoring job that runs nightly over a sample of production retrieval sets, comparing the LLM's evidence scores against a human-annotated golden dataset. This allows you to calibrate the prompt's behavior, tune its rubrics, and measure inter-rater reliability before it ever influences a live user response. In a CI/CD context, you can gate a RAG pipeline deployment by running this prompt against a fixed set of claim-evidence pairs and failing the check if the weighted F1 score or Spearman rank correlation drops below a predefined threshold. For production audits, use it as a sampling profiler—pull 100 random retrieval events, score them, and generate a report on evidence quality drift. In all cases, the prompt's output should be logged as structured JSON, not free text, so that score distributions, confidence intervals, and bias metrics can be trended over time in your observability stack.

Do not use this prompt when a lightweight relevance signal is sufficient for your use case. If you only need to filter out obviously irrelevant passages before answer generation, a smaller, faster cross-encoder model or a thresholded vector similarity score will be cheaper and lower latency. The overhead of an LLM-as-Judge—token costs, inference time, and the complexity of parsing structured output—is warranted only when you need the explainability, multi-factor reasoning, and calibrated confidence that a general-purpose model provides. Similarly, avoid this prompt in synchronous, user-facing request paths where latency budgets are under 500 milliseconds; the scoring and comparison logic is designed for asynchronous evaluation, not real-time re-ranking. Finally, if your evidence set is small and static, and you can afford a one-time human annotation pass, do that instead. This prompt's value compounds when you have a large, dynamic retrieval corpus and need automated, repeatable quality measurement that scales beyond what a human review team can handle.

PRACTICAL GUARDRAILS

Use Case Fit

Where the LLM-as-Judge Evidence Scoring prompt template delivers reliable, auditable results—and where it introduces risk that requires alternative approaches or additional safeguards.

01

Good Fit: Calibrated Evaluation Pipelines

Use when: you need automated, repeatable evidence quality scoring that correlates with human judgments. Guardrail: always calibrate against a human-annotated golden set before relying on LLM scores in production gates.

02

Good Fit: Pairwise Comparison for Fine-Grained Ranking

Use when: head-to-head passage comparison produces more reliable relative rankings than absolute scoring. Guardrail: randomize passage order to neutralize position bias, and validate transitivity across multiple pairs.

03

Bad Fit: High-Stakes Unsupervised Decisions

Avoid when: evidence scores directly trigger automated actions without human review in regulated domains. Risk: scoring errors propagate into downstream answer generation or filtering decisions. Guardrail: require human approval above a defined risk threshold.

04

Bad Fit: Single-Pass Absolute Scoring Without Anchors

Avoid when: asking the model to assign absolute scores without reference examples or a detailed rubric. Risk: score drift and inconsistency across batches. Guardrail: include anchored rubric levels with example passages at each score point.

05

Required Inputs: Rubric, Passages, and Calibration Set

Required: a scoring rubric with defined levels, the evidence passages to score, and a human-annotated calibration set. Guardrail: missing any of these three inputs makes scores unreliable—default to human review until inputs are complete.

06

Operational Risk: Position and Length Bias

Risk: models systematically favor first or last passages and longer passages regardless of quality. Guardrail: randomize passage order, normalize for length, and test for bias patterns in your calibration set before production deployment.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for scoring evidence passages against a claim using a calibrated rubric, returning structured JSON with confidence intervals.

This template instructs the model to act as a calibrated judge, evaluating how well each evidence passage supports a given claim. It uses a defined scoring rubric to produce consistent, structured outputs that can be directly consumed by downstream ranking, filtering, or audit systems. The template is designed to be wired into an automated evaluation pipeline where evidence quality must be assessed programmatically, not just read by a human.

text
You are a calibrated evidence scoring judge. Your task is to evaluate how well each provided evidence passage supports a specific claim.

## INPUT
Claim: [CLAIM]
Evidence Passages:
[EVIDENCE_PASSAGES]

## SCORING RUBRIC
Score each passage on a scale of 1-5 using these criteria:
- 5 (Directly Supports): The passage explicitly confirms the claim with specific, matching details.
- 4 (Strongly Consistent): The passage is fully consistent with the claim and provides substantial supporting context, but lacks explicit confirmation.
- 3 (Partially Relevant): The passage touches on the claim's topic but neither clearly supports nor contradicts it.
- 2 (Weakly Inconsistent): The passage contains information that mildly contradicts or undermines the claim.
- 1 (Directly Contradicts): The passage explicitly refutes the claim with specific, conflicting details.
- 0 (Irrelevant): The passage has no meaningful relationship to the claim.

## OUTPUT SCHEMA
Return a valid JSON object with this exact structure:
{
  "scores": [
    {
      "passage_index": 0,
      "score": 5,
      "confidence": [0.85, 0.95],
      "rationale": "One-sentence explanation of the score.",
      "key_quote": "The most relevant sentence from the passage."
    }
  ],
  "summary": "Brief overall assessment of evidence strength for the claim."
}

## CONSTRAINTS
- Score every passage independently.
- Confidence must be a two-element array: [lower_bound, upper_bound] between 0.0 and 1.0.
- If you are uncertain, widen the confidence interval rather than guessing.
- The key_quote must be a verbatim excerpt from the passage.
- Do not include any text outside the JSON object.

To adapt this template, replace the [CLAIM] and [EVIDENCE_PASSAGES] placeholders with your actual inputs. For production use, add a [FEW_SHOT_EXAMPLES] section before the output schema to calibrate the model against your specific domain's evidence patterns. If scoring more than 5-7 passages, batch them to avoid position bias and length effects that degrade scoring consistency in later passages. Always validate the output JSON against the schema before accepting scores, and implement a retry with a stricter constraint prompt if the model deviates from the required format.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the LLM-as-Judge Evidence Scoring Prompt Template. Each placeholder must be populated before the prompt is sent to the model. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[QUERY]

The user question or claim that evidence is being scored against

What are the side effects of drug X?

Must be non-empty string. Check for minimum length of 10 characters. Reject queries that are purely punctuation or whitespace.

[PASSAGES]

Array of evidence passages to score, each with text and optional metadata

[{"id":"p1","text":"Clinical trial results show...","source":"PubMed","date":"2024-03"}]

Must be valid JSON array with 2-50 objects. Each object requires an id and text field. Reject if text field is empty or id is duplicated.

[RUBRIC]

Scoring dimensions and scale definitions for evidence quality assessment

{"dimensions":["relevance","recency","authority","specificity"],"scale":"1-5"}

Must define at least 2 dimensions. Scale must be numeric with explicit min and max. Validate that dimension names match downstream processing expectations.

[OUTPUT_SCHEMA]

Expected JSON structure for scored evidence output

{"passage_id":"string","scores":{"dim":"number"},"confidence":"number","justification":"string"}

Must be valid JSON Schema or example structure. Verify required fields include passage_id, scores, and justification. Reject schemas missing confidence or audit trail fields.

[CALIBRATION_SAMPLES]

Optional human-judged examples for score calibration

[{"passage_id":"p1","human_scores":{"relevance":4,"authority":5}}]

If provided, must contain at least 3 examples. Each example must have passage_id matching a passage in [PASSAGES]. Human scores must use same dimensions and scale as [RUBRIC]. Null allowed if calibration is not required.

[CONSTRAINTS]

Operational limits and behavioral rules for the scoring run

{"max_tokens_per_justification":150,"require_confidence_intervals":true,"bias_checks":["position","length"]}

Must specify token limits if justifications are generated. Bias check flags must reference supported detection methods. Validate that constraints do not conflict with output schema requirements.

[COMPARISON_MODE]

Scoring mode: rubric-based, pairwise, or combined

rubric

Must be one of: rubric, pairwise, combined. If pairwise, passages array must contain exactly 2 passages. If combined, output schema must support both per-passage scores and pairwise comparisons.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the LLM-as-Judge Evidence Scoring prompt into a production evaluation pipeline with validation, calibration, and human review checkpoints.

The LLM-as-Judge Evidence Scoring prompt is not a one-shot call. It belongs inside a structured evaluation harness that validates outputs, calibrates scores against human judgments, and detects systematic biases before scores feed downstream ranking or filtering systems. The harness should treat each prompt invocation as a single scoring event with traceable inputs, outputs, and metadata. Store the raw prompt, the model response, the parsed scores, and any validation errors in an evaluation log. This log becomes your audit trail for debugging score drift, model regressions, and bias patterns over time.

Start by wrapping the prompt call in a function that accepts a query, a list of evidence passages, and a scoring rubric. The function should: (1) assemble the prompt with the template's square-bracket placeholders filled, (2) call the model with a low temperature (0.0–0.2) for scoring consistency, (3) parse the structured output into a typed object with per-passage scores, confidence intervals, and justification fields, and (4) run a schema validator against the parsed output. If the output fails schema validation, retry once with the validation error appended to the prompt as a correction instruction. If the retry also fails, log the failure and flag the passage batch for human review rather than silently accepting malformed scores. For high-stakes domains—legal, medical, financial—require human sign-off on score distributions before they influence answer generation or retrieval re-ranking.

Calibration against human judgments is the most important harness component. Maintain a golden dataset of query-passage pairs with human-assigned scores. After each prompt version change or model upgrade, run the scoring prompt against this dataset and compute agreement metrics: Cohen's kappa for categorical tiers, mean absolute error for numerical scores, and position-bias checks that compare scores when the same passage appears first versus last in the input list. If agreement drops below a configured threshold, block the prompt version from production and investigate. Common failure modes include length bias where longer passages receive inflated scores, position bias where earlier passages score higher, and confidence miscalibration where the model reports high confidence on clearly ambiguous evidence. Your harness should explicitly test for these biases on every evaluation run, not just during initial development.

PRACTICAL GUARDRAILS

Common Failure Modes

LLM-as-Judge scoring pipelines fail in predictable ways. Position bias, miscalibration, and prompt sensitivity can silently degrade evidence quality without triggering obvious errors. These cards cover the most common failure modes and the operational guardrails that catch them before they affect downstream answer quality.

01

Position Bias Skews Pairwise Judgments

What to watch: The model systematically favors the first or last passage in a comparison pair, producing rankings that reflect presentation order rather than evidence quality. This is especially dangerous in pairwise comparison scoring where position effects can invert the true ranking. Guardrail: Randomize passage order for every comparison request and run reciprocal pairs where each passage appears in both positions. Flag results where the model's preference flips based on order as unreliable and escalate for human review.

02

Length Bias Inflates Scores for Verbose Passages

What to watch: Longer passages receive higher relevance or authority scores regardless of content quality, because the model confuses verbosity with thoroughness. This silently promotes wordy but weak evidence over concise, high-signal passages. Guardrail: Normalize scores by passage length in post-processing and include explicit length-penalty instructions in the prompt template. Monitor score distributions grouped by passage length buckets to detect systematic inflation before it contaminates downstream ranking.

03

Score Miscalibration Produces Overconfident Judgments

What to watch: The model assigns high confidence scores to evidence assessments that are actually uncertain or ambiguous, creating a false sense of reliability in the pipeline. Raw LLM scores rarely match empirical accuracy without calibration. Guardrail: Calibrate scores against human-judged reference sets using Platt scaling or isotonic regression. Require confidence intervals on every score and flag passages where the interval width exceeds a configured threshold for human review or re-retrieval.

04

Prompt Sensitivity Causes Score Drift Across Versions

What to watch: Minor changes to the scoring prompt—wording tweaks, rubric reordering, example swaps—produce statistically significant shifts in score distributions even when evidence quality hasn't changed. This breaks score comparability across pipeline versions and invalidates historical thresholds. Guardrail: Pin scoring prompts to versioned templates with hash-based integrity checks. Run regression tests against a golden evaluation set on every prompt change and alert if score distributions shift beyond a pre-defined tolerance before deploying.

05

Single-Factor Dominance Masks Multi-Factor Tradeoffs

What to watch: When aggregating multiple evidence quality signals such as relevance, recency, and authority, one factor overwhelms the others and the final score becomes a proxy for that single dimension. This defeats the purpose of multi-factor weighting and hides evidence that is strong on secondary dimensions. Guardrail: Output per-factor sub-scores alongside the aggregate and monitor factor contribution ratios. If any single factor explains more than a configured percentage of score variance, flag for weight recalibration or human audit.

06

Transitivity Violations Break Pairwise Ranking Consistency

What to watch: In pairwise comparison pipelines, the model produces circular preferences where A beats B, B beats C, but C beats A. These intransitive judgments make it impossible to produce a coherent global ranking and indicate the model is guessing or responding to spurious surface features. Guardrail: Run transitivity checks on all comparison triples and compute a consistency ratio for each batch. If the ratio drops below a threshold, discard the batch, re-prompt with shuffled order, or escalate to a higher-capability model or human judge.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to evaluate the quality of LLM-as-Judge evidence scoring outputs before shipping. Each row defines a pass standard, a failure signal, and a concrete test method.

CriterionPass StandardFailure SignalTest Method

Score Calibration

Mean Absolute Error (MAE) between model scores and human reference scores is below [CALIBRATION_THRESHOLD] for a held-out calibration set of [N] passages.

MAE exceeds threshold, or model systematically over/under-scores passages from specific sources or positions.

Run the prompt against a golden dataset of [N] human-scored evidence passages. Compute MAE and a Bland-Altman plot to detect systematic bias.

Position Bias Resistance

The score for a passage does not change significantly when its position in the input list is randomized. Score variance across positions is below [POSITION_VARIANCE_THRESHOLD].

Passages at the beginning or end of the context window receive consistently higher or lower scores.

Create [K] permutations of the same evidence set. Score each. Use ANOVA or a rank correlation test to check if position predicts score.

Length Bias Resistance

The score for a passage is not strongly correlated with its character or token length. Pearson correlation coefficient is below [LENGTH_CORRELATION_THRESHOLD].

Longer passages receive systematically higher scores, even when controlled for relevance.

Compute the Pearson correlation between passage length and assigned score across a diverse test set of [N] passages with varying lengths.

Factor Contribution Auditability

The output includes a breakdown of the final score into its constituent factors (e.g., relevance, recency, authority) as specified in [OUTPUT_SCHEMA].

Only a final aggregate score is returned, or the factor breakdown is missing required components.

Parse the output. Assert that all fields defined in [OUTPUT_SCHEMA] are present and non-null. Check that sub-scores logically sum or average to the final score within a tolerance of [TOLERANCE].

Confidence Interval Validity

The reported confidence interval [LOWER_BOUND, UPPER_BOUND] contains the true human reference score for at least [CONFIDENCE_COVERAGE]% of test cases.

Confidence intervals are unrealistically narrow (overconfident) or fail to cover the human score at the expected rate.

For each prediction in the calibration set, check if the human score falls within the model's predicted interval. Calculate the empirical coverage probability.

Pairwise Transitivity

For any three passages A, B, and C, if the model's pairwise comparison ranks A > B and B > C, it must also rank A > C in at least [TRANSITIVITY_RATE]% of cases.

Circular triads (A > B, B > C, C > A) appear frequently, indicating inconsistent scoring logic.

Extract all pairwise comparisons from a batch. Build a directed graph. Count the number of circular triads and compute the transitivity rate.

Refusal on Empty Evidence

When the [EVIDENCE_LIST] is empty or contains only null entries, the output must be a valid refusal object as defined in [OUTPUT_SCHEMA], not a hallucinated score.

The model returns a score, justification, or any non-refusal output when no evidence is provided.

Unit test: Pass an empty array [] for [EVIDENCE_LIST]. Assert the output matches the refusal structure exactly.

Justification Grounding

Every claim in the justification text must be directly attributable to a specific span in the source passage. A human reviewer confirms this for at least [GROUNDING_RATE]% of claims.

Justifications contain generic praise ('the passage is relevant') or hallucinated details not present in the source text.

Sample [N] scored outputs. A human reviewer highlights each claim in the justification and traces it to a passage span. Compute the rate of ungrounded claims.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base pairwise comparison prompt and a simple 1–5 rubric. Remove confidence intervals and calibration steps. Use a single model call per pair with no retry logic.

code
Compare these two evidence passages for query [QUERY].
Passage A: [PASSAGE_A]
Passage B: [PASSAGE_B]
Return JSON: {"winner": "A"|"B"|"tie", "score_a": 1-5, "score_b": 1-5, "rationale": "string"}

Watch for

  • Position bias: always swap A/B order in a second run
  • Length bias: longer passages get inflated scores
  • Missing rationale: require at least one sentence of reasoning
  • Overconfident ties when passages are clearly different
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.