This prompt is for RAG system builders who need their application to distinguish between two distinct failure modes: genuinely contradictory evidence and simply insufficient evidence. In production, these states require different handling—conflicts might trigger a dissenting-views answer or human review, while gaps should trigger a new retrieval strategy or a clean abstention. The ideal user is an AI engineer or product developer integrating a knowledge base Q&A system where the cost of a wrong answer is high, such as in legal research, clinical decision support, or financial compliance. You should use this prompt when your retrieval pipeline returns multiple documents and you need the model to classify the answerability state before generating a final response, not after.
Prompt
Evidence Gap vs. Conflict Differentiation Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Evidence Gap vs. Conflict Differentiation Prompt.
Do not use this prompt when you have only a single source document, when retrieval quality is so poor that every query returns noise, or when your system already has a dedicated conflict resolution step downstream. This prompt is a classification and differentiation step, not a synthesis or resolution step. It works best when placed after retrieval and evidence ranking but before answer generation. Required context includes the user's original question, the full set of retrieved passages with source identifiers, and any domain-specific definitions of what counts as a conflict versus a gap. Without clear operational definitions of 'conflict' and 'gap' for your domain, the model will default to generic interpretations that may not match your product's risk tolerance.
Before deploying this prompt, define your four target states precisely: answerable (sufficient consistent evidence exists), conflicting evidence (multiple sources make contradictory claims on the same specific point), insufficient evidence (retrieved context is on-topic but lacks the specific information needed), and out-of-domain (the question falls outside the knowledge base's scope entirely). Write these definitions into the [CONSTRAINTS] placeholder. Also decide your tolerance for false positives on conflict detection—flagging a gap as a conflict will trigger unnecessary human review, while missing a real conflict may expose users to contradictory information presented as fact. Test with a golden dataset of at least 50 labeled examples covering all four states, including edge cases where sources partially overlap or use different terminology for the same claim.
Use Case Fit
Where the Evidence Gap vs. Conflict Differentiation Prompt works, where it fails, and the operational preconditions required before deployment.
Good Fit: High-Stakes RAG with Ambiguous Retrieval
Use when: your RAG system retrieves multiple documents and must distinguish between 'the answer is not in these documents' and 'these documents disagree.' Guardrail: Deploy when a wrong answer is worse than no answer. The prompt's classification output should gate the final user-facing response.
Bad Fit: Single-Source or Closed-Domain Lookups
Avoid when: the system always retrieves from a single authoritative source or a tightly controlled knowledge base where contradictions are impossible by design. Risk: The differentiation logic adds latency and token cost without benefit when the retrieval set is guaranteed consistent.
Required Inputs: Retrieved Context with Source Metadata
What you need: A list of retrieved passages, each with a unique source identifier, retrieval score, and document timestamp. Guardrail: Without source-level metadata, the model cannot attribute gaps or conflicts to specific documents, making the classification unreliable and un-auditable.
Operational Risk: Conflating Noise with Conflict
What to watch: Low-relevance retrieval results can appear contradictory when they are simply off-topic. The model may misclassify irrelevant passages as conflicting evidence. Guardrail: Pre-filter retrieved context with a relevance threshold before passing it to this prompt. Log cases where conflict is detected in low-relevance passages for human review.
Operational Risk: Over-Abstention on Minor Gaps
What to watch: The model may classify a question as 'insufficient evidence' when 95% of the answer is present and only a minor detail is missing. Guardrail: Implement a partial-answer policy. Allow the system to respond with explicit caveats for missing details rather than refusing entirely. Test abstention thresholds against user tolerance.
Operational Risk: Temporal Drift Masquerading as Conflict
What to watch: Two documents may state different facts because one is outdated, not because the evidence is genuinely contradictory. Guardrail: Include document timestamps in the input schema and instruct the model to check whether discrepancies are explained by recency before flagging a conflict. Route true temporal conflicts to a separate resolution workflow.
Copy-Ready Prompt Template
A reusable prompt that classifies a user question against retrieved context into one of four answerability states: answerable, conflicting evidence, insufficient evidence, or out-of-domain.
This prompt template is the core classification instruction for distinguishing between missing information and contradictory information in a RAG pipeline. It forces the model to reason about whether the retrieved context contains enough evidence to answer, whether that evidence disagrees, or whether the question falls outside the system's knowledge domain entirely. The template uses square-bracket placeholders for all dynamic inputs so you can drop it into a prompt assembly pipeline, a test harness, or an eval framework without modification.
textYou are a precise evidence classifier for a retrieval-augmented generation system. Your job is to determine whether a user's question can be answered from the provided context, and if not, to correctly identify why. ## INPUT **User Question:** [USER_QUESTION] **Retrieved Context:** [RETRIEVED_CONTEXT] **Domain Scope:** [DOMAIN_SCOPE] ## CLASSIFICATION RULES Analyze the retrieved context against the user question and classify into exactly one of the following states: ### ANSWERABLE - The retrieved context contains sufficient, consistent evidence to answer the question. - All relevant facts align across sources. - No contradictory claims exist on material points. ### CONFLICTING_EVIDENCE - The retrieved context contains evidence that directly contradicts itself on material facts needed to answer the question. - Sources disagree on claims, numbers, dates, or conclusions that matter for the answer. - This is NOT about missing information—it is about information that is present but inconsistent. ### INSUFFICIENT_EVIDENCE - The retrieved context does not contain enough information to answer the question. - Evidence is missing, partial, vague, or only tangentially related. - This is NOT about contradictory information—it is about information that is absent or too weak. ### OUT_OF_DOMAIN - The question falls outside the system's defined domain scope entirely. - Even with perfect retrieval, this system should not attempt to answer. - The question may be about a different domain, a disallowed topic, or outside the knowledge boundary. ## OUTPUT FORMAT Return a JSON object with exactly these fields: { "classification": "ANSWERABLE | CONFLICTING_EVIDENCE | INSUFFICIENT_EVIDENCE | OUT_OF_DOMAIN", "confidence": 0.0-1.0, "rationale": "Brief explanation citing specific evidence or gaps", "conflicting_sources": ["source_id_1", "source_id_2"] | null, "missing_information": ["what specific information is missing"] | null, "domain_check": "Why this is or is not within domain scope" } ## CONSTRAINTS - Do not answer the user's question. Only classify answerability. - If evidence both supports and contradicts the question, classify as CONFLICTING_EVIDENCE, not ANSWERABLE. - If evidence is present but too weak to answer confidently, classify as INSUFFICIENT_EVIDENCE. - Use the domain scope definition strictly. When in doubt about domain boundaries, lean toward OUT_OF_DOMAIN. - Cite specific source identifiers when flagging conflicts. - Confidence should reflect how certain you are about the classification, not about the answer itself.
Adaptation guidance: Replace [USER_QUESTION] with the raw user input. Populate [RETRIEVED_CONTEXT] with your retrieval pipeline's output, including source identifiers and passage text. Define [DOMAIN_SCOPE] concretely—for example, 'This system answers questions about US federal tax code only' or 'This system covers internal product documentation for AcmeCorp widgets.' The more specific the domain scope, the more reliable the OUT_OF_DOMAIN classification becomes. If your retrieval system does not return source identifiers, remove the conflicting_sources field or replace it with passage indices. For high-stakes domains, add a [RISK_LEVEL] placeholder that adjusts the confidence threshold for escalating to human review.
Before deploying this prompt, run it through a golden dataset of at least 50 labeled examples covering all four classification states. Pay special attention to boundary cases: weak evidence that could be misclassified as conflicting, domain-adjacent questions that could leak through as INSUFFICIENT_EVIDENCE instead of OUT_OF_DOMAIN, and genuinely conflicting evidence that the model might smooth over and mislabel as ANSWERABLE. Wire the output JSON into your application's routing logic so that CONFLICTING_EVIDENCE and OUT_OF_DOMAIN trigger different downstream behaviors—never collapse them into a single error path.
Prompt Variables
Required inputs for the Evidence Gap vs. Conflict Differentiation Prompt. Each placeholder must be populated before the prompt is assembled and sent. Validation notes describe how to verify the input is well-formed before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[USER_QUERY] | The original question or request from the end user that the system must classify for answerability | What were the Q3 revenue figures for the EMEA region? | Must be a non-empty string. Check for injection attempts, empty strings, or queries exceeding max token length for the classifier. |
[RETRIEVED_CONTEXT] | The set of passages, documents, or chunks returned by the retrieval pipeline for this query | ["doc_1": "Q3 EMEA revenue was $42M...", "doc_2": "EMEA revenue data is not available for Q3..."] | Must be a non-null array or object. Validate that each entry has a source identifier and text payload. Empty array is allowed and should trigger insufficient-evidence classification. |
[SOURCE_METADATA] | Per-document metadata including recency, authoritativeness, and document type for credibility weighting | {"doc_1": {"date": "2024-10-15", "source_type": "financial_filing", "authority": "high"}} | Must map to each source in RETRIEVED_CONTEXT. Validate date format, authority enum values, and that no source is missing metadata. Null allowed if credibility weighting is disabled. |
[DOMAIN_CONTEXT] | The domain or use-case label that adjusts classification thresholds and abstention rules | financial_reporting | Must match a known domain enum: financial_reporting, legal_review, clinical_notes, technical_docs, general_knowledge. Reject unknown values. Controls severity thresholds for conflict classification. |
[CLASSIFICATION_LABELS] | The set of allowed answerability states the model must choose from | ["answerable", "conflicting_evidence", "insufficient_evidence", "out_of_domain"] | Must be a non-empty array of strings. Validate that labels are mutually exclusive and cover all expected states. Default set shown in example is recommended. |
[CONFIDENCE_THRESHOLD] | The minimum confidence score required before the system can proceed without escalation or abstention | 0.85 | Must be a float between 0.0 and 1.0. Validate range. Values below 0.7 should trigger human review in high-stakes domains. Null allowed if threshold gating is handled downstream. |
[OUTPUT_SCHEMA] | The expected JSON structure for the classification output, including required fields and their types | {"classification": "string", "confidence": "float", "rationale": "string", "source_citations": ["string"]} | Must be a valid JSON Schema or example structure. Validate that required fields include classification, confidence, and rationale at minimum. Schema is used for format enforcement in the prompt and post-generation validation. |
Common Failure Modes
What breaks first when differentiating evidence gaps from genuine conflicts, and how to guard against it.
Conflating Silence with Disagreement
Risk: The model treats missing information as a contradiction, reporting a 'conflict' when one source is simply silent on the claim. This produces false conflict alerts that waste reviewer time. Guardrail: Require explicit claim presence in both sources before classifying as a conflict. Add a 'claim absent' state to the output schema and validate that conflict labels require at least two opposing excerpts.
Paraphrase Misclassification
Risk: Two sources state the same fact using different wording, and the model flags them as contradictory. Synonymy, granularity differences, or rephrasing trigger false positives. Guardrail: Include few-shot examples of paraphrased agreement labeled as 'consistent.' Add a pre-check step that asks: 'Do these two statements make the same factual claim?' before conflict classification.
Temporal Context Collapse
Risk: An older source states a fact that was true at the time, and a newer source states a different current fact. The model reports a contradiction instead of recognizing temporal progression. Guardrail: Require effective dates in source metadata. Add a temporal check rule: if sources have different effective dates and the claim is time-sensitive, classify as 'updated information' rather than 'conflict.'
Scope and Jurisdiction Blindness
Risk: Sources disagree because they cover different jurisdictions, product versions, or policy scopes, but the model treats this as an evidence conflict. Guardrail: Include scope metadata fields in the prompt context. Add a pre-classification check: 'Do these sources apply to the same scope?' If not, label as 'non-overlapping scope' rather than 'conflicting evidence.'
Confidence Inflation on Thin Evidence
Risk: The model assigns high confidence to a conflict or gap classification based on weak or incomplete retrieval, producing authoritative-sounding but wrong labels. Guardrail: Require a minimum number of relevant passages before making a classification. Output a confidence score tied to evidence density. If only one source addresses the claim, default to 'insufficient evidence' rather than any definitive label.
Out-of-Domain Overreach
Risk: The user asks a question outside the system's knowledge domain, and the model attempts to classify answerability using irrelevant or tangentially retrieved context. This produces misleading gap/conflict labels. Guardrail: Add an explicit 'out-of-domain' classification path. Check whether the question's domain matches the knowledge base scope before running conflict analysis. If the domain mismatch exceeds a threshold, abstain and route to clarification.
Evaluation Rubric
Use this rubric to evaluate whether the prompt correctly distinguishes evidence gaps from genuine conflicts. Run each criterion against a test set containing answerable, conflicting, insufficient-evidence, and out-of-domain examples before shipping.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Answerable Classification | Prompt outputs 'answerable' when retrieved context contains sufficient, non-contradictory evidence to fully answer [QUERY] | Prompt outputs 'conflicting_evidence' or 'insufficient_evidence' when a clear, supported answer exists in context | Run 20 answerable test cases with single-source and multi-source agreeing evidence; require >=95% pass rate |
Conflict Detection | Prompt outputs 'conflicting_evidence' when two or more sources make mutually exclusive claims on the same specific fact | Prompt outputs 'answerable' when sources directly contradict each other, or conflates conflict with difference in scope or granularity | Run 15 test cases with known contradictions (temporal, numerical, categorical); require >=90% recall on conflicts |
Gap vs. Conflict Separation | Prompt outputs 'insufficient_evidence' when context lacks information to answer [QUERY], not 'conflicting_evidence' | Prompt labels missing information as a conflict, or labels contradictory sources as merely insufficient | Run 10 gap-only cases and 10 conflict-only cases; require <=5% cross-type misclassification rate |
Out-of-Domain Rejection | Prompt outputs 'out_of_domain' when [QUERY] falls outside the system's defined knowledge scope, regardless of retrieved context | Prompt attempts to classify out-of-domain queries as 'insufficient_evidence' or hallucinates an answerability state | Run 10 queries from explicitly excluded domains; require 100% 'out_of_domain' classification |
Source Attribution in Conflict State | When outputting 'conflicting_evidence', prompt includes source identifiers and claim excerpts for each conflicting position | Conflict state returned without citing which sources disagree or what specific claims conflict | Parse output for source_ids array; require non-empty array with >=2 entries when state is 'conflicting_evidence' |
Confidence Score Calibration | Prompt outputs a confidence score between 0.0 and 1.0 that is lower for 'conflicting_evidence' and 'insufficient_evidence' than for 'answerable' | Confidence scores are uniformly high across all states, or scores are missing/null for non-answerable states | Calculate mean confidence per state across 50 test cases; require mean(answerable) > mean(conflicting) and mean(answerable) > mean(insufficient) |
Null Context Handling | Prompt outputs 'insufficient_evidence' when [RETRIEVED_CONTEXT] is empty or contains only irrelevant passages | Prompt outputs 'answerable' or 'conflicting_evidence' when no usable evidence is provided | Run 10 test cases with empty context array; require 100% 'insufficient_evidence' classification |
Schema Compliance | Output is valid JSON matching [OUTPUT_SCHEMA] with all required fields present and correctly typed | Output is missing required fields, contains extra untyped fields, or is not parseable JSON | Validate output against JSON Schema; require 100% structural validity across all test cases |
Implementation Harness Notes
How to wire the Evidence Gap vs. Conflict Differentiation Prompt into a RAG application with validation, logging, and escalation logic.
This prompt is a classification step that sits between retrieval and answer generation. It should be called after the top-k chunks are retrieved but before the final answer is synthesized. The model's job is to produce a structured classification label—answerable, conflicting_evidence, insufficient_evidence, or out_of_domain—along with a brief rationale. The downstream system uses this label to decide whether to proceed with answer generation, trigger additional retrieval, surface a conflict report, or escalate to a human queue. Treat this as a deterministic gate, not an optional annotation. The prompt must return a strict JSON schema so the application can parse the label programmatically without regex or fuzzy matching.
Wire the prompt into a dedicated classification function that accepts [USER_QUESTION] and [RETRIEVED_CHUNKS] as inputs. Validate the output against a JSON schema that requires classification (enum of four values), rationale (string), and confidence (float between 0.0 and 1.0). If the model returns malformed JSON, retry once with a repair prompt that includes the raw output and the schema. If the retry also fails, default to insufficient_evidence and log the failure for review. For high-stakes domains, add a confidence threshold: if confidence is below 0.7, route to a human reviewer regardless of the classification. Log every classification decision with the question, chunk IDs, classification, rationale, and confidence for audit and eval drift detection.
Model choice matters here. Use a model with strong instruction-following and JSON mode support (e.g., GPT-4o, Claude 3.5 Sonnet, or a fine-tuned Llama variant). Avoid smaller models that conflate gaps with conflicts—this is the most common failure mode. In your eval harness, build a test set with equal representation of all four classes, including edge cases where retrieved chunks are partially relevant but insufficient, and where two chunks genuinely contradict each other. Measure precision and recall per class, not just overall accuracy. A false positive on conflicting_evidence (classifying a gap as a conflict) is more damaging than a false negative because it triggers unnecessary escalation workflows. Set your eval thresholds accordingly and monitor classification distributions in production to catch drift early.
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 frontier model (GPT-4o, Claude 3.5 Sonnet). Remove strict output schema requirements initially. Test with 10-20 hand-picked examples covering clear answerable, clear conflicting, and clear insufficient-evidence cases.
codeClassify the answerability state for [QUERY] given [RETRIEVED_CONTEXT]. States: ANSWERABLE, CONFLICTING, INSUFFICIENT_EVIDENCE, OUT_OF_DOMAIN. Return state and brief reasoning.
Watch for
- Model conflating low-confidence evidence with conflicting evidence
- Over-classifying as INSUFFICIENT_EVIDENCE when partial answers are possible
- Missing OUT_OF_DOMAIN classification entirely

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