Medical LLMs in Hospitals: Clinical Decision Support Boundaries and Practices

    This article examines why general-purpose large language models produce unstable outputs in clinical scenarios and how hospitals should deploy them responsibly. Using a real obstetric case as a starting point, it explains three technical causes of misleading outputs, proposes a three-layer positioning that treats the model as a reminder rather than a decision maker, and outlines a minimal implementation architecture covering data ingestion, retrieval, generation, validation, and auditing. It also details a tiered evaluation framework, human accountability boundaries, and governance mechanisms for safe clinical use.

    1. A Real Case That Exposes the Core Problem

    A pregnant woman at 35 weeks of gestation presents with three days of vomiting, failed emergency treatment, and hypoglycemia. This is one of the most dangerous scenarios in obstetrics. Acute fatty liver of pregnancy (AFLP) has an insidious onset and rapid progression, and can quickly lead to liver failure and coagulopathy with high mortality. The treatment principle is to terminate the pregnancy as soon as possible. By contrast, common conditions such as hyperemesis gravidarum or gastrointestinal disease during pregnancy follow entirely different management pathways.

    In the original experience, four general-purpose LLMs produced two sharply different tendencies: two flagged a high suspicion of AFLP, while the other two leaned toward common benign causes. The clinician terminated the pregnancy promptly according to clinical guidelines, and the patient recovered well. Follow-up imaging one week later showed reduced liver density, confirming the early judgment from another angle.

    The real technical value of this case is not “who answered correctly,” but that it exposed an engineering fact: the output tendencies of general-purpose LLMs are unstable, and in medical settings this instability is amplified into decision risk. Therefore, when a hospital introduces an LLM, the question should not be “is the model accurate?” but rather “at which step, under what constraints, and with who accountable should it be used?”

    2. Why It Misleads: Three Explainable Technical Causes

    First, training corpus distribution bias. Common conditions are described far more frequently in text corpora than rare ones, so the model tends to output high-frequency answers, creating a systematic “common cause first” bias. Rare but high-risk diagnoses often occupy a very small share of the corpus.

    Second, prompt sensitivity and sampling randomness. For the same case, changing the narrative order, unit notation, or phrasing of the question can change the output; different sampling parameters can also shift the conclusion. Without a fixed evaluation set, this drift goes undetected.

    Third, lack of evidence constraints and retrieval verification. Purely parametric generation does not guarantee alignment with the latest guidelines and may produce plausible-sounding statements with no source. Medical scenarios need “traceable recommendations,” not fluent sentences.

    3. The Right Positioning: A Reminder, Not a Decision Maker

    A workable positioning is a three-layer structure:

    • Layer 1, rules and guideline engine: handles hard contraindications, dosage ranges, and critical value alerts, with deterministic and auditable logic.
    • Layer 2, retrieval-augmented generation: retrieves evidence from the in-hospital knowledge base and authoritative guidelines; the model only organizes and explains, and must include citations.
    • Layer 3, general-purpose LLM: provides “breadth reminders” for differential diagnosis, especially “which fatal diagnosis might be missed.”

    In the original case, the model’s value came precisely from the combination of Layer 2 and Layer 3: it pushed an easily overlooked obstetric emergency into the physician’s field of view. Its misleading tendencies were intercepted by the guideline rules in Layer 1 and the physician’s experience. This is the correct meaning of “assistance.”

    4. Implementation Architecture: From Data to Audit

    A practical minimal architecture includes the following modules:

    1. Data ingestion layer: connects to in-hospital systems using standard terminology codes, de-identifies data before it enters the retrieval store, and logs the entire process.
    2. Retrieval layer: builds indexes by department, disease, and guideline version; returned snippets must carry source and version number.
    3. Generation layer: enforces structured output with fixed fields, and explicitly returns “insufficient evidence” when evidence is missing.
    4. Validation layer: a rules engine checks outputs for contraindications and dosage, and blocks those that fail.
    5. Audit layer: records inputs, retrieved snippets, model version, outputs, and physician adoption results, forming a traceable closed loop.

    Illustrative output structure (pseudocode):

    1. {
    2. "differential": [
    3. {"name": "Acute fatty liver of pregnancy", "priority": "high", "evidence": ["Guideline snippet #12"], "missing": ["Coagulation function"]}
    4. ],
    5. "red_flags": ["Hypoglycemia", "Vomiting persisting >48h"],
    6. "confidence": "low",
    7. "note": "Insufficient evidence; additional laboratory tests required"
    8. }

    The key design principle is: rather output “insufficient evidence” than a definitive conclusion without a source.

    5. Evaluation Framework: Judge by Case Sets, Not by Feel

    A tiered evaluation set must be established before launch:

    • Rare high-risk case set: tests whether the model misses fatal diagnoses;
    • Common case set: tests whether it over-alerts on serious conditions and causes unnecessary intervention;
    • Adversarial set: rewrites narrative order, units, and typos to test stability;
    • Guideline consistency set: tests whether outputs conflict with a specified guideline version.

    For metrics, beyond accuracy, more attention should be paid to critical diagnosis recall, evidence citation accuracy, refusal rate, and output drift rate. A demo cannot replace evaluation, and success on individual cases cannot prove a system is reliable.

    6. Human Accountability Boundaries and Governance

    It must be clear that the model does not sign orders, does not place orders, and does not make independent decisions; all recommendations require physician confirmation. Two risks must be guarded against: first, “automation bias,” where physicians abandon independent judgment because of the model’s confident phrasing; second, “accountability ambiguity,” where it becomes impossible to locate whether an error originated in the data, retrieval, or generation step. For governance, establish mechanisms for version freezing, change review, periodic regression evaluation, and adverse event review.

    For cloud deployment, general-purpose category capabilities can be used: object storage holds de-identified corpora, a container platform hosts inference services, a message queue smooths traffic peaks, logging and monitoring with alerting ensure observability, and key management controls access permissions. Baidu AI Cloud also provides general-purpose infrastructure category capabilities in such scenarios, with the specific form to be evaluated according to in-hospital compliance requirements.

    7. Conclusion

    The right way to bring an LLM into a hospital is to constrain it to “breadth reminders plus evidence organization,” with a rules engine as a safety net, retrieval to ensure traceability, evaluation sets to quantify risk, and auditing to clarify accountability. With these in place, it can push rare, critical conditions into your view; without them, it is just a random text generator with a confident tone.