Abstract
Language models (LMs), including large language models (such as ChatGPT), have the potential to assist clinicians in generating various clinical notes. However, LMs are prone to produce "hallucinations", i.e., generated content that is not aligned with facts and knowledge. In this paper, we propose the Re³Writer method with retrieval-augmented generation and knowledge-grounded reasoning to enable LMs to generate faithful clinical texts. We demonstrate the effectiveness of our method in generating patient discharge instructions. It requires the LMs not to only understand the patients' long clinical documents, i.e., the health records during hospitalization, but also to generate critical instructional information provided both to carers and to the patient at the time of discharge. The proposed Re³Writer imitates the working patterns of physicians to first retrieve related working experience from historical instructions written by physicians, then reason related medical knowledge. Finally, it refines the retrieved working experience and reasoned medical knowledge to extract useful information, which is used to generate the discharge instructions for previously-unseen patients. Our experiments show that, using our method, the performance of five representative LMs can be substantially boosted across all metrics. Meanwhile, we show results from human evaluations to measure the effectiveness in terms of fluency, faithfulness, and comprehensiveness.
Introduction
Clinicians are facing unprecedented levels of burnout, often spending more time on documentation than on direct patient care. One particularly demanding task is writing Patient Instructions (PI)—the detailed guides given to patients at discharge to help them manage their recovery at home. While Large Language Models (LLMs) show promise in automating these tasks, they are notoriously prone to "hallucinations"—generating medical advice that is either factually incorrect or not supported by the patient's specific health records. In a clinical setting, these errors are dangerous. The challenge lies in creating a system that synthesizes long, complex hospitalization records into instructions that are simultaneously fluent, comprehensive, and faithful to the facts.
The Re³Writer Framework
The Re³Writer framework is a modular system designed to be integrated into existing encoder-decoder language models. It mimics the cognitive patterns of physicians by relying on both "working experience" (past cases) and "medical knowledge" (textbook facts). The framework operates through three core components:
- Retrieve (Working Experience): For a new patient, the model retrieves instructions written by physicians for similar historical cases based on clinical codes (diagnosis, medications, procedures).
- Reason (Medical Knowledge): The system utilizes a global medical knowledge graph constructed from clinical data co-occurrence patterns, processed via a Graph Convolutional Network (GCN) to understand conceptual relationships.
- Refine: An adaptive gate mechanism decides, word-by-word, how much weight to give to the patient's specific records versus the retrieved experience and reasoned knowledge.
Experimental Setup and Dataset
The researchers utilized the MIMIC-III v1.4 database to build a specialized Patient Instruction (PI) dataset. This dataset contains approximately 35,000 pairs of patient health records and corresponding physician-written instructions. The vocabulary covers roughly 19.9k tokens, representing 99.5% of word occurrences in the clinical corpus.
Results
Re³Writer consistently outperformed baseline models across all metrics. For the Transformer baseline, Re³Writer improved BLEU-4 scores by approximately 12% and ROUGE-L by 8% relatively. Human evaluations by medical professionals confirmed these findings, judging Re³Writer's outputs as more faithful and comprehensive. Crucially, physicians deemed the instructions "helpful" 74% of the time, a significant jump from the 32% helpfulness rating of the standard Transformer baseline. Ablation studies further highlighted that retrieving experience based on medication codes provided the most significant performance boost, aligning with the medication-heavy nature of discharge instructions.
Conclusion and Future Work
Re³Writer demonstrates that grounding language models in retrieved experience and structured knowledge significantly reduces hallucinations in clinical text generation. While the system is intended to assist rather than replace doctors, its high clinical utility marks a step toward reducing documentation burden. Future work will focus on tailoring instructions to patient literacy levels and expanding the training data to further improve robustness.
Summary updated