Care operations · Research feature

Large Language Model-Based Generation of Discharge Summaries

A study comparing five large language models found proprietary systems like Gemini produce more accurate discharge summaries than open-source alternatives.

Adapted from research by Tiago Rodrigues, Carla Teixeira Lopes.

arXiv preprint revision · 2025-12-07 · Attribution & reuse
In this article
Editorial illustration of stack of documents.

Editor’s introduction

The research evaluated five large language models—Mistral, Llama 2, GPT-3, GPT-4, and Gemini 1.5 Pro—using clinical discharge summaries from the MIMIC-III dataset. Performance was measured through exact-match, soft-overlap, and reference-free metrics, with Gemini achieving the highest similarity to gold-standard summaries using one-shot prompting. Human evaluation confirmed the clinical relevance of summaries generated by proprietary models. These findings indicate that current LLMs, particularly proprietary ones, are viable for discharge summary generation under strict data privacy protocols, though real-world deployment requires further refinement in reliability and accuracy.

Introduction

When a patient is admitted to a hospital, critical information is documented in clinical notes. These notes are crucial for tracking a patient’s issues and progress and facilitate information sharing among medical professionals. Upon discharge, these notes are compiled into a discharge summary, a comprehensive document that includes all the essential details captured during a patient’s admission, his hospital course, final diagnosis, and follow-up care. This process, however, is cumbersome and time-intensive, requiring clinicians to invest significant amounts of time analyzing and summarizing vast amounts of information, an activity which can be prone to errors or misjudgment. This workload adds to the already high demands on healthcare providers, contributing to exhaustion and reducing the time available for direct patient care.

Fortunately, in recent years, advancements in Large Language Models (LLMs) have made them highly competitive in a myriad of Natural Language Processing tasks, including Information Extraction, Text Generation, and Summarization. These advancements have made them competent in the problems clinicians face, making it possible to automate this process. While limited context windows previously restricted their applicability, recent models such as GPT-4 and Google’s Gemini 1.5 Pro improved their limits significantly, enabling the processing of entire sets of notes in one go.

Summarization is a Natural Language Processing (NLP) task that aims to distill key information from a larger body of text by preserving its essential content. Approaches can be extractive, selecting key sentences from the original text, or abstractive, generating new sentences that convey the original meaning in a condensed format. This task can also be classified as either single-document or multi-document summarization, depending on the data source.

Summarization has a growing prevalence in the clinical field, where it has been applied to medical evidence from research articles, synthesizing a discharge report into a discharge summary, and generating brief hospital course sections of discharge summaries. Popular models include decoder-only architectures such as GPT-3.5, and seq2seq models like BART, T5, and BERT2BERT.

Discharge summary generation has been a topic of rising research interest, but it doesn’t yet have a significant body of work. An article by established in 2021 the task of hospital-course summarization and identified important features to be considered when approaching it. In the same year, one of the first works generating discharge summaries from prior notes was published by Shing et al.. More recently, the shared task by Xu et al. extended this line of work with new developments. Some attempts to automatically generate a discharge summary focused on specific parts of the report, such as the Chief Complaint or the Brief Hospital Course.

Simplifying and summarizing the information on discharge reports is a task that has also gained traction. For example, the work of Goswami et al. is a recent attempt to tackle the summarization of the entire discharge summary, leveraging Llama-2 to perform the task. They attempt to summarize 700 discharge records, creating condensed and easier-to-understand reports for patients. For this, they first generate reference summaries for each report and train the model with different techniques, of which QLoRA stands as the most effective. While the task is similar to ours, it serves a different purpose and does not tackle multi-document summarization, as they leverage the already compiled report instead of the collection of notes.

A paper that works on the same objective is that of Ellershaw et al., who propose a system leveraging GPT-4 Turbo for this task. Additionally, they also used MIMIC-III’s data to conduct the experiments and presented the entire set of notes to the model at once. However, their evaluation was only qualitative and conducted on 53 summaries, a figure that makes it challenging to generalize the results. Moreover, their tests were only conducted on GPT-4 Turbo using few-shot prompting and a structured output, which complicates the assessment of how much of the scores are due to these restrictions over the model’s inherent capability.

Dataset Pre-Processing and Characterization

To conduct our experiments, we needed a large body of clinical data that included discharge summaries. For this, we opted for MIMIC-III, a large, publicly available database of de-identified health data from over 40,000 patients gathered from 2001 to 2012 from critical care units of the Beth Israel Deaconess Medical Center. For our work, the standout feature of this database is the addition of clinical notes taken during a patient’s stay, including the discharge summaries written upon discharge, that act as a ground truth in our experiments, or, as suggested, as a silver truth.

Afterward, we considered the context length of the models and ensured that the data did not surpass the smallest context window of 8,192 tokens. Since both Llama and Mistral use tokenizers based on Sentencepiece, a Byte-Pair Encoding (BPE) tokenizer, we used it to filter out collections of notes related to an admission that exceeded 7,600 tokens. This value was chosen for added assurance and to accommodate hardware restrictions since, at this size, admissions could still cause Out-of-Memory errors, impeding our evaluation process. This left us with 21,339 total admissions. These were then randomly split into a train and test set, with 982 admissions reserved as the test set and the remaining 20,357 as training data.

Experiments Evaluation

To assess the performance of each model, we rely on two types of metrics: quantitative metrics from the summarization domain, which will provide a numerical and comparable measure of performance, and a set of qualitative metrics that will offer insights into the relevance, correctness, and reliability of the produced summaries.

Quantitative Analysis

To evaluate the quality of the generated summaries, we utilized several well-known metrics. For exact matching, we report BLEU, a precision-oriented metric that measures the overlap between a generated summary and the reference text, and ROUGE, a recall-oriented metric also assessing overlap similarity. We report ROUGE-1 and ROUGE-2, focusing on unigrams and bigrams, and ROUGE-L using the Longest Common Subsequence (LCS).

Since these metrics are limited to exact match scoring, synonyms or slightly different sentences will be disregarded. To address this, we leveraged BERTScore, which uses BERT embeddings to evaluate semantic similarity, and BLEURT, which operates similarly but with a model pre-trained on detecting similar sentence structures.

We also included reference-free metrics, which compare summaries directly with source documents without relying on a ground truth. Specifically, we used BLANC, which measures how well a pre-trained model improves its understanding of source documents after training on the generated summary. This metric correlates with human judgment while bypassing the need for a reference summary.

Metrics were calculated considering the entire document as a single answer. For proprietary models, a structure to the output was specified, so we also evaluated results by individual sections to evaluate the adherence to the format and identify challenging sections. Such a restriction was not applied to the open-source models due to input size constraints, so a per-section evaluation was not conducted on them. All metrics range from 0 to 1, while BLEURT, according to the implementation description, mostly varies from -2 to 1, with some outlier values being possible.

Open-Source Models

A first and very noticeable observation, applicable to all models, is that the exact-match scores are low, with the highest barely surpassing 30%. This is, however, common in similar studies as large, multi-document summarization remains a challenge even for state-of-the-art models.

Mistral outperforms Llama on most metrics, only trailing behind in BLEU and SummaC and achieving the same score on BLEURT. Despite underperforming on several other metrics, Llama’s baseline model achieved the best BLEU score among the open-source models. However, Llama’s vocabulary appears less diverse, as evidenced by the poor TTR score. This is a possible indicative of repeated sentences, a problem common in abstractive summarization. Overall, Mistral takes a significant advantage over Llama, as its results are similar even to those of state-of-the-art proprietary models.

SummaC results indicate Llama is marginally more factually consistent, with differences of 1.25% (baseline) and 2.63% (fine-tuned) over Mistral. However, as SummaC evaluates entailment rather than strict accuracy, its effectiveness diminishes for longer documents, marking the need for deeper qualitative analysis.

Mistral showed minor improvement post-fine-tuning, while Llama’s performance declined on most metrics. The overall impact of fine-tuning was negligible; Mistral-7B saw only a 0.74% gain in ROUGE-1 and a slight 0.01% drop in BLEU. For Llama, ROUGE-1 dropped by 0.17%, and BLEU by 0.07%. Changes to the other metrics were also negligible and did not contribute to any significant alteration in performance.

Fine-tuning did not yield significant improvements, likely due to two key factors. First, the 4,096-token limit on generation constrained the output, potentially reducing information richness and structure. However, with an average discharge summary length of 2,081 words, this token limit should accommodate most cases. Second, the lack of a structured output prompt, which aimed to reduce input size due to hardware limitations, may have hindered the models’ ability to generate comprehensive outputs.

Per-Section Similarity Between Produced and Original Summaries

We now look deeper into the proprietary models and consider each section separately. Since each proprietary model was asked to output in a structured format, it is reasonable to assume the answer was generated with this structure, a hypothesis we corroborated when analyzing the results with regular expressions. If a section was missing in the original or generated summary, an empty string was used for comparison. For BLANC and SummaC, we used the entire source document as a reference to evaluate the impact of individual sections on model performance.

In soft-overlap metrics, BLEURT and BERTScore, both models were competitive, but BERTScore favored GPT-3, while BLEURT gave a slight edge to Gemini. BLANC corroborated this trend, with GPT-3 scoring highest in reference-free evaluations, suggesting it enhances understanding of the original text. However, many BLANC scores were negative, indicating some sections degraded understanding. SummaC also favored GPT-3, with 11 of the 18 best scores, indicating its consistency across sections.

In comparison with the “Discharge Me!” task from Xu et al., which focused on the “Brief Hospital Course” and “Discharge Instructions” sections, we computed the average scores between the relevant sections for our models. The top performer remains Gemini with One-Shot prompts, which showed subpar results on the exact-match metrics, with 10.55% ROUGE-1, 2.41% ROUGE-2, 6.83% ROUGE-L, and 2.025% BLEU. Such scores would place it among the last positions on the leaderboard. However, our BERTScore was better than the top performer of the challenge, with an improvement of 13.44%. This indicates that Gemini is providing correct output, with a meaning similar to the ground-truth, but will tend to use starkly different wording compared to what is expected.

Considering section complexity, sections like “Service,” “Major Surgical or Invasive Procedure”, and “Discharge Disposition” yielded good scores, while categories like “Discharge Medications”, “Follow-up Instructions”, and “Past Medical History” were more challenging. This aligns with expectations, as these sections often include information omitted during the hospital stay, with discharge details typically written at the time of discharge rather than during the hospital course.

Completeness, Correctness, and Conciseness of the Produced Summaries

Across three samples, GPT-4 with one-shot prompting consistently achieved the highest scores across all categories despite overall subpar results. Both Llama versions and baseline Mistral performed poorly, often scoring at the lowest end of the scale. Fine-tuned Mistral showed improvement, achieving scores comparable to zero-shot approaches, but one-shot strategies remained the best performers.

Correctness was another frequent issue. Llama often produced repetitive, incoherent, or irrelevant outputs despite reasonable BLEU and BERTScore metrics, likely due to its use of medical terminology in the produced sentences. Mistral showed a slight improvement but missed key details, though it reliably extracted relevant information from notes. However, it sometimes deviated from standard summary formats, presenting outputs as letters to physicians.

Conciseness appears to follow the trend of completeness. Proprietary models, particularly in one-shot scenarios, showed substantial improvements in correctness. However, they occasionally included hallucinated details not found in the notes, such as a recommendation for a patient to follow a “low-residue diet” when no such information was given. Gemini was more prone to such hallucinations, possibly due to data leaking from the example summary into the response, leading to incoherence.

Overall, this analysis was consistent with our previous results, giving an advantage to the proprietary models that use a one-shot approach. Although our quantitative metrics gave the edge to Gemini, meaning that it is the most similar to the actual summaries, this analysis preferred GPT-4 by some margin, making them the two most viable and most promising approaches to clinicians.

Considerations for Real-World Deployment

Considering the results from the previous sections, we can consider the two most viable approaches, which we deem to be Gemini 1.5 Pro and GPT-4, using a one-shot prompt approach. However, there are some caveats to these options that we can further explore.

A possible alternative would be to use a self-hosted model like the fine-tuned Mistral, which offers cost benefits by eliminating generation fees but with the tradeoff of reduced performance, more frequent hallucinations, and missing information compared to the proprietary systems. Llama 2, in the tested size, is not recommended due to its poor performance and inefficiency. Another issue with self-hosting is that it requires significant infrastructure to handle long inputs and scale for hospital-wide use, creating significant maintenance costs and speed tradeoffs. For instance, Mistral took over eight hours to generate 982 summaries, while Llama was over four times slower, making both impractical for clinical use without substantial resources. Additionally, rapid innovation in AI means models can become obsolete within a year, limiting long-term viability.

It is also important to consider privacy and data handling in closed-source models. Clinical notes are classified as sensitive information, protected under the General Data Protection Regulation (GDPR). Unless these models ensure GDPR compliance, they cannot be used for automatic generation.

Nonetheless, although it is possible to use both alternatives in a real-world setting, this problem still needs significant research efforts and advancements to be considered feasible for adoption. Currently, a hybrid approach where AI generates a draft for physicians to review and edit appears as a more reliable option, reducing clinician workload while improving care quality without compromising accuracy.

Our study has limitations, which we will now highlight. Hardware was a significant hindrance, as it restricted this study regarding the data and model selection. Due to this, many data points were discarded from MIMIC, and model selection and training were also impacted. Additionally, only MIMIC-III data was used, which may not generalize to other hospitals with different summarization styles. In this topic, we also did not consider the inherently subjective nature of importance. What is critical in one care unit may not be relevant in another, and different professionals have unique summarisation styles, which can vary significantly between them.

Conclusions and Future Work

This work addressed the challenge of generating discharge summaries from prior clinical notes, aiming to improve the efficiency of patient documentation for clinicians. We evaluated five models, ranging from small open-source versions to large proprietary systems, using a comprehensive suite of metrics alongside analyses of document overlap and inference speed. While proprietary models showed superior performance, certain open-source options, such as the fine-tuned Mistral, demonstrated competitive results. However, the experiments indicate that significant advancements are still needed for real-world applicability.

Future research could explore a broader range of models, including other open-source options like Gemma or larger variants such as Llama-3 70B or Llama-3 400B. Using locally sourced data and experimenting with datasets in different languages, particularly low-resource ones, could enhance adaptability and robustness in diverse clinical settings. On the topic of data, creating synthetic datasets would also enable unrestricted distribution, facilitating research.

Addressing missing data in clinical notes presents another avenue for improvement. Introducing alternative methods for capturing detailed information, such as voice recordings, could enrich the dataset. With advancements in multimodal data research, exploring new approaches to discharge summary generation, including multimodal systems, holds significant potential.