---
title: 'MedGellan: Hybrid Human–LLM Diagnosis'
url: https://www.emergentmind.com/topics/medgellan
type: topic
---

# MedGellan: Hybrid Human–LLM Diagnosis

MedGellan is a lightweight, annotation-free hybrid human–LLM framework for high-stakes clinical diagnosis that generates intermediate clinical guidance from raw electronic health record data and uses that guidance to support diagnosis prediction by a physician. It is formulated for settings such as predicting discharge diagnoses from emergency department records, where the system digests triage notes and chest radiology reports, produces a structured and uncertainty-aware synthesis, and preserves the physician as the final decision-maker rather than automating diagnosis end to end [2507.04431].

## 1. Clinical role and design rationale

MedGellan is motivated by the observation that medical decision-making is a critical task in which errors can result in serious, potentially life-threatening consequences. In the setting described for the framework, the concrete prediction problem is a patient’s discharge diagnosis from EHR data, using emergency department triage notes and chest radiology reports as the primary evidence sources [2507.04431].

The framework is positioned against two alternatives. Fully automated systems are treated as problematic because errors can directly propagate to patient harm. “Learning-to-defer” and “learning-to-complement” frameworks are also identified as insufficient in this context because they often leave one agent—human or machine—entirely unassisted when making decisions. MedGellan instead assigns the LLM an assistant role: it digests raw clinical data and produces a structured, evidence-weighted guidance, while the human physician remains the final decision-maker and consults only the generated guidance [2507.04431].

A central operational choice is that the system avoids fine-tuning and manual annotation. This allows deployment off-the-shelf with current state-of-the-art LLMs and keeps computational and data-engineering costs to a minimum. This design also situates MedGellan as a practical hybrid framework rather than an end-to-end autonomous diagnostic model.

## 2. System architecture and information flow

MedGellan comprises two sequential modules. The first is guidance generation by an LLM; the second is diagnosis prediction by either a physician or a simulated physician LLM. The architecture is intentionally asymmetric: raw EHR evidence is exposed only to the guidance generator, whereas the downstream decision-maker receives only the synthesized guidance [2507.04431].

| Component | Inputs | Output or task |
|---|---|---|
| Guidance generation | Triage note; chest radiology report | Structured summary of most probable clinical concerns, qualitative confidence levels, and differential diagnoses |
| Diagnosis prediction | Guidance only | Assign a set of ICD-10 codes restricted to chapter and category levels |

The triage note corresponds to emergency department admission information, including patient complaints, vital signs, and early observations. The chest radiology report is incorporated if performed during the emergency department stay. The LLM processes these inputs in three phases and emits a concise “posterior summary.” That summary is structured to list the most probable clinical concerns with qualitative confidence levels—high, moderate, or low—and, when appropriate, differential diagnoses [2507.04431].

The downstream module takes only this guidance as input. The physician does not need to review raw notes or images and instead focuses on an LLM-curated synthesis. This suggests a redistribution of cognitive workload from raw-document review to judgment over a condensed, explicitly uncertainty-aware representation.

## 3. Bayesian-inspired prompting and guidance representation

The core prompting strategy is Bayesian-inspired and is designed to respect the temporal order of clinical data: triage precedes radiology. The guiding relation is presented as

$$
P(\text{diagnosis} \mid \text{Triage}, \text{Radiology}) \propto P(\text{Radiology} \mid \text{diagnosis}) \cdot P(\text{diagnosis} \mid \text{Triage}).
$$

In prompt form, the LLM is instructed to perform three steps: first, formulate a “Prior Hypothesis (Triage Data)” from vital signs and symptoms; second, carry out a “Likelihood Adjustment (Radiology Findings)” in which each imaging finding is weighed proportionally as evidence that reinforces or contradicts the prior; and third, produce a “Posterior Summary (Guidance for Diagnosis)” that integrates both sources into an evidence-weighted summary with uncertainty annotations [2507.04431].

The process can be formalized as

$$
\text{Posterior}(H) = P(H \mid E_{\text{prior}}, E_{\text{new}})
\propto P(E_{\text{new}} \mid H) \cdot P(H \mid E_{\text{prior}}),
$$

where $H$ denotes a clinical hypothesis such as pneumonia, $E_{\text{prior}}$ the triage evidence, and $E_{\text{new}}$ the radiology evidence. The point of the formalization is not exact probabilistic calibration; rather, it structures the prompt so that the LLM updates sequentially rather than conflating heterogeneous evidence sources.

The generated guidance uses a multi-section format. It includes an Initial Clinical Suspicion based on triage, Evidence-weighted Updates from imaging, and a Refined, Uncertainty-Aware Summary. That summary may list, for example, high-likelihood conditions, moderate- or low-likelihood differentials, and key risk factors or contraindications. Reliability is encouraged through explicit prompt constraints: the model is told to “weigh each new piece of evidence proportionally,” “provide qualitative confidence levels,” and “do not commit to a single diagnosis” [2507.04431].

## 4. Annotation-free operation and deployment assumptions

MedGellan is annotation-free in the specific sense that it requires no manually labeled guidance and no fine-tuning data. The framework relies entirely on prompt engineering applied to a pre-trained LLM. This distinguishes the method from systems that require a bespoke supervision pipeline for intermediate representations [2507.04431].

Two assumptions are explicit. First, the LLM must have sufficient medical knowledge to interpret both triage text and radiology reports. Second, temporal coherence must be enforceable through prompt ordering that mimics Bayesian updating. Under these assumptions, the framework is intended to scale readily to new care settings and modalities without additional labeling effort [2507.04431].

The practical implication is a particular deployment profile: low data-engineering overhead, no requirement for task-specific guidance annotation, and compatibility with state-of-the-art LLMs used off the shelf. A plausible implication is that the system is most attractive in settings where annotation bottlenecks rather than model availability are the dominant barrier to experimentation.

## 5. Experimental configuration

The empirical study combines three MIMIC resources: MIMIC-IV for discharge diagnoses with approximately 300 K patients, MIMIC-IV-ED for emergency department triage notes with approximately 400 K stays, and MIMIC-CXR for chest radiograph reports with approximately 377 K images. After filtering to emergency-department-only stays with one radiology test and complete discharge codes, 1,366 unique admissions remained [2507.04431].

The target labels are ICD-10 codes at Chapter (level 1) and Category (level 2) granularity. The guidance generator is Llama 3–70B. The diagnosis predictors used as simulated physicians are Llama 3–8B, Llama 3–70B, Gemma 2–27B, and Qwen 2–72B. Three baselines are evaluated: Triage only; Triage + Radiology directly, with no guidance; and Full MedGellan, with guidance [2507.04431].

The reported metrics are precision, recall, and $F_1$ score at both micro and macro levels:

$$
\mathrm{Pr} = \frac{TP}{TP + FP}
$$

$$
\mathrm{Rec} = \frac{TP}{TP + FN}
$$

$$
F_1 = \frac{2 \cdot \mathrm{Pr} \cdot \mathrm{Rec}}{\mathrm{Pr} + \mathrm{Rec}}
$$

Micro averaging aggregates counts across labels before metric computation, whereas macro averaging averages per-label metrics. This metric design is relevant because the study evaluates multilabel ICD-10 prediction across two levels of label granularity.

## 6. Empirical results and interpretation

For the Category-level, micro metrics with Llama 3–8B as simulated physician, the reported values are: Triage only, $\mathrm{Pr}=0.11$, $\mathrm{Rec}=0.03$, $F_1=0.05$; Triage + Radiology directly, $\mathrm{Pr}=0.07$, $\mathrm{Rec}=0.01$, $F_1=0.02$; Guidance (MedGellan), $\mathrm{Pr}=0.19$, $\mathrm{Rec}=0.09$, $F_1=0.12$ [2507.04431].

The main qualitative findings are consistent across the evaluation. Adding guidance roughly doubled or tripled recall and $F_1$ compared with both baselines across all four simulated-physician LLMs. Precision sometimes dips slightly, but gains in recall—the more critical metric in high-stakes care—produce net improvements in $F_1$. The improvements are reported to hold for both Chapter and Category levels and for both micro- and macro-averaged scores [2507.04431].

No formal statistical-significance tests are reported, but the consistency across models and metrics is presented as indicating a robust effect. Because the experiments are described as preliminary, the results are best interpreted as evidence that structured intermediate guidance can improve downstream diagnostic performance under controlled conditions, rather than as definitive validation of clinical deployment.

## 7. Limitations, future directions, and related nomenclature

Several limitations are explicit. Although the framework is human-in-the-loop in concept, the experiments use LLMs to simulate physicians; user studies with real clinicians are needed to validate clinical utility and trust. The current input space is restricted to textual triage and radiology reports, and extension to raw images or broader multimodal inputs such as lab results and vitals time-series is proposed as future work. The evaluated scope is also narrow: emergency department stays with a single radiograph; other care settings, including ICU and wards, as well as repeated imaging, remain untested [2507.04431].

Model risk is treated directly. LLM guidance may omit rare diagnoses or introduce spurious correlations, so monitoring and fail-safe triage are required. Performance is also sensitive to prompt design, and automating prompt optimization, for example via reinforcement learning from human feedback, is identified as a promising direction. These constraints locate MedGellan within a supervised-clinician workflow rather than a stand-alone diagnostic pathway [2507.04431].

A recurrent source of confusion is the similarity between the names *MedGellan* and *medigan*. They are unrelated systems. MedGellan is a hybrid human–LLM framework for generating clinical guidance from EHR and radiology text to support diagnosis prediction [2507.04431]. By contrast, medigan is an open-source, framework-agnostic Python library of pretrained generative models for medical image synthesis, with 21 pretrained models spanning 4 imaging domains, 11 public datasets, and 9 GAN-style architectures [2209.14472]. The distinction is substantive: MedGellan addresses clinical guidance and physician-supported diagnosis, whereas medigan addresses synthetic medical image generation and model reuse.

Source: https://www.emergentmind.com/topics/medgellan