Source-linked AI summary
Prompt Engineering for Healthcare: Methodologies and Applications
Jiaqi Wang, Enze Shi, Sigang Yu, Zihao Wu, Chong Ma, Haixing Dai, Qiushi Yang, Yanqing Kang, Jinru Wu, Huawen Hu, Chenxi Yue, Haiyang Zhang, Yiheng Liu, Yi Pan, Zhengliang Liu, Lichao Sun, Xiang Li, Bao Ge, Xi Jiang, Dajiang Zhu, Yixuan Yuan, Dinggang Shen, Tianming Liu, Shu Zhang
TL;DR
Medical NLP lacks a comprehensive review focused specifically on prompt engineering, despite the approach’s growing importance for healthcare applications. This paper systematically reviews prompt-engineering methods and applications, finding that task- and domain-tailored prompts can improve medical NLP performance while noting that the literature search and task coverage may be incomplete.
Problem
Medical NLP lacks a comprehensive review of prompt-engineering methods and applications despite increasing healthcare data and demand for effective NLP techniques.
Method
The paper conducts a literature review covering manual and automated prompt-engineering methods and their applications across medical NLP tasks.
Results
Task- and domain-tailored prompts can achieve significant improvements in medical NLP accuracy and efficiency.
Takeaways & Limitations
The review provides medical NLP researchers with guidance for choosing and designing prompts and identifies directions for continued research.
Takeaways & Limitations
The literature search may have missed relevant studies, and some medical tasks or research methodologies may not be covered.
Abstract
from arXiv · showhide
Prompt engineering is a critical technique in the field of natural language processing that involves designing and optimizing the prompts used to input information into models, aiming to enhance their performance on specific tasks. With the recent advancements in large language models, prompt engineering has shown significant superiority across various domains and has become increasingly important in the healthcare domain. However, there is a lack of comprehensive reviews specifically focusing on prompt engineering in the medical field. This review will introduce the latest advances in prompt engineering in the field of natural language processing for the medical field. First, we will provide the development of prompt engineering and emphasize its significant contributions to healthcare natural language processing applications such as question-answering systems, text summarization, and machine translation. With the continuous improvement of general large language models, the importance of prompt engineering in the healthcare domain is becoming increasingly prominent. The aim of this article is to provide useful resources and bridges for healthcare natural language processing researchers to better explore the application of prompt engineering in this field. We hope that this review can provide new ideas and inspire for research and application in medical natural language processing.
I. INTRODUCTION
Prompt engineering addresses the cost and data demands of adapting pretrained language models while offering a way to guide medical NLP systems with domain- and task-specific information. This review examines its growing role across medical NLP research and applications.
- Motivation: Fine-tuning pretrained models requires substantial annotated data, computing resources, time, and cost, motivating prompt-based adaptation.
- Prompt Engineering: Prompt engineering designs and optimizes prompts to guide pretrained models toward desired downstream-task outputs.
- Prompt Engineering: Prompt learning can support few-shot or zero-shot adaptation, while task-specific prompt design influences downstream model performance.
- Motivation: Medical NLP remains difficult because of specialized terminology, broad professional knowledge, and patient-privacy-related ethical issues.
- Literature Search Process: The review searches medical NLP prompt-engineering literature, identifying 333 prompt-related papers and selecting 140 relevant papers for further review.
- Literature Search Process: The reviewed studies investigate prompt elements, generation of medically appropriate text, and evaluation of how prompt designs affect model performance.
C. Outline of the Review
The review is organized to cover prompt-engineering foundations, prompt types, medical applications, challenges, opportunities, and future research. It aims to provide a systematic overview and practical guidance for medical NLP researchers.
- Introduction: The review begins with background, significance, literature-search procedures, and an outline of its scope.
- Prompt-Engineering Basics: It introduces common large language models and the elements and components of prompts.
- Prompt Types: The review compares manual prompting, including zero-shot and few-shot methods, with automated discrete and continuous prompting.
- Medical Applications: Medical applications are examined across classification, generation, detection, augmentation, question answering, and inference tasks.
- Challenges and Future Directions: A dedicated section discusses challenges, current research directions, and opportunities for future medical prompt-engineering research.
- Conclusion: The review concludes by summarizing findings and contributions, discussing limitations, and offering recommendations for future research.
A. Large Language Models
Large language models provide the foundation for prompt engineering by generating contextually relevant text across medical NLP tasks. The section introduces major models and explains prompt formats and the prompt-engineering process.
- Large Language Models: Large language models are trained on extensive text data and can generate high-quality, contextually relevant, coherent text for diverse NLP tasks.
- Large Language Models: Prompt engineering customizes model behavior by designing prompts for different contextual environments, tasks, and application scenarios.
- BERT: BERT surpassed task-specific architectures in 11 NLP tasks, establishing new performance records.
- T5: T5 treats every NLP task as a text-to-text problem and achieved state-of-the-art results in classification, translation, summarization, and question answering.
- Prompt Formats: Cloze prompts place an answer slot within a template, whereas prefix prompts place the input before the generated answer.
- Prompt Construction: Prompt engineering applies a template with input slot [X] and answer slot [Z], then fills [X] with the input text.
III. TYPES OF PROMPTS
Prompt engineering is divided into manual and automated approaches, with manual methods relying on human expertise and automated methods using algorithms. Manual prompting includes zero-shot and few-shot strategies, whose effectiveness and limitations depend on prompt design and model capability.
- Manual prompts are human-crafted, while automated prompts are generated by algorithms or automated methods.
- III. TYPES OF PROMPTS: Manual prompt design requires substantial expertise and time, and minor prompt changes can greatly affect model predictions, especially for complex tasks.
- A. Manual Prompts: Manual prompting includes zero-shot and few-shot prompting, both configured using human expertise.
- III. TYPES OF PROMPTS: Automated prompts include discrete and continuous prompting, which use automatic algorithms rather than human configuration.
- 1) Zero-shot Prompting:: Zero-shot prompting can achieve strong downstream-task results without corresponding examples, but relies heavily on pretrained models and may produce inaccurate outputs.
- 2) Few-shot Prompting:: Few-shot prompting supplies a small number of examples to guide models toward desired outputs, including medical multiple-choice question answering.
- 2) Few-shot Prompting:: Manual prompt methods have improved over baseline models in medical translation, augmentation, generation, and summarization on public datasets.
B. Automated Prompts
Automated prompting reduces reliance on manual prompt construction through discrete search-based methods and continuous optimization in embedding space. Medical applications include task-specific prompt generation, logical-rule induction, multimodal alignment, and parameter-efficient adaptation.
- B. Automated Prompts: Human-designed prompts require domain expertise and time, motivating automated methods for more complex tasks.
- 1) Discrete Prompting:: Discrete prompting automatically searches a space of natural-language templates to guide desired outputs.
- 1) Discrete Prompting:: Discrete prompt construction includes prompt mining, paraphrasing, generation, and scoring, which can be used independently or combined for task optimization.
- 1) Discrete Prompting:: Prompt mining discovers templates from text corpora, while paraphrasing generates candidates and selects those with the highest training accuracy for a target task.
- 1) Discrete Prompting:: STREAM generates task-specific logical rules for named entity tagging, reducing human labor while achieving higher tagging accuracy and efficiency.
- 1) Discrete Prompting:: MEDIMP automatically generates medical prompts through textual data augmentation and demonstrates superiority in producing high-quality prompts for medical applications.
- 2) Continuous Prompting:: Continuous prompting operates in embedding space and tunes prompt parameters on training data, including as an alternative to standard fine-tuning for imbalanced data.
- 2) Continuous Prompting:: PromptFuse and BlindPrompt use few trainable parameters for modular, parameter-efficient multimodal alignment, while continuous prompts support controlled generation and glioma grading.
C. Comparison of Manual and Automated Prompts
Manual prompts offer human control but require time and expertise, whereas automated prompts improve efficiency and adaptability while depending on algorithm and model quality. Prompt engineering supports diverse medical applications, including classification, generation, detection, augmentation, question answering, inference, and image analysis.
- C. Comparison of Manual and Automated Prompts: Manual prompts capture task-relevant aspects through expert design, while automated prompts are faster and potentially more task-specific.
- C. Comparison of Manual and Automated Prompts: Manual prompts provide greater output control, whereas automated prompts offer greater efficiency and adaptability; task and resources determine the choice.
- IV. APPLICATIONS OF PROMPTS: Prompt engineering adapts language models to complex healthcare problems without requiring huge medical datasets and resources.
- IV. APPLICATIONS OF PROMPTS: Medical prompts support classification, generation, and detection by eliciting diagnoses or tags, producing open-ended medical content, and identifying abnormalities.
- IV. APPLICATIONS OF PROMPTS: Augmentation prompts synthesize medically consistent samples that can be combined with labelled data to train classifier models.
- IV. APPLICATIONS OF PROMPTS: Question-answering prompts test whether models can retrieve relevant medical information and generate correct responses.
- IV. APPLICATIONS OF PROMPTS: Inference prompts require models to explain clinical reasoning or diagnostic processes, testing clinical logic, causal reasoning, and argumentation.
- A. Classification Task: Prompt-based methods show promise for medical classification when annotated data is scarce, including clinical and mental-health classification.
2) Clinical text classification:
Prompt engineering supports clinical text classification with limited or no annotated data and extends to medical generation tasks. Reported applications include mental-health classification, medical-image generation, text simplification, and radiology-report translation.
- Clinical text classification: HealthPrompt uses prompt templates to adapt pretrained language models for clinical text classification without training data.Its six-model no-data analysis found that prompts captured clinical context and achieved good performance.
- Mental health classification: ChatGPT demonstrates strong zero-shot performance on stress, depression, and suicidality classification from social-media posts.It outperformed the baseline model in these mental-health tasks.
- Medical image generation: Clinical prompts enable Stable Diffusion to generate medical images after selective domain fine-tuning and clinically tailored evaluation.The approach translates medical domain knowledge into generation capabilities where data is scarce.
- Medical text generation: NapSS uses a “summarize-then-simplify” strategy to extract key medical content and guide clearer generation while preserving textual flow.It improves on baselines across lexical, semantic, and human metrics.
- Medical report translation: ChatGPT translates radiology reports into plain language and produces general and specific educational recommendations.Radiologist evaluation found promise but some inconsistency, while GPT-4 significantly outperformed ChatGPT.
C. Detection Task
Prompt engineering is applied to medical-image detection, privacy-preserving medical-text processing, and data augmentation. These approaches improve transfer, de-identification, or few-shot classification performance while reducing reliance on medical training data or human input.
- Medical image detection: Manual expert prompts and automatic image-detail prompts improve vision-language-model performance on medical detection tasks without medical training data.The proposed approaches outperform default prompts on 13 medical datasets.
- Medical text detection: DeID-GPT uses GPT-4 prompting to remove private information from text-free medical data while preserving its original meaning.The framework requires no changes across different data types and uses little human input.
- Text data augmentation: ChatAug rephrases training sentences into conceptually similar but semantically different samples for few-shot medical text classification.It improves testing accuracy and the distribution of generated samples over state-of-the-art augmentation methods.
2) Transform clinical data into prompts:
Prompt engineering is applied across medical question-answering tasks by transforming clinical information into prompts or integrating visual and textual context. These approaches improve medical QA performance and enable models to ground answers in clinical images and instructional videos.
- 2) Transform clinical data into prompts:: MEDIMP translates clinical biomedical data into text prompts for LLM-based augmentation and learns representations of renal transplant DCE MRI images.It combines predefined sentence templates, ChatGPT-generated prompts, contrastive learning, and image-text pairs for prognosis-related representation learning.
- 1) Medical text-based QA:: Medical QA adaptation uses instruction prompt tuning with a few examples to align models such as PaLM and FlanPaLM to specialized domains.MultiMedQA and HealthSearchQA support evaluation across factuality, precision, harm, and bias.
- 1) Medical text-based QA:: The reviewed studies span medical text-, image-, and video-based QA, with prompt designs tailored to each modality and task.The evidence includes instruction prompts for text QA, visual-token prompting for image QA, and visual-text prompting for video QA.
- 1) Medical text-based QA:: Med-PaLM shows encouraging improvements but still lags clinicians, revealing gaps in medical knowledge comprehension and reasoning.The evaluation emphasizes the importance of medical QA datasets and human-centered assessment for clinical language models.
- 2) Medical image-based QA:: Medical visual QA can generate open-ended responses by mapping visual features to tokens and combining them with questions to prompt a pretrained language model.The approach outperforms other methods on Slake, OVQA, and PathVQA benchmarks.
- 3) Medical video-based QA:: VPTSL feeds question-conditioned visual prompts, subtitles, and questions into a predictor that identifies the subtitle span matching a visual answer.This formulation bridges textual questions and visual answers in temporal answering grounding.
- 3) Medical video-based QA:: Table V organizes applications of prompt engineering in medical question-answering tasks.The table is presented as a reference for the reviewed QA applications.
- 3) Medical video-based QA:: 28.36% in mIOU: VPTSL outperforms the state of the art on MedVidQA by a large margin.The result supports using contextual visual information and text-span prediction for grounding temporal answers in instructional videos.
2) Causal reasoning about medical variables:
Prompt engineering supports medical inference with limited data, while causal reasoning experiments show that model performance depends on prompt wording and graph complexity. The section also identifies data, interpretability, consistency, and adversarial challenges for medical prompt-based methods.
- 2) Causal reasoning about medical variables:: GPT-3’s causal-graph accuracy reaches 70%-85% on the simplest medical graph and remains above 50% random baselines on more complex graphs.Performance decreases as graph complexity increases, and prompts using “causes” perform well on the tested graphs.
- 2) Causal reasoning about medical variables:: Causal reasoning performance varies with prompt form and linking verbs, demonstrating sensitivity to user input.The study compares declarative versus interrogative prompts and “causes” versus “correlates with.”
- 2) Causal reasoning about medical variables:: Prompt-based learning can support zero-shot medical AI applications when annotated data is scarce by using task templates instead of fine-tuning.The reviewed applications include classification, generation, detection, enhancement, question answering, and reasoning.
- 2) Causal reasoning about medical variables:: The chapter frames prompt generation, optimization, multimodal processing, and deep reinforcement learning as current research directions.These directions aim to improve the effectiveness and applicability of prompt-based methods.
- 2) Causal reasoning about medical variables:: Medical prompt engineering is constrained by scarce specialized data, domain uncertainty, interpretability requirements, self-consistency issues, and adversarial risks.These challenges require solutions grounded in medical knowledge and terminology.
- 2) Causal reasoning about medical variables:: Prompt design must balance task-specific complexity and interpretability while avoiding human bias or erroneous information.The stated goal is to preserve fairness and accuracy in medical predictions.
- 2) Causal reasoning about medical variables:: Medical terminology can have different interpretations across texts, increasing uncertainty in prompt design.This uncertainty complicates the construction of accurate and effective prompts.
B. Current Research Directions
Current medical prompt-engineering research spans prompt design, multimodal data processing, and deep reinforcement learning. Researchers are encouraged to select methods according to task requirements and data characteristics while considering performance and interpretability.
- B. Current Research Directions: Medical prompt-engineering research covers diverse prompt designs, multimodal data processing, and deep reinforcement learning.These directions reflect the field’s broadening application of large models to medical tasks.
- B. Current Research Directions: Prompt choices include manual templates, knowledge-graph prompts, natural-language-generated prompts, and trainable parameters for automatic generation.The appropriate choice depends on task-specific characteristics and data features.
- B. Current Research Directions: Multimodal prompting integrates text and image data to guide models in handling and analyzing different information types.The review links this integration to model performance and interpretability.
- B. Current Research Directions: Deep reinforcement learning can autonomously optimize prompt design through continued learning.The stated aim is further improvement of prompt performance.
- B. Current Research Directions: Researchers can select prompt-engineering methods according to task requirements and data characteristics to improve model performance and interpretability.The review presents method selection as a context-dependent research decision.
- B. Current Research Directions: ChatGPT and GPT-4 increase the potential for medical prompt engineering to improve large-model understanding and processing of medical data.The review describes a progression from manual toward automated prompting and greater automation and intelligence.
- B. Current Research Directions: The section summarizes the review while discussing its limitations and contributions.This framing connects the research directions to the review’s concluding assessment.
A. Summary of the Review
The review synthesizes prompt-engineering methods, applications, challenges, and future directions for medical NLP. It concludes that tailored prompts can improve performance and efficiency, while noting that evidence coverage and task scope remain incomplete.
- A. Summary of the Review: The review provides a comprehensive overview of manual and automated, discrete and continuous prompt-engineering methods for medical NLP.It covers applications across classification, generation, detection, augmentation, reconstruction, question answering, prediction, and inference.
- A. Summary of the Review: Carefully tailored prompts are reported to improve the accuracy and efficiency of medical NLP tasks.The review presents prompt design as dependent on specific tasks and domains.
- A. Summary of the Review: Prompt effectiveness may vary with the characteristics of the task and medical domain.The review identifies this variation as a limitation requiring further research.
- A. Summary of the Review: 333 relevant studies were included, but some medical NLP prompt-engineering research may have been missed.The authors therefore state that the review’s scope may not be entirely exhaustive.
- A. Summary of the Review: The review does not cover every medical task or prompt-engineering methodology, leaving additional areas for future investigation.The authors recommend exploring other medical NLP applications and methods.
- A. Summary of the Review: The review serves as a reference for selecting and designing prompts that may improve model performance and efficiency in medical NLP.It also discusses medical-domain challenges and future research directions.
- A. Summary of the Review: Future medical NLP research is expected to explore advanced models, multimodal integration, and more efficient and accurate prompt-engineering methods.The review also identifies underexplored medical NLP areas for continued investigation.
- A. Summary of the Review: Larger models such as GPT-4 will require hardware and software advances to accommodate higher computing and resource demands.The review connects future progress with increased resource requirements.