Best Practices for Large Language Models in Radiology

Christian Bluethgen, Dave Van Veen, Cyril Zakka, Katherine Link, Aaron Fanous, Roxana Daneshjou, Thomas Frauenfelder, Curtis Langlotz, Sergios Gatidis, Akshay Chaudhari

TL;DR

Large Language Models (LLMs) offer massive potential to streamline radiology workflows, from summarizing complex reports to driving autonomous clinical agents. This paper provides a comprehensive roadmap of best practices, arguing for an iterative approach that prioritizes prompt engineering and Retrieval-Augmented Generation (RAG) over costly fine-tuning. Crucially, it emphasizes that deploying these models safely requires a deep understanding of their limitations, strict data privacy controls, and rigorous, domain-specific evaluation.

What Problem Does This Paper Address?

Radiology is a highly language-dependent medical specialty. Radiologists don't just look at images; they must integrate complex visual data with a patient's clinical history, interpret the findings, and concisely communicate actionable insights. While general-purpose LLMs excel at standard natural language tasks, applying them blindly to high-stakes clinical environments introduces severe risks.

The authors address the lack of standardized, practical guidance for integrating LLMs into radiology. They tackle critical challenges such as "confabulations" (hallucinations), prompt brittleness, data privacy compliance (like HIPAA and GDPR), and the technical hurdles of adapting general-purpose models to understand highly specialized medical terminology.

Methods

Rather than introducing a new model, the paper synthesizes a structured framework for LLM optimization and deployment in radiology, detailing three main technical approaches:

  1. Prompt Engineering: The baseline approach for interacting with LLMs without modifying their weights. The authors outline best practices such as few-shot prompting (providing 2–5 examples) and chain-of-thought (CoT) prompting to guide the model through intermediate reasoning steps. They also highlight the importance of hyperparameter tuning, noting that radiology tasks generally require a temperature of 0 to maximize determinism and lower frequency penalties to allow the natural repetition of clinical terms (e.g., "nodule").
  2. Retrieval-Augmented Generation (RAG): A method to ground LLM outputs by pairing the model with an external retrieval module. This module queries verified databases (like clinical guidelines or lab results) and appends this context to the user prompt, significantly reducing hallucinations.
  3. Fine-Tuning and Domain Adaptation: When prompting falls short, models can be adapted using Parameter-Efficient Fine-Tuning (PEFT) techniques like Low-Rank Adaptation (LoRA) or QLoRA. These methods update only a fraction of the model's parameters, making domain adaptation computationally feasible on standard desktop hardware.

The paper also details the progression from text-only models to Large Multimodal Models (LMMs) capable of processing both text and imaging patches, as well as Agentic Workflows, where an LLM acts as a central orchestrator that plans, calls external tools (calculators, segmentation software), and reflects on its output iteratively.

Figure 1: Process of training a large language model (LLM). (1) First, an LLM is pretrained in a self-supervised way to predict the next text parts (tokens), using vast text corpora derived from diverse, mostly web-based and weakly or uncurated sources. The resulting pretrained LLM contains general language knowledge. (2) The next step (instruction tuning) takes the pretrained model and fine-tunes it in a supervised way to predict the next tokens in input-output pairs of higher-quality data (such as curated question and answer datasets). The fine-tuned LLM has now learned to follow instructions and can solve a great variety of language tasks but can produce unexpected or potentially harmful outputs. (3) To improve this, the third step (alignment tuning) seeks to align the fine-tuned LLM with human preferences. One way to achieve this is by having the fine-tuned LLM output several answers to per input prompt. Trained human raters rank the outputs by quality. This ranking data is used to train a reward model through reinforcement learning from human feedback (RLHF). The reward model learns to predict human preference of generated outputs and is used to inform further training to create an aligned LLM. In this example, human raters preferred short, concise and specific answers (Answer 1) over more nuanced, lengthy answers (Answer 3) or answers that did not contribute to answering the question (Answer 2). CTPA: CT pulmonary angiography.

Datasets

The paper reviews several key datasets and benchmarks used in contemporary radiology LLM research:

  • Training & Fine-Tuning Data: Mention of large-scale datasets like MIMIC-CXR (chest X-ray reports) and CheXinstruct for instruction tuning.
  • Evaluation Benchmarks: The authors highlight the inadequacy of general language benchmarks, pointing instead to radiology-specific evaluation frameworks:
  • PubMedQA: For medical question-answering accuracy.
  • RaLEs (Radiology Language Evaluations): For testing specific language tasks like anatomical relationship extraction and report summarization.
  • RadBench: A benchmark tailored for multimodal tasks, including visual question-answering and report generation.

Key Insights and Ideas

  • Language Processors $\neq$ Knowledge Databases: A core "aha moment" is that natively querying an LLM for factual medical knowledge is a fundamental misuse of the technology. LLMs should be treated as processors to interpret and synthesize information, while factual accuracy should be strictly enforced via external, validated knowledge sources using RAG.
Figure 2: Simplified example of enhancing model responses by incorporating additional information from external sources with a large language model (LLM) accepting multi-modal inputs. (1) A user inputs a query and (optional) image data. This data is transformed into numerical vector representations (embeddings). (2) An orchestrator module retrieves content similar to the user query (or the image input) from an optimized database. This database can contain curated, verified high-quality information such as guidelines or scientific publications. Additionally, the orchestrator module can interact with selected software tools to retrieve additional information (e.g. from search engines, specialized radiology applications like segmentation tools, or automated analysis and quantification software). (3) The retrieved content (usually text) is concatenated with a system prompt carrying general instructions for the model and the user input with the specific request. (4) The user input and the retrieved context-specific content are provided to the LLM to generate an output. In case an image was initially provided, a bridger module (another model that can bridge the modality gap by converting visual embeddings into embeddings that the text-based LLMs can handle) can "translate" visual information for the LLM. API: Application Programming Interface.
  • The "Long Tail" Problem: Radiology is filled with rare conditions. When building instruction-tuning datasets, developers must carefully balance the data to prevent models from overfitting to common diagnoses and failing on rare, critical findings.
  • Open-Source vs. Closed-Source Dilemma: While closed-source models (like GPT-4) often lead in raw performance, they present severe compliance risks regarding data privacy. The authors strongly advocate for locally hosted, open-source models (like LLaMA derivatives) to ensure that sensitive patient data never leaves the hospital infrastructure.
  • Expertise is a Spectrum: Evaluating a radiology LLM cannot be automated purely through metrics like BLEU or ROUGE. Human evaluation is mandatory, but it must be calibrated based on the evaluator's experience level—a radiology resident, a clinician, and a board-certified subspecialist will focus on entirely different nuances of a report.

Key Results

While the paper is a review, it highlights compelling quantitative and qualitative benchmarks from recent literature to contrast the efficiency of different adaptation strategies:

  • Compute Cost Disparities: Pretraining a small BERT model on clinical documents from scratch can take weeks and cost around $50,000, while training GPT-3 scale models costs millions. Conversely, fine-tuning an open model using LoRA (e.g., DoctorGLM on 100,000 QA pairs) can be completed in less than 4 hours for under $20.
  • Domain-Specific Superiority: Open, imaging-specific LMMs like CheXagent have been shown to outperform much larger, general-purpose medical LLMs on specific chest X-ray interpretation tasks by utilizing dedicated modality encoders.

Limitations and Future Work

  • Data Contamination: A growing concern is that public radiology benchmarks are inadvertently being scraped into the pretraining corpora of commercial LLMs, leading to artificially inflated, overly optimistic evaluation results. The authors suggest gated access to evaluation datasets as a necessary countermeasure.
  • Adversarial Vulnerabilities: Integrating visual data introduces new security risks. For instance, multimodal LLMs that rely on optical character recognition (OCR) to read text embedded in medical images can be vulnerable to adversarial text injection attacks hidden within the images themselves.
  • Regulatory and Agentic Complexity: As models transition into autonomous agents that execute multi-step clinical plans, defining their legal and regulatory boundaries becomes highly complex.
Figure 3: Large language models (LLMs) in agentic workflows. In this example, the user asks for lung nodules in a CT scan (screening setting). An agentic workflow represents an iterative process in which the large language model (LLM) identifies what to do (Identify Intent), conceives a plan how to proceed (Plan), and selects from a set of available actions and resources (Act) including general-purpose tools like calculators, radiology-specific tools (e.g. CT lung nodule analysis software), and other resources like healthcare information systems or databases (e.g., guidelines like Lung-RADS). The LLM iteratively refines its context based on new information (Update Context), revising its plan or performing additional actions if necessary (Reflect). In this example, the identification of a prior study triggers a more refined approach involving analyzing and correlating previous pulmonary nodules with the current study. This process culminates in autonomously generating a comprehensive output tailored to the initial query, incorporating relevant medical guidelines and recommendations. HIS: Hospital Information System. RIS: Radiology Information System. PACS: Picture Archiving and Communication System.

If these agents directly impact clinical decisions (such as triage or diagnostic support), they will require strict classification and approval as medical devices under evolving frameworks like the EU AI Act.

Summary updated

Abstract

At the heart of radiological practice is the challenge of integrating complex imaging data with clinical information to produce actionable insights. Nuanced application of language is key for various activities, including managing requests, describing and interpreting imaging findings in the context of clinical data, and concisely documenting and communicating the outcomes. The emergence of large language models (LLMs) offers an opportunity to improve the management and interpretation of the vast data in radiology. Despite being primarily general-purpose, these advanced computational models demonstrate impressive capabilities in specialized language-related tasks, even without specific training. Unlocking the potential of LLMs for radiology requires basic understanding of their foundations and a strategic approach to navigate their idiosyncrasies. This review, drawing from practical radiology and machine learning expertise and recent literature, provides readers insight into the potential of LLMs in radiology. It examines best practices that have so far stood the test of time in the rapidly evolving landscape of LLMs. This includes practical advice for optimizing LLM characteristics for radiology practices along with limitations, effective prompting, and fine-tuning strategies.
BibTeX
@misc{bluethgen2024best,
  author = {Christian Bluethgen and Dave Van Veen and Cyril Zakka and Katherine Link and Aaron Fanous and Roxana Daneshjou and Thomas Frauenfelder and Curtis Langlotz and Sergios Gatidis and Akshay Chaudhari},
  title = {{Best Practices for Large Language Models in Radiology}},
  year = {2024},
  eprint = {2412.01233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.01233},
}
Figure