Abstract
Primary care is a language-intensive environment where clinicians frequently synthesize, document, and communicate large amounts of information. Given the amount of information in primary care, large language models (LLMs) have emerged as tools to support primary care clinician workflows, aiming to reduce administrative burden and augment patient care. LLMs are artificial intelligence tools that can generate text and assist with chart summarization, message drafting, and clinical decision support. However, because LLMs are probabilistic, identical inputs may yield inconsistent responses. The LLMs output can be significantly improved through prompt engineering. Prompt engineering is the intentional design of text entered into the LLM to help produce better LLM results. Prompting is best approached as an iterative process where a clinician defines the task, the LLM generates output, and the clinician critically reviews and refines the results. Low-quality prompts are often vague and produce generic or misleading responses. High-quality prompts are specific, context-rich, and well-structured. Using structured prompting frameworks can improve the LLMs response. Including core elements, such as the LLMs role, the clinical context, the requested task, and the desired output formatting, can help improve the LLMs response by providing situational background and framing response formatting. Additional frameworks, such as Ask-Context-Expectation and PICO+O, can be utilized for specific patient circumstances and cases. However, despite their promise, LLMs have important limitations. They may generate inaccurate or hallucinated information and produce inconsistent results. Given these limitations, LLMs should not be viewed as knowledge authorities but rather as cognitive assistants. Thoughtful prompt design can help reduce these limitations and improve response accuracy, always keeping in mind that LLMs should not replace human judgment or clinical reasoning. As LLMs continue to be integrated into primary care, prompt engineering will become an increasingly important clinical skill. Careful prompt design and critical appraisal of LLM responses will be key to maintaining excellent patient care in the AI era.
Keywords
Introduction
Primary care is a high-volume, language-intensive environment. Face-to-face conversations with patients, documentation, referral communication, and electronic message management are all language-centric aspects in primary care workflows.1-4 Over the past decade, artificial intelligence (AI) has been rapidly evolving, and AI systems can now process, interpret, and generate human language. Specifically, large language models (LLMs) are AI systems that are capable of predicting and generating text by recognizing patterns learned from large bodies of written language.5,6 LLMs are a type of AI that is trained to generate human-like language by predicting the most likely next word or sequence of words. It is not a search engine, an encyclopedia, a clinician, or a source of guaranteed truth.7,8
Frequently used LLMs in primary care may include OpenEvidence, ChatGPT by OpenAI, Microsoft Copilot, Google Gemini, or Claude by Anthropic. Although LLMs can produce fluent, highly useful outputs, they do not understand contextual clues the way humans do, nor do they consistently distinguish between facts and fiction. LLMs perform well when summarizing information, classifying content, drafting responses, explaining concepts at different reading levels, and converting information from one format to another. More advanced models can also perform reasoning tasks. However, these tools do not reason reliably and may perform poorly in ambiguous situations. As such, they can generate incorrect information with high confidence.9,10
When working with an LLM, the LLM should be viewed as a cognitive assistant rather than a knowledge authority. In practice, LLMs can assist primary care clinicians in three broad ways.11-14
The first is
The second is
The third is
Because LLMs are probabilistic, rather than systematic search tools with consistent output, identical inputs may not produce identical, consistent responses. Clear, structured input can reduce ambiguity and increase the usefulness and consistency of the LLMs output. The text entered by a user into an LLM is called a prompt, and the process of designing effective prompts to guide LLM behavior is referred to as prompt engineering.20-22
Regardless of the use case, prompt engineering principles are versatile and can be applied to many situations. Prompt engineering does not require technical expertise, but it is a skill to learn and has best practices to follow. For clinicians, it represents a practical skill that can improve the quality, safety, and efficiency of clinician-AI interaction.
Prompt Engineering Overview
Prompt engineering can be defined as the process of intentionally designing and refining a user’s input to better guide the LLMs output and improve its accuracy and usefulness for specific tasks. Prompt engineering is similar to refining a search strategy in PubMed or internet search engines. A better prompt usually leads to better output. 23
Clinician-AI interaction is most effective when approached as a structured, iterative process. First, the clinician defines the goal and provides the input. Second, the LLM generates a draft output. Third, the clinician reviews, verifies, edits, and determines whether the output is appropriate for use. This cycle can then be repeated as needed to refine the result.
In general, vague prompts produce vague answers. When a prompt isn’t specific, the LLM may fill in missing details or generate responses that sound plausible, but do not address the question. Specific, context-rich prompts, termed “high signal” prompts, are better than long, bloated ones. A high-signal prompt should include only the information that improves the response. Extra wording, repeated instructions, and unnecessary background can reduce the prompt’s efficiency. For example, a low-signal prompt would be, “Can you please help me think through what might be going on with this patient who has concerning chest pain?” while a high-signal prompt might be, “Differential diagnosis for acute chest pain in a 65-year-old with HTN and smoking history. Prioritize life-threatening causes.” Additionally, effective prompting is often a dialogue rather than a one-time, zero-shot request.
Zero-shot prompting is asking the model to complete a task without providing examples or additional details besides the initial instruction. Although zero-shot prompting can be useful for simple tasks, more complex clinical situations benefit from iterative interaction. Clinicians can improve output by asking the LLM to refine an initial prompt or identifying if information is missing. Similarly, the model can be instructed to ask clarifying questions before answering, which may help reduce ambiguity and better define the task.24-26
Prompting can also be used to strengthen the LLMs reasoning by asking the LLM to identify weaknesses, challenge assumptions, present opposing viewpoints, or play devil’s advocate. Additionally, many LLMs can share step-wise reasoning in a “chain-of-thought.” Chain-of-thought is where the LLM explains its reasoning process as part of its output, or during the “thinking process.” Utilizing chain-of-thought prompting can help the clinician identify gaps or weaknesses in the LLMs reasoning. For example, instead of asking, “What is the best diagnosis?” a clinician might ask, “What is the most likely diagnosis, and explain the steps and reasons that support this diagnosis.” This strategy encourages a more structured response and makes the LLMs reasoning process easier to inspect and appraise.27,28
General Prompting Framework
In addition to zero-shot and chain-of-thought prompting, structured frameworks can improve LLM output. Although many prompting frameworks exist, four elements are common: Role, Context, Task, and Output.29-31
First,
Second,
Third,
Lastly,
For primary care clinicians, these elements provide starting points for better clinician-AI interaction across a variety of clinical use-cases. Prompt engineering frameworks can also be task-specific and tailored to the use case. However, many task-specific prompting frameworks still rely on some variation of these four elements.
Task Specific Frameworks for Primary Care: A Toolbox for LLM Use
Prompting Strategies and Examples
One useful framework for simple primary care tasks is
A framework for more complex situations is
Another useful framework for primary care is
For more patient-specific clinical questions,
Lastly,
Common Prompting Mistakes Clinicians Should Avoid
There are several pitfalls that clinicians should be aware of when prompting LLMs. Although clinicians may feel the time constraints of clinical practice, investing a small amount of effort in crafting a clear prompt can save time by generating more relevant and usable responses.
Good prompts can be thought of as an AI equivalent of SmartPhrases or order sets in the electronic health record. Once a prompt has been refined and shown to consistently produce useful output, it can be saved and reused as a template for future tasks. In this way, saved prompts may improve efficiency and support more consistent AI-assisted workflows.
Higher-stakes use cases, particularly those involving cognitive support for diagnostic or management reasoning, also require greater scrutiny. In these higher-stakes situations, LLM output should be treated as a rough draft rather than a reliable clinical recommendation. Fluent wording can mask flawed clinical reasoning. Clinicians should have an attitude of “enlightened skepticism” when using the output.
As previously noted, prompting often yields the best results when it’s an iterative process. Although there is a role for zero-shot prompting for quick or simple tasks, iteration and dialogue help better frame the context and task. This reduces the likelihood that the model fabricates information and makes the output more specific to the use case. 31
Furthermore, since models may hallucinate and fabricate citations, citations should be verified. Additionally, clinicians should be aware that LLMs may still hallucinate citations even when prompted to use only accurate and reliable sources. In high-stakes situations where clinicians are less familiar with the literature, LLM output should be verified against trusted, reliable sources.34-36
Conclusion
For primary care clinicians, prompting should be viewed as a new clinical communication skill. Unlike a traditional search engine query, which is typically asked once and answered once, interaction with an LLM is often most effective when approached as an iterative dialogue in which the prompt and output are progressively refined. Clear, specific prompts improve the LLMs output while vague prompts are more likely to produce vague, generic, or less relevant answers. Prompting frameworks can help clinicians structure their input by clearly defining key elements, such as the LLMs role, the clinical context, the task, and the desired output format. In high-stakes scenarios, LLMs should not be treated as the definitive authority, and outputs should be verified with trusted sources. As LLMs become more ingrained in clinical workflows, prompting will become an increasingly important skill in primary care. Clinicians should prompt thoughtfully, review outputs critically, and refine them iteratively. Thoughtfully prompting and critically reviewing the output will help clinicians provide safe and effective care well into the AI era.
Footnotes
Ethical Considerations
This educational project did not require approval from the institutional review board. All authors assert that all procedures contributing to this work comply with the ethical standards of the Mayo Clinic.
Author Contributions
All the authors participated in the study concept and design, collection, analysis and interpretation of data and drafting and revising the paper for important intellectual content and have seen and approved the final version of the manuscript. Each author will take public responsibility for the entire work.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project was supported in part by the Mayo Clinic Division of General Internal Medicine.
Declaration of Conflicting Interests
The authors declared the following potential conflicts of interest with respect to the research, authorship, and/or publication of this article: R. T. Hurt is a consultant for Nestlé Nutrition for research activities unrelated to the content of this paper. All other authors declare no support from any organization for the submitted work; no financial relationships with any organizations that might have an interest in the submitted work in the previous 3 years; and no other relationships or activities that could appear to have influenced the submitted work.
Data Availability Statement
All data supporting the study findings are contained within this manuscript.
