Forward Deployed EngineeringAI EngineeringEvidence Sufficiency and Abstention

Design a doc-QA system for a healthcare customer that reliably says 'I don't know' instead of guessing.

Question 59 of 73 · Updated

On this page

Interview-ready answer#

I would build a selective, evidence-constrained question-answering system, not an unrestricted medical chatbot. Its objective is to maximize useful answers subject to an agreed bound on unsafe answers, rather than maximize the fraction of questions answered.

First, establish the permitted task: for example, finding and explaining approved hospital policies to authorized staff. Patient-specific diagnosis, treatment recommendations and urgent clinical requests require separate approved pathways. A document being available does not automatically authorize the application to give clinical advice.

For an in-scope question, retrieve applicable authoritative documents, check whether the evidence covers the material parts of the question, resolve source versions and conflicts, and generate a cited candidate response. Before showing it, verify that each material claim is supported by applicable evidence. If evidence is missing, conflicting, stale, inaccessible, or the question exceeds the approved scope, abstain or escalate. Use an empirically calibrated acceptance threshold in addition to hard safety gates.

I would not promise perfect abstention. I would demonstrate the system's safety envelope on representative and deliberately difficult cases, monitor unsafe answers after deployment, and keep high-consequence decisions under qualified human oversight.

1. Define when an answer is permissible#

Start by agreeing with clinical, privacy and operational owners on the intended users, document collection, jurisdiction, allowed tasks and escalation responsibilities.

RequestAllowed behavior
Find an approved administrative policyAnswer with applicable passages and document revision
Explain an ambiguous policy exceptionAnswer only if the exception is supported; otherwise ask a relevant clarification or escalate
Summarize an approved clinical documentOnly within the explicitly approved use case, with source limitations and professional review where required
Decide a patient's diagnosis, prescription or treatmentRoute to a qualified clinical pathway unless specifically authorized and validated for that use
Potentially urgent clinical situationTrigger the customer-approved urgent-help pathway; never require a successful document search first

An abstention is a useful outcome, not a silent failure. Distinguish insufficient evidence, unresolved conflict, unsupported scope, access failure and temporary dependency failure. Explain the reason without revealing restricted documents, and provide an approved next step. Do not imply that a human has received the case until the handoff is confirmed.

2. Make evidence sufficiency an explicit gate#

A high retrieval similarity score answers whether a passage resembles the question, not whether the passage is authoritative, complete or logically sufficient. The system needs an evidence contract:

  • Applicability: the source covers the correct facility, role, population, policy jurisdiction and relevant effective date.
  • Authority: the document is approved by the appropriate owner; draft, archived and superseded materials are handled according to a maintained source policy.
  • Completeness: required facts, exceptions, qualifiers and conditions are present. A passage can support one claim while leaving another unanswered.
  • Consistency: relevant applicable sources do not contain unresolved material contradictions.
  • Claim support: the proposed answer contains no material assertion beyond what the verified evidence supports.

Ingestion should preserve document identity, version, effective dates, approval status, section boundaries, tables and relevant access rules. Missing pages or unreliable OCR can create misleading evidence. Keep source passages and provenance available for review rather than relying on generated summaries alone.

For conflicting documents, use an owner-approved precedence policy. For example, a current facility-specific procedure may take precedence over an older general procedure for that facility if the governance policy explicitly says so. Do not assume the newest timestamp always wins. If two applicable sources conflict and precedence is not established, escalate to the responsible document owner rather than averaging their conclusions or selecting the most fluent passage.

3. Architecture: generate privately, release selectively#

Loading diagram…

Use access checks before retrieval and before disclosure. Treat source text as untrusted content, not instructions. The answer verifier should compare the candidate with the actual cited passages, including negation, numerical values, units, dates and qualifications. Use deterministic validation for machine-checkable facts and independently evaluated semantic checks for entailment.

A second LLM may make the same mistake as the generator; its approval is not proof of truth. Assess the combined system against qualified human judgments. If a verifier is unavailable or cannot establish support, the application must not bypass the gate. For higher-risk tasks, human confirmation is a hard requirement, not merely a higher numerical threshold.

4. Calibrate abstention as selective prediction#

Let the system assign a score s(x) to a candidate answer, where higher means more confidence in the answer meeting its defined evidence and safety contract. This could combine signals from evidence coverage, source applicability, contradiction detection and claim verification. Calibrate the score on human-labeled cases. Do not interpret a model's self-reported confidence, token likelihood or similarity score as a probability of clinical correctness without evidence.

Given an acceptance threshold t, accept only when all hard gates pass and s(x) ≥ t.

Define:

  • Coverage: accepted answers / all eligible test requests.
  • Selective risk: incorrect or unsafe accepted answers / accepted answers, using a prespecified error definition.
  • Unsafe-answer rate per request: unsafe accepted answers / all eligible test requests.
  • False abstention: abstentions on answerable, permitted cases / all such cases.

Track severity-specific risks separately; a missing minor administrative detail and a dangerous clinical instruction are not interchangeable. Report escalation rates and whether escalations successfully reached the correct team. If no answers are accepted, selective risk is undefined, not zero.

Illustrative risk–coverage decision#

Suppose a held-out suite contains 1,000 eligible document-QA requests, including answerable and unanswerable cases. The following outcomes are hypothetical.

Acceptance thresholdAcceptedUnsafe acceptedCoverageUnsafe selective risk
0.608002480%3.0%
0.80600660%1.0%
0.95350035%0 observed

With independent representative trials and a fixed acceptance policy, zero unsafe outcomes among 350 accepted answers yields an approximate one-sided 95% upper bound of 0.85% on unsafe selective risk (the exact zero-event calculation is 1 − 0.05^(1/350)). It does not prove zero risk. If the customer's maximum tolerated bound is 0.1%, this sample is insufficient even at the highest threshold.

Choose the threshold on a calibration set, then freeze the acceptance policy and evaluate it on a separate holdout. Do not select the most favorable threshold on the final test set and then treat its confidence interval as an independent validation. Handle correlated cases, sampling design and multiple risk slices appropriately. Optimize coverage only among settings meeting the required safety and uncertainty constraints; if none qualify, narrow the scope or require review.

A score calibration measured on one institution, document collection or query population does not guarantee performance in another. Revalidate after material changes.

5. Tested Python: fail-closed decision gate#

This small policy function assumes the scope and evidence flags come from independently implemented, validated application controls. It is not a medical classifier or a clinically calibrated predictor.

PYTHON
from math import isfinite def decide(scope, evidence_ok, conflict, claims_ok, score, threshold): if scope == 'urgent': return 'urgent_route' if scope != 'document_qa': return 'clinical_review' if evidence_ok is not True or conflict is not False or claims_ok is not True: return 'abstain' if any(type(x) not in (int, float) or not 0 <= x <= 1 or not isfinite(x) for x in (score, threshold)): return 'abstain' return 'answer' if score >= threshold else 'abstain'

Executed verification: Python 3.13.5 passed 15,552 synthetic combinations of four scope categories, three states for each evidence flag, and twelve values for each numerical input. Cases included missing flags, malformed scores, non-finite values, threshold equality, conflicts and urgent routing.

The tests establish the behavior of this decision gate, not the accuracy of the systems producing its inputs. An erroneous urgency classification or false evidence-verification result can still cause harm. In production, use trusted typed interfaces, independently validated scope screening, approved escalation handling, and a release-time configuration with calibrated thresholds. Never accept a model-controlled boolean as an authorization or evidence guarantee.

6. Evaluate unsafe answers, not just answer accuracy#

Have qualified healthcare-domain reviewers label answerability, applicable source evidence, permitted scope, acceptable answers and unsafe errors. Use independent annotation and adjudication for disputed cases. Evaluate the complete pipeline, including retrieval, generation, verification, routing and presentation.

Challenge sliceExpected behavior
Answer absent from approved documentsAbstain rather than fill the gap from model memory
Relevant passage omits a decisive exceptionAsk for needed context or abstain
Similar but different populations or facilitiesDo not generalize an inapplicable policy
Outdated versus current guidanceUse the applicable approved revision; escalate unresolved precedence
Contradictory authoritative guidanceWithhold the disputed answer and request review
Inaccurate quotation, negation, number or unitReject the unsupported candidate
Document access restricted or retrieval unavailableNo disclosure or unsupported answer; use approved fallback
Urgent or patient-specific requestCorrect clinical routing; assess missed escalation separately

Include answerable cases with close distractors, paraphrases and multilingual queries so conservative routing does not degenerate into rejecting everything. Measure retrieval evidence recall separately from final unsafe-answer rate to identify which component is failing.

Use representative held-out requests for population estimates, and separate adversarial or rare-risk challenge cases for targeted safety tests. Set acceptance limits by severity and risk slice before launch. Zero observed serious failures in a small curated challenge set is not a population guarantee. Validate clinical workflows and handoff timing with the customer; do not deploy an unsupported clinical function based on a benchmark alone.

7. Production trade-offs and governance#

A stronger verifier, deeper evidence search and human review may improve safety but increase latency and operational workload. Improve evidence retrieval and source quality before lowering the threshold to increase coverage. Cache only authorized, version-bound artifacts; a new document revision or policy change can invalidate an earlier answer.

Monitor coverage, false abstentions, unsafe accepted answers, unsupported citations, unresolved source conflicts, urgent-routing performance and review backlog. Sample accepted answers for human audit, not just abstentions. Keep document-owner feedback and incident-derived regressions in a versioned evaluation suite. If safety bounds or source-integrity checks deteriorate, restrict the affected capability and revalidate.

Minimize protected data in prompts, telemetry and audit records, and enforce customer-approved processing and access boundaries. Applicable healthcare privacy obligations and any medical-device or clinical decision-support requirements depend on the actual use case and jurisdiction; review them with the customer's qualified legal and clinical owners.

For an illustrative hospital policy assistant, if the question concerns a facility-specific procedure but the system finds only a general policy, a useful response is: "I couldn't verify the procedure for this facility in the approved documents. Please consult the applicable policy owner." That is safer and more actionable than an apparently authoritative guess.

Related questions

Explore other topics:AI AgentsAI System DesignLarge Language Models