TL;DR
When an AI agent searches an electronic medical chart and says there is "insufficient evidence" for a clinical claim, is it being scientifically rigorous, or did it just botch its database query and find nothing? PatientFlowSynth introduces a controlled, replay-validated benchmark of matched patient charts to tease apart retrieval, citation, and interpretation—revealing that fixing an agent's search bugs can paradoxically expose deep reasoning flaws that were previously hidden behind empty search results.
What Problem Does This Paper Address?
Modern healthcare systems share clinical data using FHIR (Fast Healthcare Interoperability Resources), a standard that structures medical histories into typed, linked records. Building AI agents to query these records is tricky because finding a record doesn’t mean understanding it. Lifecycle status fields change everything: a MedicationRequest is an order, not proof a drug was taken; an Observation marked entered-in-error isn’t a negative test result; and a "completed" hospital visit is counterintuitively encoded in FHIR as status=finished (completed isn't even a valid Encounter status!).
Standard medical QA benchmarks largely grade final answer accuracy. That single number blurs together vastly different failure modes: querying the wrong scope, citing too few records, misreading status fields, or claiming an event never happened after an incomplete search.
Methods
Instead of tweaking user questions against a static database, the authors flip the script: they freeze the natural-language question and an underlying, hidden executable retrieval program, and systematically mutate the patient’s chart.
For any given clinical claim (e.g., receiving an HPV vaccine during the last urgent-care visit), a compiler edits record status fields or inserts records to generate a matched family of four chart variants corresponding to Belnap’s four-valued logic: supported, refuted, insufficient_evidence, and conflicting_evidence. Every variant is replay-validated against the hidden program—along with family-level consistency checks—to mathematically guarantee ground-truth labels and evidence sets.
During evaluation, agents use read-only FHIR tools to inspect one chart and output JSON labels plus cited record IDs. The benchmark decomposes grading into separate endpoints:
- Exact answer: Getting the classification label(s) right.
- Evidence sufficient: Citing valid records that reproduce the reference answer.
- Complete search: Proving via tool logs that the agent executed an unpaginated, full-scope search (crucial before claiming evidence is missing).
- Strict success: Nailing all of the above—exact answer, complete required searches, and citations exactly matching a verified minimal witness set.
Datasets
- PatientFlowSynth (New): 18,000 tasks built from 225 synthetic patient histories (generated via Synthea) across 18 templates, spanning Conditions, Immunizations, and Observations. Unlike prior contrast-set benchmarks that alter prompts, PatientFlowSynth holds prompts fixed across 7,200 controlled chart variants. A 191-patient dev/train split (15,280 tasks) is public; a 34-patient test set remains private.
- External Evaluation: 74 real, deidentified patient records from the MIMIC-IV-on-FHIR demo (v2.0), adapted into four-state laboratory and procedure task families.
Key Insights and Ideas
- Failed retrieval masks bad reasoning: The standout "aha" moment comes from giving agents a simple routing hint: telling them a completed visit uses
status=finished. Overall strict success jumped, but accuracy oninsufficient_evidenceclaims plummeted. Why? Without the hint, agents queriedstatus=completed, got zero visits back, and guessedinsufficient_evidence—getting the right answer by pure luck! Once the hint helped them find the visit, they saw irrelevant or non-supporting clinical records inside it and hallucinated positive or conflicting labels. - Incomplete hints can backfire: In a study testing short 110-character guidance notes, giving full status rules helped, while an incomplete note for Observations (which omitted rules for cancelled/nonfinal records) actively harmed performance across models by encouraging unsupported positive claims.
- Per-task validation isn't enough: Fault-injection tests showed that checking tasks individually missed subtle corruptions across matched pairs (accepting 1,536/1,536 faulty variants), whereas family-level invariants caught 100% of injected mismatches.
Key Results
- Primary Study (GPT-5.6 Luna, 3,600 matched pairs): Adding explicit
status=finishedguidance lifted strict success from 40.7% to 51.3% (+10.6 percentage points). Meanwhile, label agreement on primaryinsufficient_evidencecases dropped from 49.2% to 29.3%, even as target Encounter retrieval rose from 661/900 to 900/900. - Replication & Cross-Model Variance: A two-model replication reproduced both effects: strict success rose +11.1 points for Luna and +44.5 points (35.9% to 80.4%) for GPT-5.6 Terra, while missing-evidence agreement dropped 13–30 points. However, benefits were model-dependent: Qwen3.8-27B saw minimal change (+1.4 points) because it already retrieved the visit 99.5% of the time without hints, and exploratory runs on Claude Opus 4.8 (+1.6) and Gemini 3.1 Pro Preview (−3.7) showed mixed sensitivity.
- External MIMIC-IV-on-FHIR Study: When search/citation rules were visible, supplying the full lifecycle status mapping boosted strict success from 62.7% to 97.1% (Luna) and 62.5% to 99.2% (Terra).
- Clinical Review: Two independent clinicians agreed with each other on 22/24 selected cases ($\kappa = 0.875$) and matched the benchmark's reference labels on 22/24 and 24/24 cases.
Limitations and Future Work
The 18,000 tasks stem from structured templates and synthetic Synthea records; balanced four-state families are controlled diagnostic probes, not reflections of real-world hospital frequencies or clinical safety. Current executable rules only evaluate structured FHIR fields, meaning they do not recognize free-text clinical notes as equivalent to structured lab records, nor does the scorer stitch together paginated tool responses. Future directions include testing LLM-paraphrased questions (ensuring meaning and difficulty stay intact) and expanding cross-family multi-step benchmarks.
Summary updated