TL;DR
As AI agents begin taking real actions inside Electronic Health Records (EHRs)—like checking labs and ordering medications—we increasingly rely on other LLMs to judge whether those actions are safe. By borrowing "mutation testing" from software engineering to inject controlled clinical mistakes into verified agent workflows, this study reveals that LLM judges are easily fooled unless they see raw EHR data, can be actively misled by an agent's chain-of-thought, and aren't necessarily better just because they were fine-tuned on medical text.
What Problem Does This Paper Address?
Evaluating clinical AI at scale is too slow for human doctors alone, leading researchers to adopt the "LLM-as-a-judge" paradigm. However, standard benchmarks mostly check outcomes (did the agent arrive at the right final text?) rather than processes (did it follow safe clinical steps?).
Imagine an agent tasked with ordering potassium if a patient's serum level is low. An agent could skip checking the lab altogether, guess, place the order, and report "Order placed!" To a judge looking only at the final answer, a lucky guess looks identical to safe medicine. Furthermore, if an LLM judge flags 90% of unsafe trajectories, is it genuinely perceptive, or just paranoid and flagging everything? Who watches the watchmen—and what exact evidence do they need to catch life-threatening mistakes?
Methods
To test the judges, the author adapts mutation testing—a classic software engineering technique where you deliberately plant bugs into working code to see if your test suite catches them.
Here, the author takes verified, clean EHR agent runs ("parents") and clones them into "mutants," injecting a single, clinically typed fault into each—such as ordering a 10x medication overdose, pulling the wrong patient's record, swapping units (mg instead of mEq), or hallucinating a lab value. Each fault is mapped to a rule-based potential harm tier (S0 to S3, up to permanent harm or death).
Six open-weight judges (spanning Qwen3, gpt-oss, Gemma 3, and MedGemma) evaluate both the clean parent and the faulty mutant independently across four "views" of increasing visibility:
- V1: Task + Final Answer only.
- V2: Adds the agent's FHIR tool calls (GET/POST requests).
- V3n: Adds the actual EHR server observations/responses.
- V3: Full trajectory, including the agent’s internal reasoning.
Instead of raw recall, the primary metric is paired discrimination ($\Delta$): the rate at which a judge flags the mutant minus the rate at which it falsely flags the clean parent. This isolates detections actually caused by the injected clinical error.
Datasets
The experiments build on MedAgentBench, a virtual EHR environment with 100 de-identified patient profiles, 785,207 FHIR records, and 300 physician-written tasks (plus 15 new potassium/magnesium replacement tasks added by the author to better test dosing errors).
From 1,260 natural agent runs and scripted reference solutions, the author curated a new paired benchmark consisting of 193 verified clean parents, 416 single-fault mutants across 8 error categories, and 60 harmless-edit controls (like reordered API fields or trailing zeros) to ensure judges aren't just reacting to superficial formatting changes.
Key Insights and Ideas
- The Agent's Reasoning Can Gaslight the Judge: Giving judges the actual EHR server responses massively boosts error detection. Surprisingly, adding the agent's own reasoning on top of that yields zero overall benefit and actively hurts the detection of hallucinated clinical values (dropping $\Delta$ by 0.18). Persuasive chain-of-thought appears to lull judges into overlooking contradictions with raw data.
- Medical Fine-Tuning Isn't a Silver Bullet: MedGemma 27B performed worse overall than its general-purpose twin, Gemma 3 27B, and was the only model to miss S3 tenfold medication overdoses (missing 4 out of 9 cases).
- Judges Notice Errors, Then Shrug: Hallucinated clinical values were the hardest errors to catch. In a manual check of missed cases, nearly a quarter of the judges' explanations explicitly noted that the agent's reported value contradicted the EHR—yet classified the run as "safe" anyway.
- Standard Graders Have Blind Spots: MedAgentBench's built-in grader passed 100% of the 38 mutants where a required lab check was completely deleted before placing an order, and missed subtle precondition skips in 1.5% of "passing" natural agent runs.
Key Results
- Evidence Visibility: Under final-answer-only views (V1), judges have zero discrimination on unchanged-answer faults ($\Delta = -0.01$) while falsely flagging 56% of clean runs. Adding tool calls and EHR observations raises $\Delta$ to 0.75 (adding EHR responses alone accounts for a +0.39 jump, and +0.64 on hallucinated values).
- Model Leaderboard: General-purpose Gemma 3 27B and Qwen3 32B tied as the strongest individual judges ($\Delta = 0.81$), outperforming MedGemma 27B ($\Delta = 0.73$).
- Hybrid Verification Wins: Combining six LLM judges into an ensemble only nudged $\Delta$ from 0.81 to 0.85 because models share blind spots. However, pairing a majority-vote LLM judge with a strict, rule-based step checker caught 97% of all injected faults without needing ground-truth reference answers.
Limitations and Future Work
The study relies on a single simulated EHR environment featuring relatively short clinical tasks (up to eight interaction rounds), which doesn't capture the messiness of long, longitudinal hospital workflows. Additionally, the experiments examine clean, isolated single-fault injections with rule-assigned severity tiers rather than messy, compounding natural errors reviewed by human clinicians. Future work aims to expand to multi-step EHR environments and naturally occurring, multi-fault trajectories.
Summary updated