Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Myers, Skatje, Dligach, Dmitriy, Miller, Timothy A., Barr, Samantha, Gao, Yanjun, Churpek, Matthew, Mayampurath, Anoop, Afshar, Majid
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911112422752256
author Myers, Skatje
Dligach, Dmitriy
Miller, Timothy A.
Barr, Samantha
Gao, Yanjun
Churpek, Matthew
Mayampurath, Anoop
Afshar, Majid
author_facet Myers, Skatje
Dligach, Dmitriy
Miller, Timothy A.
Barr, Samantha
Gao, Yanjun
Churpek, Matthew
Mayampurath, Anoop
Afshar, Majid
contents Electronic health records (EHRs) are long, noisy, and often redundant, posing a major challenge for the clinicians who must navigate them. Large language models (LLMs) offer a promising solution for extracting and reasoning over this unstructured text, but the length of clinical notes often exceeds even state-of-the-art models' extended context windows. Retrieval-augmented generation (RAG) offers an alternative by retrieving task-relevant passages from across the entire EHR, potentially reducing the amount of required input tokens. In this work, we propose three clinical tasks designed to be replicable across health systems with minimal effort: 1) extracting imaging procedures, 2) generating timelines of antibiotic use, and 3) identifying key diagnoses. Using EHRs from actual hospitalized patients, we test three state-of-the-art LLMs with varying amounts of provided context, using either targeted text retrieval or the most recent clinical notes. We find that RAG closely matches or exceeds the performance of using recent notes, and approaches the performance of using the models' full context while requiring drastically fewer input tokens. Our results suggest that RAG remains a competitive and efficient approach even as newer models become capable of handling increasingly longer amounts of text.
format Preprint
id arxiv_https___arxiv_org_abs_2508_14817
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs
Myers, Skatje
Dligach, Dmitriy
Miller, Timothy A.
Barr, Samantha
Gao, Yanjun
Churpek, Matthew
Mayampurath, Anoop
Afshar, Majid
Computation and Language
Artificial Intelligence
Electronic health records (EHRs) are long, noisy, and often redundant, posing a major challenge for the clinicians who must navigate them. Large language models (LLMs) offer a promising solution for extracting and reasoning over this unstructured text, but the length of clinical notes often exceeds even state-of-the-art models' extended context windows. Retrieval-augmented generation (RAG) offers an alternative by retrieving task-relevant passages from across the entire EHR, potentially reducing the amount of required input tokens. In this work, we propose three clinical tasks designed to be replicable across health systems with minimal effort: 1) extracting imaging procedures, 2) generating timelines of antibiotic use, and 3) identifying key diagnoses. Using EHRs from actual hospitalized patients, we test three state-of-the-art LLMs with varying amounts of provided context, using either targeted text retrieval or the most recent clinical notes. We find that RAG closely matches or exceeds the performance of using recent notes, and approaches the performance of using the models' full context while requiring drastically fewer input tokens. Our results suggest that RAG remains a competitive and efficient approach even as newer models become capable of handling increasingly longer amounts of text.
title Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2508.14817