LongMedBench: Benchmarking Medical Agents for Long-Horizon Clinical Decision-Making

Zihan Xu, Yanzhen Chen, Xiaocheng Zhang, Zhiting Fan, Weiqi Zhai, Hongxia Xu, Zuozhu LiuarXiv 2026

TL;DR

LongMedBench is a new, real-world EHR-based benchmark designed to evaluate how well LLM-based medical agents handle long-horizon, longitudinal clinical decision-making. By transforming MIMIC-IV data into dense multi-visit event streams, it challenges models on factual retrieval, temporal reasoning, and complex clinical planning over extended patient histories.

What Problem Does This Paper Address?

While Large Language Models (LLMs) excel at short-context medical QA and basic tool use, real-world clinical practice looks very different. Medicine is inherently longitudinal: doctors don't just look at isolated symptoms; they synthesize information across multiple hospital visits, lab tests, and evolving treatments over months or years.

Existing medical agent benchmarks primarily focus on single-turn interactions or short context windows, treating clinical tasks like a static "needle in a haystack" retrieval problem. They fail to assess an agent's temporal sensitivity—the ability to understand how a patient's condition evolves over time and how that progression should dictate future care. LongMedBench bridges this gap by introducing a benchmark explicitly built around long-horizon clinical trajectories.

Table 1: Comparison of Medical Agent Benchmarks.

Methods

The authors developed a reproducible three-stage pipeline to convert static Electronic Health Records (EHR) into an interactive environment:

  1. Event & Patient Filtering: Cleans the data to keep only abnormal lab results and patients with complete records.
  2. Event Stream Construction: Organizes each patient's history chronologically into structured visits containing discrete medical events (admissions, lab tests, medications, imaging, and discharges).
  3. Memory Dataset Generation: Creates a tri-level memory architecture to test different granularities of history:
  4. Note Memory: High-level, compressed visit summaries.
  5. Event Memory: A flattened, chronological sequence of all raw clinical events.
  6. Contextual Memory: An LLM-style dialogue trajectory simulating real-time interaction during the current visit.
Fig. 1: Data processing pipeline for LongMedBench

Using these memory modules, the benchmark evaluates agents across three hierarchical task suites:

  • Factual QA: Tests precise retrieval of explicit timestamps or relative event details (e.g., identifying a specific medication from a past visit).
  • Temporal Reasoning: Challenges the agent to reconstruct the chronological order of events or entire visits.
  • Long-Horizon Decision-Making: Evaluates next-action prediction, argument prediction (e.g., ordering the correct lab panel), and discharge decisions based on the entire history.

Datasets

LongMedBench is built on top of the widely used MIMIC-IV public database. To ensure a truly long-horizon challenge, the authors filtered for patients with at least 15 hospitalizations. The final dataset comprises:

  • 335 patients
  • 6,999 total visits (averaging 19.72 inpatient visits per patient)
  • 314,294 medical events (averaging 44.91 events per visit)

Key Insights and Ideas

  • Explicit vs. Implicit Time: Advanced LLMs are highly capable of sorting events when explicit timestamps are provided. However, when timestamps are removed, their performance plummets. They struggle significantly with implicit temporal reasoning—understanding the logical clinical progression of a disease across multiple visits.
  • The Memory Augmentation Paradox: Implementing Retrieval-Augmented Generation (RAG) or specialized agent memory frameworks (like Mem0) improves factual retrieval tasks. However, these systems provide minimal to no benefit for actual clinical decision-making tasks.
  • Context Dependency: An agent's decision-making quality is heavily tied to its immediate context window rather than the total volume of historical data retrieved. As the history injected into the context grows, models often suffer from a "lost-in-the-middle" effect, leading to worse decisions.

Key Results

The authors evaluated several state-of-the-art models, including gpt-5-mini, qwen-turbo, and deepseek-v3.2 (with and without reasoning/thinking mode enabled).

  • Factual QA: Naive long-context performance degraded severely as history grew. For instance, qwen-turbo's explicit retrieval accuracy dropped from 0.88 (with a small history window) to 0.34 when given the full history.
  • Temporal Reasoning: In the event-level sorting task (visit_cloze), reasoning models achieved near-perfect scores (deepseek-v3.2-thinking scored 0.969 Kendall’s $\tau$). However, on the implicit visit_sorting task (ordering visits based purely on clinical notes without timestamps), the best score dropped sharply to 0.424.
Model performance drops significantly when moving from explicit event sorting to implicit visit sorting
  • Decision-Making: gpt-5-mini achieved the highest overall performance across decision tasks. Interestingly, enabling thinking patterns in deepseek-v3.2 did not significantly improve decision outcomes; instead, it made the agent more conservative, prompting it to ask questions rather than act on past memory.

Limitations and Future Work

The study highlights a profound limitation in current LLM architectures: existing memory-augmentation techniques (like RAG) fail to synthesize long-term clinical trajectories into actionable insights. The authors note that decision quality remains bottlenecked by the model's immediate reasoning capacity within its current context window.

Future work must focus on designing memory architectures that don't just store and retrieve isolated facts, but systematically index the complex, time-dependent relationships between clinical events.

Summary updated

BibTeX
@misc{xu2026longmedbench,
  author = {Zihan Xu and Yanzhen Chen and Xiaocheng Zhang and Zhiting Fan and Weiqi Zhai and Hongxia Xu and Zuozhu Liu},
  title = {{LongMedBench: Benchmarking Medical Agents for Long-Horizon Clinical Decision-Making}},
  year = {2026},
  eprint = {2607.09322},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.09322},
}
Figure