Agentic deep search in medicine: the ICD-Deepresearch system predicts future ICD codes

31 August 202610 views

A new approach combines EHR-based foundation models and language models with medical search to proactively determine diagnostic codes for the next visit. On the MIMIC-III and MIMIC-IV datasets, the system outperformed local comparators, and physicians rated its evidence as notably more useful than the results of standalone GPT-5 search.

Agentic deep search in medicine: the ICD-Deepresearch system predicts future ICD codes

When a physician prepares for an appointment, it helps to anticipate in advance what a patient is likely to present with. This is exactly the task that diagnosis prediction systems aim to solve: based on the history of past visits, they predict the ICD codes that may appear in the chart at the next encounter. One of the recent approaches is agentic deep research, where different models work together in a unified research pipeline.

What is the task?

This is prospective multi-label prediction. The system does not classify an existing note: the future note has not been created yet, so the model must rely solely on the patient's longitudinal history. At the same time, there may be multiple correct codes, and they may relate to both chronic and new conditions.

Classic solutions here usually fall into two types. Structured foundation models trained on electronic health records are good at capturing the recurrence of visits and the temporal dynamics of diseases. Language models, on the other hand, are strong at building flexible hypotheses close to clinical reasoning. But on their own, each loses part of the information.

A preprint on arXiv (2608.17075) describes the ICD-Deepresearch system, which attempts to combine both approaches. It is an agentic workflow: predictive models work together with medical search and code dictionaries, and the final answer is formed with consideration of external clinical relationships. Deep research here is not about returning links but about multi-step investigation: the system itself decides which sources to check and how to match them against the patient's history.

How the prediction works

No data source contains the "future set" of codes, so the system works within a top-K budget in advance. It estimates possible transitions from the patient's current state to future diagnoses, using three sources of signal: the medical history itself, external clinical associations, and the precise semantics of ICD codes.

Candidate generation

The first loop runs the SparseEHR model. It forms an EHR prior — a probability distribution over codes based on past visits. This prior becomes the starting point for two constrained rounds of research expansion: the system purposefully searches for additional clinical associations in external sources, without turning the search into an endless sweep.

In parallel, an independent path runs — direct prediction using GPT-5. It produces its own set of candidates that does not depend on the sparse model. This way, the two methods compensate for each other's weaknesses: one relies on formalized statistics, the other on language-based understanding of symptoms.

Final selection

The collected candidates undergo validation: the system removes duplicates, checks compliance with the ICD dictionary, and jointly ranks both sources. A separate module then composes textual justifications explaining why a particular code made it into the list. Importantly, this module does not affect the predictions themselves — it only makes the result more transparent for the physician.

What the experiments showed

Performance was evaluated on the intensive care datasets MIMIC-III and MIMIC-IV. Since there may be multiple correct codes, metrics were averaged per patient: this is closer to real clinical practice than the usual exact count across all predictions.

  • On MIMIC-III, precision was 24.60%, recall — 35.09%.
  • On MIMIC-IV — 25.14% and 48.32%, respectively.

Recall on MIMIC-IV is noticeably higher: the system more often finds the truly relevant codes, even if it does not avoid extra ones.

Separately, physicians assessed the usefulness of the documents the system retrieves to support the prediction. Here, ICD-Deepresearch noticeably outperforms standalone tools: 51% and 68% of documents were deemed useful, versus 22% and 39% for autonomous web search based on GPT-5 and 32% and 41% for Medical Deep Research.

Why this matters

The main takeaway of the study is that what is productive is not competition but collaboration between models. ICD-Deepresearch shows that structured medical statistics and language-based agentic search can work in a single chain: the ICD dictionary sets the framework, external sources add context, and justifications help the physician verify the line of reasoning.

For practice, this means earlier and more explainable prediction of diagnoses. The system does not replace clinical decision-making, but it reduces the risk of missing an important condition during an appointment. And so, in the future, such tools could become part of a physician's digital assistant — from resource planning to insurance processes.

Frequently asked questions

Agentic deep search in medicine: the ICD-Deepresearch system predicts future ICD codes