Inferensys

Prompt

Evidence Scoring Prompt with Confidence Intervals

A practical prompt playbook for using Evidence Scoring Prompt with Confidence Intervals in production AI workflows.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Identify the production scenarios where calibrated uncertainty in evidence scoring is required and where simpler approaches suffice.

This prompt is for RAG pipeline architects and search ranking engineers who need calibrated uncertainty in evidence quality assessment. Use it when downstream systems must make risk-aware selection decisions based on evidence scores, and a single point estimate is insufficient. The prompt produces a relevance score with explicit upper and lower confidence bounds, a calibration flag, and a justification for the uncertainty range. This is not a prompt for simple passage filtering or binary relevance judgments. It assumes you already have a set of retrieved passages and a query, and you need a structured, interval-based score to feed into a re-ranking or selection algorithm that accounts for model uncertainty.

The ideal user is building a production system where evidence selection errors have measurable consequences—such as a financial research assistant where outdated or low-authority sources could mislead analysts, or a medical literature RAG system where overconfident passage selection could surface weak evidence for clinical questions. In these scenarios, a single relevance score hides the model's uncertainty. A passage scored 0.85 might actually be anywhere from 0.60 to 0.95 in the model's own assessment, and downstream logic needs that range to decide whether to include, exclude, or flag the passage for human review. This prompt is also appropriate when you are building evaluation datasets for evidence scoring and need to capture model calibration alongside raw scores.

Do not use this prompt when a simple relevance threshold is sufficient for your use case, when latency budgets cannot accommodate the additional tokens required for confidence interval generation, or when your downstream system cannot consume interval data. If you are building a prototype or a low-stakes internal tool, start with a single-point relevance scoring prompt and only introduce confidence intervals when you have evidence that uncertainty matters for your outcomes. Similarly, if your retrieval pipeline already produces well-calibrated scores from a dedicated cross-encoder model, adding an LLM-based confidence layer may introduce unnecessary complexity and cost. Reserve this prompt for systems where the LLM's own uncertainty assessment adds decision value beyond what retrieval scores provide.

Before deploying, validate that the confidence intervals are empirically meaningful. Run the prompt against a calibration set with known relevance labels and check whether the reported intervals actually contain the true relevance values at the expected rate. If the model reports 90% confidence intervals but the true value falls outside the interval 30% of the time, the prompt is miscalibrated and should not drive downstream decisions without adjustment. Pair this prompt with an eval harness that logs interval coverage rates, average interval width, and calibration error metrics. When the calibration flag indicates low confidence in the score itself, route the passage to human review or apply a penalty in the downstream ranking algorithm.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Evidence Scoring Prompt with Confidence Intervals delivers calibrated, risk-aware evidence assessment—and where it introduces fragility or false precision.

01

Good Fit: Production RAG with Downstream Decision Logic

Use when: A RAG pipeline feeds evidence into a system that makes automated decisions, such as claim verification or compliance flagging. The confidence intervals allow downstream code to branch on uncertainty. Guardrail: Define explicit score thresholds for 'accept,' 'review,' and 'reject' actions before deployment.

02

Good Fit: Audit-Ready Evidence Selection

Use when: You must explain why one source was prioritized over another to auditors or users. The upper/lower bound scores provide a defensible range rather than a single opaque number. Guardrail: Log the full score object, not just the point estimate, to your audit trail.

03

Bad Fit: Low-Latency, Cost-Sensitive Retrieval

Avoid when: You are scoring hundreds of passages per query under strict latency (<200ms) or cost budgets. Generating calibrated intervals requires more output tokens and reasoning time than a single relevance score. Guardrail: Use a lightweight relevance filter first, then apply this prompt only to the top-N candidates.

04

Required Input: A Calibration Baseline

Risk: Without a reference distribution from human judgments or historical scores, the model's confidence intervals may be consistently overconfident or underconfident. Guardrail: Run an initial calibration pass against 50–100 human-scored examples to detect systematic bias before trusting the intervals in production.

05

Operational Risk: Interval Instability Across Model Updates

Risk: A model upgrade can shift the entire score distribution, making old thresholds invalid and downstream decision logic unreliable. Guardrail: Pin your evaluation pipeline to a specific model version and run a regression suite comparing score distributions before every model change.

06

Bad Fit: Subjective or Ambiguous Evidence Quality

Avoid when: The evidence quality is inherently subjective, such as literary analysis or creative brief evaluation. Forcing numerical confidence intervals onto ambiguous material produces false precision that misleads downstream systems. Guardrail: Use a qualitative tier assignment prompt instead, and reserve numerical intervals for domains with clear correctness criteria.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for scoring evidence passages with calibrated confidence intervals, ready to copy into your application.

The prompt below assigns a quality score to each evidence passage along with upper and lower confidence bounds. It is designed for production RAG pipelines where downstream selection, synthesis, or refusal logic needs to understand not just how good the evidence is, but how certain the model is about that assessment. Use this template when you need risk-aware evidence ranking—for example, when overconfident scoring on ambiguous passages could cause hallucinated answers or when compliance reviewers need to see uncertainty expressed explicitly.

text
You are an evidence quality assessor for a retrieval-augmented generation system. Your job is to score each evidence passage on how well it supports answering the query, and to express your confidence in that score using upper and lower bounds.

## INPUT
Query: [QUERY]
Evidence Passages:
[EVIDENCE_PASSAGES]

## SCORING CRITERIA
For each passage, evaluate:
1. Relevance: How directly does the passage address the query?
2. Specificity: Does the passage contain concrete facts, figures, or details, or is it vague?
3. Authority: Based on [AUTHORITY_SIGNALS], how credible is the source?
4. Recency: Given the query's temporal needs and the passage date, is the information current?

## OUTPUT SCHEMA
Return a JSON object with this exact structure:
{
  "passages": [
    {
      "passage_id": "string",
      "score": number (0.0 to 1.0),
      "confidence_lower": number (0.0 to 1.0),
      "confidence_upper": number (0.0 to 1.0),
      "factor_breakdown": {
        "relevance": number (0.0 to 1.0),
        "specificity": number (0.0 to 1.0),
        "authority": number (0.0 to 1.0),
        "recency": number (0.0 to 1.0)
      },
      "uncertainty_rationale": "string explaining why the confidence interval is wide or narrow"
    }
  ],
  "calibration_notes": "string describing any systematic uncertainty patterns across the batch"
}

## CONSTRAINTS
[CONSTRAINTS]

## EXAMPLES
[EXAMPLES]

## INSTRUCTIONS
- Score every passage independently. Do not compare passages to each other.
- The confidence interval must reflect genuine uncertainty. If a passage is ambiguous, contradictory, or missing key details, widen the interval.
- If you cannot assess a factor due to missing information, set that factor to null and widen the confidence interval accordingly.
- The uncertainty_rationale must cite specific passage content that drove the interval width.
- Do not invent information. If the passage lacks authority signals, note that rather than guessing.

Adaptation guidance: Replace [QUERY] with the user's question or information need. [EVIDENCE_PASSAGES] should be a list of retrieved passages with IDs, text, and metadata including publication dates and source identifiers. [AUTHORITY_SIGNALS] is a description of what makes a source authoritative in your domain—for example, "peer-reviewed journals and government publications are high authority; personal blogs are low authority." [CONSTRAINTS] can include domain-specific rules such as "medical evidence older than 5 years must have its recency score capped at 0.3" or "legal evidence from overturned precedents must be flagged." [EXAMPLES] should contain 2-3 scored passages showing both narrow and wide confidence intervals so the model learns what calibrated uncertainty looks like in your domain. If your application cannot parse the full JSON schema, simplify the output to {score, confidence_lower, confidence_upper, rationale} and move factor breakdowns to a separate debugging prompt.

What to do next: After copying this template, run it against a calibration set of 20-30 passages where you have human-scored ground truth. Check whether the model's confidence intervals actually contain the human scores at the expected rate—if you request 90% confidence intervals, roughly 90% of human scores should fall within the bounds. If intervals are systematically too narrow, add examples of ambiguous passages with wide intervals. If intervals are too wide to be useful, tighten the criteria language or reduce the number of factors the model must assess simultaneously. Wire the output into your downstream selection logic so that passages with wide confidence intervals trigger additional retrieval, human review, or conservative answer strategies rather than being treated the same as high-confidence passages.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Evidence Scoring Prompt with Confidence Intervals. Each variable must be populated before the prompt is assembled and sent. Validation notes describe checks to apply in the application layer before model invocation.

PlaceholderPurposeExampleValidation Notes

[QUERY]

The user question or information need that evidence is being scored against.

What is the effect of interest rates on commercial real estate cap rates in Q4 2024?

Required. Non-empty string. Check length < 2000 chars. Reject if only stop words.

[PASSAGES]

Array of retrieved evidence passages to score. Each passage must include text content and a unique identifier.

[{"id": "doc-1", "text": "Cap rates expanded by 50bps in Q4..."}, {"id": "doc-2", "text": "The Fed held rates steady..."}]

Required. Array with 1-50 objects. Each object must have string 'id' and non-empty string 'text'. Reject if duplicate IDs.

[PASSAGE_METADATA]

Optional metadata for each passage including publication date, source domain, and author type for recency and authority scoring.

[{"id": "doc-1", "published": "2024-12-15", "source_type": "financial_report", "authority": "central_bank"}]

Optional. If provided, array length must match [PASSAGES]. Each object must map to a passage ID. Null allowed for unknown metadata fields.

[CONFIDENCE_LEVEL]

Target confidence level for interval estimation, expressed as a decimal between 0 and 1.

0.90

Required. Float between 0.80 and 0.99. Reject values outside range. Default to 0.90 if not specified.

[SCORING_DIMENSIONS]

List of evidence quality dimensions to score, drawn from relevance, recency, authority, specificity, and alignment.

["relevance", "recency", "authority", "specificity"]

Required. Array of 1-5 strings from allowed set. Reject unknown dimensions. Warn if 'relevance' is missing.

[OUTPUT_SCHEMA]

Expected JSON structure for the scored output including field names, types, and required fields for each passage score.

{"passage_id": "string", "score": "float", "confidence_lower": "float", "confidence_upper": "float", "dimension_scores": "object", "calibration_note": "string"}

Required. Valid JSON Schema or example structure. Parse and validate before prompt assembly. Reject if missing 'score' or 'passage_id' fields.

[CALIBRATION_REFERENCE]

Optional reference distribution of empirical scores for calibration checking. Used to detect score drift from historical patterns.

{"mean": 0.65, "std": 0.15, "sample_size": 1200, "collection_period": "2024-11"}

Optional. If provided, must include 'mean' and 'std' as floats. Null allowed. Warn if sample_size < 100.

[CONSTRAINTS]

Additional behavioral constraints such as score range, rounding precision, required justification detail, and refusal conditions.

Score range 0.0-1.0. Round to 3 decimal places. Include justification for any score below 0.3. Refuse to score if passage text is empty.

Optional. String or array of strings. Parse for known constraint types. Reject contradictory constraints. Default to standard scoring rules if null.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the evidence scoring prompt into a production RAG pipeline with validation, retries, and audit logging.

The Evidence Scoring Prompt with Confidence Intervals is designed to be called as a scoring microservice within a RAG pipeline, not as a one-off chat interaction. It should sit between retrieval and answer generation, receiving a batch of candidate passages and returning calibrated scores with upper and lower confidence bounds. The prompt expects a structured input containing the user query, the retrieved passages with metadata, and the scoring rubric. The output is a JSON array of scored passages, each with a point estimate and a confidence interval. This structured contract makes it straightforward to integrate into an application: call the model, parse the JSON, validate the scores, and pass the ranked list downstream.

Wiring the prompt into an application requires a thin orchestration layer. In pseudocode: scored_passages = model.call(prompt_template.render(query=query, passages=retrieved_passages, rubric=scoring_rubric)). After receiving the response, the harness must validate that every passage in the input set received a score, that all scores fall within the expected range (e.g., 0.0–1.0), and that confidence intervals are well-formed (lower ≤ point ≤ upper). Any passage missing a score or with a malformed interval should trigger a retry with a repair prompt that includes the original output and a specific error message. If the retry also fails, the harness should log the failure and either fall back to a simpler scoring method or escalate for human review, depending on the risk level of the downstream task.

Model choice and tool use matter here. This prompt benefits from models with strong instruction-following and structured output capabilities. If your model provider supports native JSON mode or structured output constraints, enable them to reduce parsing failures. For high-throughput systems, consider batching multiple queries into a single call if the context window permits, but be aware that larger batches can introduce position bias in scoring. The prompt does not require external tools or retrieval during scoring—it operates on the passages already provided. However, you may want to add a calibration check as a post-processing step: compare the model's confidence intervals against empirical score distributions from a held-out evaluation set to detect systematic overconfidence or underconfidence. Log every scored batch with the query, passage IDs, scores, confidence intervals, and model version for auditability and regression testing.

Failure modes to monitor include: the model assigning identical scores to all passages (indicating the rubric is being ignored), confidence intervals that are implausibly narrow on ambiguous passages (overconfidence), and score inversions where clearly irrelevant passages outrank relevant ones. Implement a guardrail that flags batches where the score variance is below a threshold or where the top-ranked passage has a confidence interval wider than a configured maximum. These batches should be routed to a human review queue or a more expensive model for re-evaluation. For high-stakes domains like legal or medical evidence ranking, always require a human-in-the-loop approval step before scored evidence is used to generate answers that users will see.

Next steps after implementation: build an eval harness that runs the prompt against a golden dataset of passage-query pairs with known relevance judgments. Measure rank correlation (e.g., Kendall's tau or NDCG) between model scores and human judgments, and track calibration error between stated confidence intervals and actual error rates. Use these metrics as release gates before promoting a new prompt version to production. Avoid the temptation to treat the confidence intervals as true statistical guarantees—they are the model's expressed uncertainty, not a calibrated measurement, unless you have empirically validated them against your specific data distribution.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the required fields, types, and validation rules for the Evidence Scoring Prompt with Confidence Intervals output. Use this contract to build a parser and validator before integrating the prompt into a production pipeline.

Field or ElementType or FormatRequiredValidation Rule

evidence_id

string

Must match the [EVIDENCE_ID] from the input. Reject if missing or mismatched.

relevance_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Reject if out of range or non-numeric.

confidence_interval_lower

number (0.0-1.0)

Must be a float <= relevance_score. Reject if greater than relevance_score or out of 0.0-1.0 range.

confidence_interval_upper

number (0.0-1.0)

Must be a float >= relevance_score. Reject if less than relevance_score or out of 0.0-1.0 range.

scoring_rationale

string

Must be a non-empty string with at least 20 characters. Flag for human review if shorter than 50 characters.

key_supporting_quote

string

If present, must be a substring of [EVIDENCE_TEXT]. Reject if quote not found in source text. Null allowed.

calibration_flag

string (enum)

Must be one of: 'calibrated', 'underconfident', 'overconfident'. Reject on any other value.

scoring_timestamp

ISO 8601 datetime

Must parse as a valid ISO 8601 datetime string. Reject if unparseable or in the future.

PRACTICAL GUARDRAILS

Common Failure Modes

Confidence intervals add rigor to evidence scoring, but they introduce specific failure modes around calibration, overconfidence, and interval misuse. Here's what breaks first and how to guard against it.

01

Overconfident Narrow Intervals

What to watch: The model produces tight confidence intervals (e.g., 0.85–0.87) for ambiguous or low-quality passages, signaling false precision. This often happens when the prompt treats interval width as a formatting requirement rather than a genuine uncertainty expression. Guardrail: Add explicit instructions that narrow intervals require strong, unambiguous evidence signals. Include few-shot examples where ambiguous passages receive wide intervals (0.40–0.80) and require the model to justify interval width in its reasoning before outputting the score.

02

Interval Calibration Drift Across Batches

What to watch: Score distributions and interval widths shift systematically across retrieval batches, making downstream threshold-based filtering unreliable. A passage scored 0.70–0.90 in one batch would receive 0.50–0.70 in another for equivalent quality. Guardrail: Implement a calibration check step that samples scored passages across batches and compares empirical score distributions. Use a separate calibration prompt that detects distributional shift and flags batches where mean scores or interval widths deviate beyond configured tolerance thresholds.

03

Confidence Intervals Ignored Downstream

What to watch: The scoring prompt correctly produces upper and lower bounds, but downstream selection logic uses only the point estimate, discarding the uncertainty information entirely. This wastes the calibration work and reintroduces overconfident evidence selection. Guardrail: Enforce interval-aware selection rules in the application layer. Require that passages with wide intervals (upper minus lower > threshold) trigger additional retrieval, human review, or conservative answer strategies. Log cases where intervals were ignored to detect configuration drift.

04

Position Bias Inflating Early Passage Scores

What to watch: When scoring a ranked list of passages, the model assigns systematically higher scores and tighter intervals to passages appearing earlier in the list, regardless of actual evidence quality. This position bias corrupts the calibration signal. Guardrail: Randomize passage order before scoring and include passage position as an explicit non-factor in the prompt instructions. Run periodic position-bias audits by comparing score distributions for the same passage in different list positions and flag when position explains more variance than content.

05

Confidence Language Leaking into Score Values

What to watch: The model conflates linguistic confidence markers in the source text (e.g.,

06

Interval Collapse on Out-of-Distribution Evidence

What to watch: When the model encounters evidence types, domains, or formats not represented in the prompt's few-shot examples, it defaults to either maximum uncertainty (intervals spanning 0.0–1.0) or false confidence (copying intervals from the nearest familiar pattern). Both failures degrade downstream selection. Guardrail: Include explicit out-of-distribution handling instructions that require the model to widen intervals and flag unfamiliar evidence types rather than guessing. Add a post-scoring detector that identifies passages with interval widths at floor or ceiling values and routes them for human calibration review.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test whether the Evidence Scoring Prompt with Confidence Intervals produces calibrated, auditable, and production-safe outputs before shipping.

CriterionPass StandardFailure SignalTest Method

Score Calibration

Mean predicted score within ±0.1 of human-judge mean across a 100-sample test set

Systematic overconfidence (predicted mean > human mean + 0.15) or underconfidence (predicted mean < human mean - 0.15)

Compare model-assigned [EVIDENCE_SCORE] against human-judge scores on a held-out calibration set; compute mean absolute error

Confidence Interval Coverage

≥90% of human-judge scores fall within the model's [LOWER_BOUND] to [UPPER_BOUND] interval

Coverage below 80% indicates intervals are too narrow; coverage above 98% indicates intervals are too wide to be useful

For each scored passage, check if the human reference score falls inside [LOWER_BOUND, UPPER_BOUND]; compute empirical coverage rate

Factor Contribution Auditability

Every [FACTOR_BREAKDOWN] field maps to an explicit, verifiable passage property mentioned in the justification

Justification references a factor not present in the passage, or omits explanation for a factor that changed the score

Parse [FACTOR_BREAKDOWN] JSON; for each factor, verify the [JUSTIFICATION] string contains a direct quote or paraphrase from the passage

Refusal on Unscorable Evidence

Prompt returns scorable: false with a non-empty [REFUSAL_REASON] when the passage is empty, nonsensical, or in an unreadable format

Prompt assigns a mid-range score with wide confidence intervals to garbage input instead of refusing

Feed 20 adversarial inputs: empty string, Base64 garbage, whitespace-only, non-language symbols; assert scorable: false on all

Confidence Width Proportional to Ambiguity

Ambiguous passages (human inter-annotator disagreement > 0.3) produce confidence interval width ≥ 0.4

High-ambiguity passages receive narrow confidence intervals (width < 0.2), indicating overconfidence on unclear evidence

Select 20 passages with known high human disagreement; verify [UPPER_BOUND] - [LOWER_BOUND] ≥ 0.4 for at least 80% of them

Output Schema Compliance

Every response parses as valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed

Missing [EVIDENCE_SCORE], malformed [CONFIDENCE_INTERVAL] object, or extra untyped fields that break downstream parsers

Validate 100 responses against the JSON Schema; assert 100% pass rate on required fields and type constraints

Score Range Discipline

All [EVIDENCE_SCORE] values fall within the declared [SCORE_RANGE] (e.g., 0.0 to 1.0) with no extrapolation

Scores outside [SCORE_RANGE], negative values, or null scores on passages that were marked scorable: true

Assert min([EVIDENCE_SCORE]) ≥ [SCORE_MIN] and max([EVIDENCE_SCORE]) ≤ [SCORE_MAX] across a 500-passage test run

Position Bias Resistance

Score distribution for the same passage does not shift by more than 0.1 when its position in the input list changes

A passage scored 0.8 at position 1 drops to 0.5 at position 20 with no other changes

Run the same 10 passages in forward and reverse order; compute per-passage score delta; assert max delta < 0.1

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model and minimal validation. Replace [CONFIDENCE_INTERVAL_METHOD] with a simple instruction like "provide a 90% confidence interval using plausible low/high bounds." Skip calibration checks and use a single-pass scoring call. Accept raw text output without schema enforcement.

Watch for

  • Overconfident intervals on ambiguous passages where the model guesses instead of expressing uncertainty
  • Missing lower/upper bound fields when the model collapses to a point estimate
  • Score drift across batches without calibration against a fixed reference set
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.