MedExAgent: Training LLM Agents to Ask, Examine, and Diagnose in Noisy Clinical Environments

Yicheng Gao1, Xiaolin Zhou2, Yahan Li1, Yue Zhao1, Ruishan Liu1

1University of Southern California · 2Arizona State University

Accepted to NeurIPS 2026

TL;DR

We model interactive diagnosis as a POMDP over questioning, exam ordering, and diagnosis with noisy observations and exam costs, then train an 8B MedExAgent via SFT+DAPO to match 70B baselines on OOD diagnostic accuracy.

Disclaimer

MedExAgent is a research prototype. It must not be used for medical advice or patient care.

Left: for a patient reporting exhaustion and low mood, a conversation-only LLM asks about sleep and appetite and diagnoses depression, while MedExAgent orders a TSH and free T4 test as a tool call and diagnoses hypothyroidism. Right: scatter plot of diagnosis Jaccard score (Jac) against model size on a log scale, where MedExAgent-8B sits above the baseline size trend, near Aloe-Beta-70B and above the other baselines.
FIG. 1MedExAgent overview. (a) Tool-augmented diagnostic reasoning enables correct diagnoses where conversation-only baselines fail. (b) On the OOD test set AgentClinic-MedQA, our 8B agent matches much larger baselines on Jac. Open full-size figure

1Environment and training

One episode mixes three kinds of action: the agent asks the patient questions, orders exams as tool calls, and ends the episode with a diagnosis. We formalize this as a POMDP in which noise enters through the observation function. MedExAgent starts from Meditron3-8B. It is first fine-tuned on synthetic doctor–patient conversations that follow the five-stage Calgary–Cambridge interview model, then trained with DAPO in the environment on a composite reward R = Rdx + 0.5·Rtool − 0.1·Rcost, which scores diagnostic accuracy, tool-call quality, and the financial cost and patient discomfort of unnecessary exams. Training uses DDxPlus and PMC-Patients-v2; AgentClinic-MedQA is held out as an out-of-distribution test set.

Sample conversation
  1. t=1 Ask

    Assistant“What brings you in today?”

    User“I feel exhausted, low mood …”

  2. t=2 Ask

    Assistant“How long have you felt this way?”

    User“About 3 weeks 1 week.”

    patient noise · Temporal Change

  3. t=3 Ask

    Assistant“Have you noticed any other changes?”

    User“I'm not really sure about that.”

    patient noise · Vague Answer

  4. t=4 Exam

    Assistant<tool_call> { "name": "hormone_level", "arguments": { "hormone": "tsh" } } </tool_call>

    ToolThe tsh level results: Findings are equivocal — elevated TSH. Cannot definitively rule out alternative interpretation.

    exam noise · Ambiguity cost tier 2 discomfort tier 1

  5. t=5 Exam

    Assistant<tool_call> { "name": "xray", "arguments": { "region": "chest" } } </tool_call>

    Tool“No significant findings.”

    cost tier 1 discomfort tier 1

  6. t=6 Dx

    Assistant[DIAGNOSIS: Hypothyroidism]The episode ends.

Method diagram. Top left: a POMDP in which a latent disease d generates noisy observations from the agent's actions (ask, order exams, final diagnosis). Top right: a finetuning pipeline from base model to SFT to RL with DAPO. Bottom: five Calgary-Cambridge conversation stages, with patient noise shown as 'Pain in my kidney' changed to 'stomach' and exam noise shown as 'High' changed to 'Normal' white cell counts.
FIG. 2Method overview. Top left: The interactive diagnosis POMDP, with latent disease d generating noisy observations ωt from agent actions at. Top right: Two-stage finetuning (SFT then DAPO RL). Bottom: Doctor–patient conversations follow the five-stage Calgary–Cambridge model, with patient and exam noise injected at rates pconv and pexam. Open full-size figure

Noise model

Patient responses are perturbed with probability pconv = 0.3 and exam results with pexam = 0.1, using seven patient noise types and three exam noise types drawn from error classifications in medical research. Noise is injected during both SFT data generation and RL rollouts.

Struck text is the recorded value. Red text with a dotted underline is what the agent observes.

Patient noisepconv = 0.3
Body Part SwapReports symptom location as an adjacent body part.“stomach liver pain”
Symptom ConfusionConfuses a symptom descriptor with a related but incorrect term.“burning tingling sensation”
Severity ChangeMisreports the intensity of symptoms, typically downplaying.“severe moderate headache”
Temporal ChangeMisreports symptom duration or onset time.“3 weeks 1 week”
OmissionFails to mention one symptom from a multi-symptom presentation.fever, cough, fatigue
Self-DiagnosisVolunteers an incorrect self-diagnosis based on lay sources.“I looked it up online and it seems like allergies.”
Vague AnswerGives evasive, non-specific responses to direct questions.“I'm not really sure about that.”
Exam noisepexam = 0.1
Body Part SwapReplaces an anatomical location in findings with an adjacent body part.“Inflammation in the stomach liver lining”
OmissionDrops one clause from multi-part findings.“Elevated WBC; low hemoglobin; normal platelets”
AmbiguityWraps findings in equivocal language indicating limited certainty.“Findings are equivocal — nodule in right lung. Cannot definitively rule out alternative interpretation.”

2Main results

As an in-distribution sanity check, MedExAgent-8B significantly outperforms every baseline on DDxPlus and PMC-Patients-v2 (p < 0.001 on all metrics). On the held-out AgentClinic-MedQA benchmark, MedExAgent-8B is statistically tied with the 70B Aloe-Beta on Sim, Jac, and Acc.

It also ties Qwen3-32B on strict accuracy (p = 0.857) and outperforms the remaining five baselines on Jac. At 8B parameters, MedExAgent matches the strongest medical specialist in the comparison at roughly 9× smaller parameter count. Significance is tested with a paired percentile bootstrap (B = 10,000) on the same split.

TABLE 1Diagnostic performance across three benchmarks. Sim is cosine similarity between embeddings of the predicted and ground-truth diagnoses; Jac is the LLM-judge Jaccard similarity (matched concepts divided by the union of predicted and ground-truth concepts); Acc is LLM-judge strict accuracy (1 if every ground-truth concept was matched, 0 otherwise). Bold marks the best result per column, underline marks the second best. Superscripts denote paired-bootstrap significance of MedExAgent-8B vs. the runner-up on Sim (B=10,000; *p<0.05, **p<0.01, ***p<0.001; no marker = not significant at p<0.05).
ModelDDXPlusPMC-PatientsAgentClinicOOD
SimJacAccSimJacAccSimJacAcc
General open-source
Llama-3.1-8B-Instruct0.6400.3830.6050.5070.1220.1570.5750.2250.298
Qwen3-8B0.6050.3280.4600.5320.0920.1200.5650.1530.219
Qwen3-14B0.6590.3990.5380.5650.1130.1430.6140.2260.284
Qwen3-32B0.6850.4660.6260.5510.1270.1570.6370.3100.368
Medical open-source
MedGemma-27B-text-it0.4980.2410.3250.4690.1080.1230.5440.2140.249
Aloe-Beta-70B0.7160.5030.6700.5900.1710.2190.6840.3950.395
HuatuoGPT-o1-70B0.6640.4100.4700.5340.1200.1240.6250.2380.249
Ours
MedExAgent-8B (Ours)0.953***0.937***0.939***0.626***0.345***0.314***0.6720.3780.378

3Exam cost

The reward charges each unnecessary exam for its financial cost and patient discomfort. On PMC-Patients-v2, MedExAgent orders 4.03 exams per case, close to the 3.46 exams in the recorded ground-truth workup.

0.100.200.30Jac on PMC-Patients-v2Exam cost relative to the recorded workup0.5×1.0×1.5×2.0×2.5×3.0×recorded workupLlama-3.1-8BAloe-Beta-70BQwen3-8Bw/o cost penaltyw/o noise injectionw/o tool-matchMedExAgent-8BMedExAgentablationsgeneralmedical baselinesunlabeled: other Table 1 baselines
FIG. 3Accuracy against exam cost. Jac on PMC-Patients-v2 against aggregate exam cost relative to the recorded ground-truth workup (dotted line). Hollow diamonds are ablations of MedExAgent; unlabeled points are the other Table 1 baselines.
Close to the recorded workup

Aggregate exam cost is 1.11× that of the recorded ground-truth workup on PMC-Patients-v2.

Paper, appendix cost table
Most cost-efficient

Lowest cost per correct diagnosis among all baselines (40.4; next lowest Aloe-Beta-70B at 65.8).

Paper, appendix cost table
Cost penalty needed

Without it, aggregate exam cost rises 2.6× (12.68 to 32.35), since the model also orders more expensive exams.

Ablation, paper Table 3

4Held-out noise at test time

To test robustness without leaking the noise types used in training, we use a different noise, false-negative, where the findings of each exam are removed with probability α. The reported false-negative rate is 7.8% for CT and 17.7% for chest X-ray. Performance degrades gradually as α grows, with a Jac drop of at most 0.032 when α ≤ 0.25. The variant trained without noise injection is worse than MedExAgent at every noise level, which suggests that training with noise helps the model avoid over-relying on individual exam results.

0.100.200.300.40Jac on PMC-Patients-v2False-negative rate α (each exam's findings removed)00.0350.0780.250.501.0α ≤ 0.25w/o noise injectionMedExAgent-8B
FIG. 4Robustness to false-negative noise. Jac on PMC-Patients-v2 as the rate α at which each exam's findings are removed grows. The shaded band marks α ≤ 0.25.
TABLE 4Jac on PMC-Patients-v2 under false-negative noise with rate α.
α0 (clean)0.0350.0780.250.501.0
MedExAgent-8B0.3450.3340.3390.3130.2710.202
w/o noise injection0.2690.2730.2570.2360.2250.156

Abstract

Real-world clinical diagnosis is a complex process in which the doctor is required to obtain information from both interaction with the patient and conducting medical exams. Additionally, the doctor needs to adapt to different patient personas, as well as noisy and incomplete information that can happen at any time during the process. However, existing benchmarks for medical LLMs and methods for automatic diagnosis largely simplify this process by reducing it to single-turn question answering, noise-free conversations, or sequential exam making, etc., ignoring the interactive and uncertain nature of clinical diagnosis. In this paper, we aim to address this gap by formalizing clinical diagnosis as a Partially Observable Markov Decision Process (POMDP) with three action types: questioning the patient, ordering medical exams as tool calls, and issuing a diagnosis. We also introduce a systematic noise model comprising seven patient noise types and three exam noise types.

Using our proposed environment, we train an effective diagnosis agent, MedExAgent, through a two-stage pipeline that first performs supervised finetuning on synthetic conversations structured after the Calgary-Cambridge model for clinical interviews, and then applies DAPO to optimize a composite reward capturing diagnostic accuracy, tool call quality, and exam cost including financial cost and patient discomfort. Through extensive experiments and ablation studies, we demonstrate that MedExAgent achieves diagnostic performance comparable to larger models while maintaining cost-efficient examination strategies.

Citation

BibTeX
@inproceedings{gao2026medexagent,
  title     = {MedExAgent: Training LLM Agents to Ask, Examine, and Diagnose in Noisy Clinical Environments},
  author    = {Gao, Yicheng and Zhou, Xiaolin and Li, Yahan and Zhao, Yue and Liu, Ruishan},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}