Imagine a world-class doctor. They’ve spent a decade in school, they know every symptom in the book, and they can diagnose a rare tropical disease from across the room. Now, sit that doctor down in front of a 15-year-old Electronic Health Record (EHR) system with a cluttered interface, three different login screens, and a "Save" button hidden in a sub-menu. Suddenly, they’re struggling.
This is the "GUI gap" in medical AI. We have models that can pass the USMLE, but they can’t actually use the software that runs modern hospitals. A new paper introduces MedUIGym, a massive interactive playground designed to teach AI agents how to stop just talking about medicine and start actually navigating the digital tools of the trade.
TL;DR
MedUIGym is a scalable environment that turns 17 different medical benchmarks into over 15,000 interactive tasks where AI agents must navigate a graphical interface (GUI) to complete clinical workflows. It reveals that while today’s models are "book smart," they struggle with the "visual tax" of clicking and typing through complex hospital software—but they can be trained to get much better at it.
What Problem Does This Paper Address?
Most medical AI research focuses on "text-in, text-out" tasks—like answering a multiple-choice question or summarizing a note. In the real world, however, clinical work is a series of actions: searching for a patient, filtering lab results, comparing a current CT scan to one from last year, and then clicking through menus to order a new test.
Current agents usually interact with medical data through "tool calls" (basically talking to a database via an API). But real EHRs are dense, visual, and messy. There is a massive need for agents that can "see" a screenshot and "act" with a mouse and keyboard. MedUIGym addresses this by providing a unified, verifiable environment where agents are judged not just on their final answer, but on whether they successfully navigated the interface to get there.
Methods
The researchers built a high-fidelity EHR sandbox that looks and feels like a real hospital application.
Key technical features include:
- Dual-Interface Evaluation: Agents can be tested using either the visual GUI or a "native tool" (direct database access). This allows researchers to measure exactly how much harder the visual interface makes the task.
- Scalable Trajectory Collection: The system can run many agents in parallel, recording their "trajectories" (the sequence of screenshots and clicks).
- Training Support: It supports both Offline Learning (Supervised Fine-Tuning from successful human/agent paths) and Online Reinforcement Learning (where the agent explores the environment and gets a "reward" for successfully saving an order or finding the right data).
Datasets
The authors didn't just create one new dataset; they unified 17 existing benchmarks into one format. This includes:
- Internal Training/Validation: 9,773 tasks from sources like MIMIC-III, eICU, and EHR-Complex.
- External Validation: 5,966 tasks from "out-of-distribution" sources like PhysicianBench and MedAgentBoard to see if the agents can generalize to software they haven't seen before.
- Total Scale: 15,739 tasks across six clinical families, ranging from simple information retrieval to complex clinical decision-making.
Key Insights and Ideas
- The "GUI Tax" is Real: Models perform significantly worse when they have to use the visual interface compared to direct database queries. For example, on one set of tasks, a model's score dropped from 64.7% (native tool) to 44.7% (GUI). Navigating menus is a skill in itself.
- "Thinking" Isn't a Silver Bullet: The researchers tested models with "thinking" enabled (like Qwen3.5-397B-Thinking). While it helped on complex queries, it actually lowered performance on some outcome prediction tasks. More reasoning doesn't always mean better clinical judgment.
- Workflows are the Final Boss: Models are decent at finding a single lab value. They are terrible at "workflows"—multi-step processes like assessing renal function, selecting an antibiotic, and documenting the decision.
- Training Works: By fine-tuning models on GUI trajectories using Reinforcement Learning (specifically a method called GRPO), the researchers saw massive improvements (up to +13 points), proving that "EHR navigation" is a learnable behavior for AI.
Key Results
- Top of the Class: GPT-6.1 Terra (max) was the frontier leader, achieving an average score of 76.6% across the internal benchmarks.
- Open Source Gains: After training in MedUIGym, the Qwen3.5-9B model saw its average score jump from 6.8% to 20.0%, a nearly 3x improvement.
- Error Patterns: Most failures weren't due to medical ignorance. Instead, agents suffered from "mistargeted actions" (clicking the wrong button) or "configuration errors" (messing up the filters in a search).
Limitations and Future Work
While MedUIGym is a huge step forward, the authors acknowledge it’s still a simulation. Real-world EHRs are even more chaotic, with network lag, pop-up alerts, and inconsistent data entry from human staff.
Future work will likely focus on:
- Long-horizon tasks: Workflows that span days or weeks of a patient's stay.
- Multi-agent collaboration: Having different AI agents handle different parts of the hospital (e.g., one for pharmacy, one for nursing).
- Reducing the "GUI Tax": Developing better vision-language models that can parse dense, text-heavy interfaces as easily as humans do.
Summary updated