MedExAgent is a research prototype. It must not be used for medical advice or patient care.
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.
-
t=1
Ask
Assistant“What brings you in today?”
User“I feel exhausted, low mood …”
-
t=2
Ask
Assistant“How long have you felt this way?”
User“About
3 weeks1 week.” -
t=3
Ask
Assistant“Have you noticed any other changes?”
User“I'm not really sure about that.”
-
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.
-
t=5
Exam
Assistant
<tool_call> { "name": "xray", "arguments": { "region": "chest" } } </tool_call>Tool“No significant findings.”
-
t=6
Dx
Assistant
[DIAGNOSIS: Hypothyroidism]The episode ends.
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.
| Body Part SwapReports symptom location as an adjacent body part. | “ |
|---|---|
| Symptom ConfusionConfuses a symptom descriptor with a related but incorrect term. | “ |
| Severity ChangeMisreports the intensity of symptoms, typically downplaying. | “ |
| Temporal ChangeMisreports symptom duration or onset time. | “ |
| OmissionFails to mention one symptom from a multi-symptom presentation. | fever, cough, |
| 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.” |
| Body Part SwapReplaces an anatomical location in findings with an adjacent body part. | “Inflammation in the |
|---|---|
| OmissionDrops one clause from multi-part findings. | “Elevated WBC; |
| 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.
| Model | DDXPlus | PMC-Patients | AgentClinicOOD | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Sim | Jac | Acc | Sim | Jac | Acc | Sim | Jac | Acc | |
| General open-source | |||||||||
| Llama-3.1-8B-Instruct | 0.640 | 0.383 | 0.605 | 0.507 | 0.122 | 0.157 | 0.575 | 0.225 | 0.298 |
| Qwen3-8B | 0.605 | 0.328 | 0.460 | 0.532 | 0.092 | 0.120 | 0.565 | 0.153 | 0.219 |
| Qwen3-14B | 0.659 | 0.399 | 0.538 | 0.565 | 0.113 | 0.143 | 0.614 | 0.226 | 0.284 |
| Qwen3-32B | 0.685 | 0.466 | 0.626 | 0.551 | 0.127 | 0.157 | 0.637 | 0.310 | 0.368 |
| Medical open-source | |||||||||
| MedGemma-27B-text-it | 0.498 | 0.241 | 0.325 | 0.469 | 0.108 | 0.123 | 0.544 | 0.214 | 0.249 |
| Aloe-Beta-70B | 0.716 | 0.503 | 0.670 | 0.590 | 0.171 | 0.219 | 0.684 | 0.395 | 0.395 |
| HuatuoGPT-o1-70B | 0.664 | 0.410 | 0.470 | 0.534 | 0.120 | 0.124 | 0.625 | 0.238 | 0.249 |
| Ours | |||||||||
| MedExAgent-8B (Ours) | 0.953*** | 0.937*** | 0.939*** | 0.626*** | 0.345*** | 0.314*** | 0.672 | 0.378 | 0.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.
Aggregate exam cost is 1.11× that of the recorded ground-truth workup on PMC-Patients-v2.
Paper, appendix cost tableLowest cost per correct diagnosis among all baselines (40.4; next lowest Aloe-Beta-70B at 65.8).
Paper, appendix cost tableWithout it, aggregate exam cost rises 2.6× (12.68 to 32.35), since the model also orders more expensive exams.
Ablation, paper Table 34Held-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 (clean) | 0.035 | 0.078 | 0.25 | 0.50 | 1.0 |
|---|---|---|---|---|---|---|
| MedExAgent-8B | 0.345 | 0.334 | 0.339 | 0.313 | 0.271 | 0.202 |
| w/o noise injection | 0.269 | 0.273 | 0.257 | 0.236 | 0.225 | 0.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
@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}
}

