This prompt is designed for safety-critical application builders and customer-facing AI teams who need to express calibrated uncertainty based on evidence quality. Use it when your system retrieves evidence, synthesizes an answer, and must communicate confidence to users with specific reasons for uncertainty. This prompt belongs in the post-retrieval, pre-response stage of a RAG pipeline. It takes retrieved evidence passages, the original query, and any generated answer as inputs, then produces a structured confidence statement.
Prompt
Uncertainty Expression from Evidence Prompt Template

When to Use This Prompt
Identifies the ideal production stage, user, and prerequisites for the Uncertainty Expression from Evidence Prompt Template, and clarifies when to choose a different guardrail.
The ideal user is an AI engineer or product developer integrating a confidence layer into a user-facing answer. The required context includes the original user query, a set of retrieved evidence passages, and the draft answer generated from that evidence. The prompt's job is to audit the relationship between the evidence and the answer, producing a confidence score and a plain-language explanation of what factors increased or decreased confidence. This is not a hallucination detector; it does not compare the answer against a ground-truth database. It reasons over the provided evidence only.
Do not use this prompt when evidence is absent entirely; use the Evidence-Based Refusal Explanation Prompt Template instead. Do not use this prompt for raw hallucination detection; pair it with the Hallucination Flagging with Source Evidence Prompt Template for a complete guardrail. Avoid using this prompt when the answer is a simple fact lookup with a single, authoritative source—the overhead of a structured confidence statement adds latency without proportional user value. In high-stakes domains such as healthcare or legal, the output of this prompt should be reviewed by a human before being surfaced to the end user.
Use Case Fit
This prompt template is designed for safety-critical and customer-facing systems that must express calibrated uncertainty. It works best when evidence quality varies and users need to understand why confidence is low. It is not a substitute for factual verification or retrieval quality improvement.
Good Fit: Evidence Quality Varies
Use when: your RAG pipeline retrieves sources of mixed relevance, recency, or authority, and the model must decide how confident to be. Guardrail: always pass the raw evidence set alongside the query so the prompt can assess source agreement and completeness before generating a confidence statement.
Bad Fit: Binary Factual Queries
Avoid when: the user expects a single definitive answer from a closed, authoritative knowledge base. Guardrail: for deterministic lookups, use a direct retrieval-and-cite pattern instead. Reserve uncertainty expression for cases where evidence is incomplete or conflicting.
Required Inputs: Evidence Set and Query
What to watch: the prompt cannot calibrate uncertainty without the actual retrieved passages. Guardrail: always include the full evidence list, source metadata, and the original user query. Missing evidence produces overconfident or vague outputs.
Operational Risk: Over-Refusal
Risk: the model may express low confidence even when evidence is sufficient, eroding user trust. Guardrail: pair this prompt with an evidence sufficiency check before the uncertainty expression step. Only invoke uncertainty language when gaps or conflicts are detected.
Operational Risk: Hallucinated Reasons
Risk: the model may invent plausible-sounding reasons for uncertainty that do not match the actual evidence. Guardrail: run an eval that verifies each stated reason for uncertainty against the provided sources. Flag any reason not directly traceable to a specific evidence gap.
Human Review: Safety-Critical Domains
Risk: in healthcare, legal, or financial contexts, an incorrectly calibrated confidence statement can cause harm. Guardrail: route all uncertainty outputs in regulated domains through a human review queue before they reach end users. Never auto-publish confidence statements in high-stakes workflows.
Copy-Ready Prompt Template
Paste this prompt into your system to generate calibrated uncertainty statements based on evidence quality, source agreement, and information completeness.
This prompt template instructs the model to act as an evidence analyst. It assesses the provided context across three critical dimensions—quality, agreement, and completeness—before producing a final uncertainty statement. The output is designed to be integrated directly into user-facing applications where overconfidence can erode trust or create safety risks. Replace the square-bracket placeholders with your specific query, retrieved evidence, and risk tolerance before use.
textYou are an evidence analyst. Your task is to assess the quality, agreement, and completeness of the provided evidence to answer a user's query. You must then produce a calibrated uncertainty statement. Follow these steps strictly: 1. **Evidence Quality Assessment:** Evaluate each piece of evidence for relevance, authority, and recency. Note any credibility concerns. 2. **Source Agreement Analysis:** Determine if the evidence sources agree, disagree, or address different aspects of the query. Identify any contradictions. 3. **Information Completeness Check:** Identify specific information gaps between the query and the evidence. State what is missing. 4. **Uncertainty Statement Generation:** Synthesize the above into a single, clear uncertainty statement. This statement must: * Express a calibrated confidence level (e.g., High, Moderate, Low, Insufficient Evidence). * Explicitly state the primary reasons for uncertainty, referencing the quality, agreement, or completeness findings. * Avoid hedging language that obscures the specific reason for doubt. * If evidence is sufficient and in agreement, state confidence clearly without overstatement. **Constraints:** * Do not answer the user's query directly. Only provide the uncertainty statement. * Base your assessment strictly on the provided evidence. Do not use outside knowledge. * If no evidence is provided, the confidence level must be "Insufficient Evidence." **Inputs:** <User Query> [USER_QUERY] </User Query> <Evidence Set> [EVIDENCE_SET] </Evidence Set> <Risk Profile> [RISK_PROFILE] </Risk Profile> **Output Format:** Provide your response in a single markdown code block with the following structure: ```json { "evidence_quality_summary": "string", "source_agreement_summary": "string", "completeness_gaps": ["string"], "uncertainty_statement": "string", "confidence_level": "High | Moderate | Low | Insufficient Evidence" }
To adapt this template, start by populating [USER_QUERY] and [EVIDENCE_SET] with your data. The [RISK_PROFILE] placeholder is a critical control lever; use it to describe the cost of being wrong in your specific domain (e.g., "A wrong answer could lead to an incorrect medical dosage. Prefer lower confidence when evidence is not from a peer-reviewed journal."). This instruction directly influences the model's calibration. After running the prompt, validate that the output JSON parses correctly and that the confidence_level field contains only one of the four allowed enum values. For high-risk applications, a human reviewer should confirm that the stated reasons for uncertainty in the uncertainty_statement field are logically consistent with the summaries of quality, agreement, and completeness before the output is shown to an end user.
Prompt Variables
Each placeholder required by the Uncertainty Expression from Evidence prompt template, with its purpose, a concrete example, and validation rules to prevent silent failures in production.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[EVIDENCE_PASSAGES] | Array of retrieved evidence passages with source metadata used to ground the uncertainty assessment | ["According to the 2024 FDA guidance, dosing should not exceed 50mg...", "A 2023 meta-analysis found no significant benefit above 40mg..."] | Must be a non-empty array. Each element must be a string with minimum 20 characters. Reject if null or empty array. Schema check: Array<string>. |
[USER_QUERY] | The original user question or request that triggered the evidence retrieval and uncertainty assessment | "What is the maximum safe dosage of rivaroxaban for elderly patients with renal impairment?" | Must be a non-empty string. Validate minimum 10 characters. Reject if only whitespace or null. Parse check: typeof string and length > 0. |
[OUTPUT_SCHEMA] | Structured JSON schema defining the required output shape for the confidence statement and uncertainty reasons | {"confidence_level": "string", "confidence_score": "number", "uncertainty_reasons": ["string"], "evidence_quality_assessment": "string"} | Must be a valid JSON schema object. Validate with JSON Schema validator before prompt assembly. Required fields: confidence_level, confidence_score, uncertainty_reasons. Schema check: parseable JSON with required keys present. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score below which the system should escalate for human review rather than auto-responding | 0.7 | Must be a number between 0 and 1 inclusive. Validate typeof number and range. If null, default to 0.6. Parse check: Number([CONFIDENCE_THRESHOLD]) is not NaN and 0 <= value <= 1. |
[DOMAIN_CONTEXT] | Optional domain label that adjusts uncertainty calibration expectations for specialized fields | "clinical_pharmacology" | Must be one of predefined enum values if provided: clinical_pharmacology, legal_compliance, financial_analysis, scientific_research, general. Null allowed. If provided, validate against allowed enum. Schema check: string matching allowed values or null. |
[MAX_UNCERTAINTY_REASONS] | Upper limit on the number of distinct uncertainty reasons the model should generate | 5 | Must be a positive integer between 1 and 10. Validate typeof number and integer check. If null, default to 3. Parse check: Number.isInteger(value) and 1 <= value <= 10. |
[REQUIRE_CITATIONS] | Boolean flag indicating whether each uncertainty reason must cite specific evidence passages | Must be boolean true or false. Validate typeof boolean. If null, default to true for safety-critical domains. Parse check: value === true or value === false. | |
[HUMAN_REVIEW_TRIGGER] | Conditions that force human review regardless of confidence score, such as contradictory evidence or missing sources | ["evidence_conflict_detected", "source_count_less_than_2"] | Must be an array of strings matching allowed trigger types: evidence_conflict_detected, source_count_less_than_2, confidence_below_threshold, domain_mismatch, missing_critical_source. Null allowed. If provided, validate each element against allowed enum. Schema check: Array<string> with valid enum values. |
Implementation Harness Notes
How to wire the Uncertainty Expression prompt into a production application with validation, retries, logging, and human review triggers.
The Uncertainty Expression from Evidence prompt is not a standalone artifact—it is a component in a safety-critical pipeline. In production, this prompt typically sits after evidence retrieval and ranking, and before the final response is delivered to a user or downstream system. The harness must enforce that the model never expresses confidence without grounding it in the provided evidence. This means the application layer must validate that every confidence statement references specific source attributes (agreement, completeness, recency) rather than allowing the model to generate vague or unsubstantiated uncertainty language.
Start by defining a strict output schema for the confidence statement. Require a JSON object with fields like confidence_level (enum: high, medium, low, insufficient_evidence), confidence_rationale (array of reasons, each keyed to a specific evidence factor), and uncertainty_factors (array of named factors with severity scores). Validate this schema immediately after generation. If the model outputs free-text without structured fields, reject the response and retry with a stronger format constraint. For high-risk domains such as clinical or legal applications, add a human review trigger when confidence_level is low or insufficient_evidence, or when uncertainty_factors contains items with severity above a configurable threshold. Log every confidence output alongside the evidence set, retrieval metadata, and the final decision (delivered, escalated, or rewritten) for auditability.
Retry logic should be conservative. If validation fails due to missing fields or unparseable JSON, retry once with the same evidence but a reinforced instruction emphasizing the required schema. If the model produces a confidence statement that contradicts the evidence—such as claiming high confidence when sources conflict—do not retry. Instead, flag the output for review and log the contradiction. Model choice matters here: use a model with strong instruction-following and structured output capabilities (such as GPT-4o or Claude 3.5 Sonnet with tool-calling mode) rather than a smaller model prone to format drift. For latency-sensitive applications, consider running the uncertainty prompt in parallel with the answer generation prompt, then merging results before user delivery. Always version your prompts and track which prompt version produced each confidence output so that regressions can be traced during incident review.
Common Failure Modes
What breaks first when expressing uncertainty from evidence and how to guard against each failure in production.
Overconfident Certainty When Evidence Is Weak
What to watch: The model assigns high confidence or uses definitive language when evidence is sparse, low-quality, or contradictory. This erodes user trust and creates liability in safety-critical domains. Guardrail: Require the prompt to output a structured confidence score with explicit evidence-strength thresholds. Add a post-generation validator that flags confidence scores above a calibrated cutoff when supporting passage count is below a minimum threshold.
Vague Hedge Language Without Specific Reasons
What to watch: The model produces generic uncertainty phrases like 'results may vary' or 'further research is needed' without citing which evidence gaps or source conflicts drive the uncertainty. Users cannot act on vague hedging. Guardrail: Constrain the output schema to require a list of specific uncertainty factors, each linked to a concrete evidence gap, source disagreement, or missing information type. Validate that every uncertainty statement references at least one identifiable gap.
Ignoring Source Disagreement Signals
What to watch: When multiple sources conflict, the model may silently pick one side or average claims without surfacing the disagreement. This hides risk from downstream decision-makers. Guardrail: Add an explicit conflict-detection step in the prompt that requires the model to enumerate disagreeing sources, describe the nature of each conflict, and reflect disagreement in the confidence score. Test with deliberately contradictory evidence sets.
Confidence-Answer Mismatch
What to watch: The model expresses high confidence in one sentence but qualifies or contradicts that confidence later in the response. Inconsistent signals confuse users and automated downstream consumers. Guardrail: Use a structured output format that separates the confidence statement from the answer body. Add an eval check that compares the confidence score against the presence of hedging language in the answer text, flagging mismatches for human review.
Missing Evidence Completeness Assessment
What to watch: The model expresses uncertainty about individual sources but fails to assess whether the evidence set as a whole is sufficient to answer the question. Partial evidence can still produce misleadingly confident answers. Guardrail: Require a separate evidence-sufficiency field in the output that rates overall completeness on a defined scale. Gate grounded answers behind a minimum sufficiency threshold, and route insufficient cases to a refusal or clarification path.
Domain-Inappropriate Uncertainty Thresholds
What to watch: A single uncertainty calibration fails across domains. Medical and legal contexts require higher evidence bars than general knowledge queries, but a generic prompt applies the same threshold everywhere. Guardrail: Parameterize the prompt with a domain-context variable that adjusts required evidence strength, source authority minimums, and confidence thresholds. Test calibration separately for each target domain using domain-specific eval sets.
Evaluation Rubric
Run these checks on a golden dataset of at least 50 query-evidence-answer triples with known confidence levels. Each criterion validates a specific dimension of uncertainty calibration.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Confidence Level Calibration | Predicted confidence level matches human-labeled level within one ordinal category on a 5-point scale for at least 85% of samples | Systematic overconfidence on low-evidence queries or underconfidence on high-evidence queries across more than 20% of the dataset | Compare model-assigned confidence label to human gold label per sample; compute confusion matrix and off-by-one accuracy |
Uncertainty Reason Grounding | Every stated reason for uncertainty cites a specific evidence gap, source conflict, or completeness issue that is verifiable in the provided evidence set | Generic uncertainty phrases such as 'sources may be incomplete' without linking to a specific missing fact or contradiction in the evidence | Human reviewer checks each uncertainty reason against the evidence set; flag any reason that cannot be traced to a concrete evidence property |
Overconfidence on Insufficient Evidence | When evidence is labeled insufficient by humans, the model expresses low confidence or refuses to answer in at least 90% of cases | Model assigns medium or high confidence to an answer when the evidence set contains no supporting passage for the core claim | Filter dataset to insufficient-evidence samples; measure proportion where confidence label is medium or high; threshold: less than 10% |
Underconfidence on Sufficient Evidence | When evidence is labeled sufficient and consistent by humans, the model expresses medium or high confidence in at least 85% of cases | Model assigns low confidence or refuses to answer when multiple authoritative sources clearly support the answer | Filter dataset to sufficient-and-consistent-evidence samples; measure proportion where confidence label is low or refusal; threshold: less than 15% |
Source Agreement Reflection | Confidence statement explicitly mentions source agreement level when multiple sources are present, and confidence direction matches agreement direction | Confidence statement ignores source conflict or agreement when two or more sources are provided, or confidence increases despite documented source contradiction | For samples with multiple sources, check that agreement or conflict is mentioned in the uncertainty explanation; verify confidence direction aligns with agreement |
Information Completeness Acknowledgment | When the evidence set lacks information required to fully answer the query, the output identifies at least one specific missing piece of information | Output expresses uncertainty but fails to name any specific missing fact, data point, or evidence type that would increase confidence | Human reviewer checks whether the uncertainty explanation names at least one concrete missing piece of information when the evidence set is labeled incomplete |
Refusal Quality on Unanswerable Queries | Refusal response explains why evidence is insufficient, names what is missing, and suggests what additional information would help, without fabricating an answer | Refusal is a bare 'I cannot answer' without explanation, or the model refuses but then provides a speculative answer anyway | Filter to unanswerable-query samples; check for presence of reason, missing-info identification, and absence of fabricated answer content |
Confidence Score Consistency | Confidence score changes by no more than one ordinal category when the same query-evidence pair is evaluated three times with temperature 0 | Confidence score varies by two or more ordinal categories across three identical runs, indicating instability in the uncertainty expression | Run each sample three times with temperature 0; measure maximum category difference per sample; flag samples where difference exceeds 1 |
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
Start with the base prompt and a single evidence set. Remove strict output schema requirements and use a simpler markdown format for the confidence statement. Focus on getting the uncertainty language right before adding validation layers.
codeYou are an evidence analyst. Given the [EVIDENCE] and [QUERY], produce a confidence statement that: - States your overall confidence level (High/Medium/Low) - Lists 2-4 specific reasons for uncertainty - Cites which evidence supports or fails to support the answer
Watch for
- Overconfident language when evidence is thin
- Missing specific reasons for uncertainty
- Generic hedging without citing evidence gaps
- Model defaulting to "I'm not sure" without explaining why

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