Already a member or subscriber? Sign in now

How to Write Effective Generative AI Prompts for Family Medicine

KEVIN KINDLER, MD
OLGA KRAVCHENKO, PhD
STACY BARTLETT, MD

FPM. 2025;32(5):12-16.

Author disclosures: no relevant financial relationships.

This content conforms to AAFP criteria for CME.

Effective prompts are key to using many artificial intelligence tools. The sample prompts in this article follow the “four Rs” framework.

ai prompts

The last several years have seen a surge in artificial intelligence (AI) integration in health care. From December 2023 to March 2025, the number of Food and Drug Administration-approved devices increased from 692 to 1,016, demonstrating the rapid growth of AI-enabled tools in less than 18 months.1,2

Traditional machine learning models currently perform the majority of AI-driven tasks, especially in radiology. While these models typically handle specific, singular tasks or functions (e.g., reading x-rays), generative AI can perform a multitude of tasks simultaneously. Generative AI is already influencing medical practice outside the scope of diagnostics. It has tremendous potential to make medical practice more efficient, especially for physicians who know how to use it effectively.3 This article provides tips and best practices for writing prompts to get the most out of large language model (LLM) generative AI programs — general-purpose programs (such as ChatGPT, Gemini, Perplexity, Claude, or DeepSeek) or specialized platforms (such as OpenEvidence, Glass Health AI, or Doximity). We will review recommendations for prompting responsibly, discuss the “four Rs” for writing an effective prompt, describe advanced prompting techniques, and provide concrete examples of prompts that family physicians can use to support their daily work.

KEY POINTS

  • Excluding descriptors that may not be clinically relevant, such as a patient’s race, can reduce the risk of introducing bias into an artificial intelligence (AI) program’s response.
  • Using the “four Rs” of writing AI prompts — request, reason, references, revise — can help tailor an AI program’s response so it’s more relevant.
  • Once you learn the basics, advanced techniques such as chain-of-density prompting (asking the AI to make its response progressively more succinct) can increase your efficiency.

RESPONSIBLE PROMPTING

LLMs are powerful tools when used for the right indication and prompted appropriately. But they should be thought of as tools — just as any other modality in medicine — with their own set of indications, risks and benefits, ethical considerations, and costs. When designing a prompt, it is important to include what you want the LLM to do, but just as important to ask it to do so in a responsible way.

Avoiding bias. Because LLMs are often trained on data that may include racial, gender, or other types of bias, their output can also be biased. Responsible prompting should use inclusive language and avoid irrelevant descriptors (e.g., race, ethnicity, gender, sex, or sexuality). Avoid stereotypes or generalizations in a prompt, as the LLM will likely carry them through to the output.4 Additionally, avoid slang or colloquial phrases (e.g., “frequent flyers” for patients who often present to the emergency department or “zebras” for unusual diagnoses) because the model may take them literally or just find them confusing.

Assessing validity. It’s recommended that you use LLMs professionally only to help with tasks where you have the capacity to critically assess the accuracy of the output. Without appropriate knowledge, it can be difficult to detect “hallucinations” or when an LLM outputs something false, such as citing journal articles that don’t exist.

Early studies indicate that higher confidence in generative AI is associated with less critical thinking, whereas when an AI user has higher confidence in their own knowledge and abilities they tend to think more critically about an AI’s output.5 In other words, trust your training and judgment more than you trust the LLM, and check its output against what you know. Do this just as you would assess the findings from any tool — imaging, electrocardiograms, labs — especially if the output is surprising.

You can also take additional proactive steps to mitigate the risk of becoming overly dependent on LLMs, maintain clinical acumen, and encourage continued critical thinking by creating your own differential, outlining an expected response, and then analyzing the LLM model output to avoid automation bias and complacency.

Protecting privacy. Most health care systems do not allow inputting specific patient data into an LLM due to privacy and security concerns. As such, it is critical to remember that no protected health information, health care system documents, or institutional policies should be shared with an LLM. An exception to this may be if your organization has an LLM integrated into your EHR system or one configured to keep the data within a secure environment. If you are unsure, contact your employer’s IT team or your EHR vendor.

THE “FOUR RS” OF EFFECTIVE PROMPTING

Rather than shunning LLMs and risk being left behind as other fields incorporate AI, we can learn how to safely and effectively use them to deliver on the quadruple aim (improved patient experience, population health, clinician well-being, and cost containment). Writing an effective, precise prompt on the front end can save loads of time on the back end reviewing and revising the LLM’s output. Use the “four Rs” to guide you.

Request – What task do you need the LLM to complete? This should include the format of the response (e.g., paragraphs, a few sentences, or a bulleted list) and whether you want the LLM to take on a specific role in its reply (e.g., family physician, patient, residency faculty, medical director, clerkship preceptor, or non-profit board member). See Table 1 for examples of prompts that are useful for family medicine.

EXAMPLES OF PROMPTS TAILORED FOR FAMILY MEDICINE

Purpose Sample prompt Follow-up suggestion Notes
Learn the basics “I am a family physician learning about LLMs for work. Explain to me what you are capable of and give specific examples.” Based on the response, explore one of the specific use cases that interests you. Prompting an LLM to describe its own capabilities in your field of interest is a good strategy for beginners.
Create medical education “I am a family physician making a learning module for third-year medical students. Create an outline for a 30-minute PowerPoint presentation on topic [X] and draft five multiple-choice questions with four answer choices. Bold the one correct answer.” If the initial outline is missing key components, follow up with something like, “In addition to the content you provided, add three SMART objectives,” or “Add a slide with an interactive component.” If you know what format you want the presentation to take, you can be more specific in your original prompt. Otherwise, it’s OK to start general and then drill down with follow-up prompts.
Find resources for patients “Take the perspective of a social worker and identify local resources related to topic [X] available for patients in ZIP code [Y]. Provide contact information such as website, phone number, and email address.” Request specific categories (e.g., food banks, substance use disorder treatment centers, or housing assistance) if they’re not included in the initial response. Verify that the information the LLM provides is up to date before giving it to patients.
Form a differential diagnosis “I am a family physician formulating a differential diagnosis for a patient who is [X] years old, of [Y] sex, and exhibits [Z] clinical findings. Form a differential diagnosis and suggest tests that can help me rule in or rule out those diagnoses. Explain your reasoning for each suggestion.” Provide additional information to further simplify the list and give more specifics if possible (e.g., describe rash morphology rather than just “rash,” or give a precise white blood count differential rather than just “elevated WBC”). If you have already ruled out a diagnosis, add this to the follow-up reply. Do not include personal health information.
A medical-specific LLM (e.g., Google’s Med-PaLM) may be best suited for this task.
Use clinical judgment to carefully evaluate the LLM’s output.
Practice vaccine counseling “I am a family physician, and you are playing the role of one of my patients. You are open to vaccines but hesitant to receive them. Social media has influenced you to be unsure that vaccines are safe. When I ask questions or follow up on your responses, continue the conversation as appropriate, until I give the ‘STOP’ command. Then summarize our conversation and highlight what I did well and how I can improve.” You can further tailor the conversation to make sure the LLM includes specific concerns, such as “Do vaccines cause autism?” or “Does an mRNA vaccine change my genetics?” Vaccine hesitancy is a common scenario in family medicine, but these simulated conversations can be used to practice all sorts of counseling, such as tobacco cessation, breaking bad news about a test result, or explaining a complex medical condition or treatment decision (e.g., whether to have surgery). You can tailor difficulty level by prompting the LLM to be defensive, evasive, or otherwise non-communicative.
Provide patient education “I am a family physician, and I need to provide a few short paragraphs to educate a patient about diagnosis [X]. Please write them at a fifth-grade level.” Ask for modifications or additions to better fit the needs and goals of your patient (e.g., “Explain how this diagnosis may affect fertility.”) You can ask the LLM to format this as a bulleted list if you think that’s helpful.
Draft letters “I am a family physician, and I need to write a letter for a patient with a diagnosis of [X] who needs [Y] accommodation in their workplace. Write this in a formal tone and include any relevant codes, laws, or policies to support the accommodation.” If any of the codes or laws the LLM cites are unfamiliar to you, request links to citations so you can learn more about them and verify that they apply to the situation. Be as specific as you can about the purpose of the letter so the LLM can tailor it appropriately.
Prepare for contract negotiation “You are a potential employer looking to hire me as a family physician, and we are discussing my contract. Ask questions about my prior experience and discuss your physician compensation model. Start by asking me a single question and then build on my response. I’ve included a copy of my CV to inform your answers.” As with the practice vaccine counseling conversation, you can instruct the LLM to stop the exercise, summarize your performance, and suggest improvements.
You can also follow up by asking the LLM to pose common interview questions, such as “Tell me about a challenge you overcame.”
A mock interview is only as good as your input allows it to be. Try to give thoughtful, detailed responses, just as you would to a human interviewer.
Seek career advice “You are a career advisor for physicians helping me identify opportunities and projects to pursue. Review my resume, summarize my strengths, ask about my career aspirations, and answer as you would in a career counseling session.” Follow up by responding to questions about career advancement and opportunities for growth. If you have a specific goal or project you want to pursue, make sure to include that in your prompt for a more tailored response.
Craft research projects “You are an advisor for physician researchers helping me identify potential quality improvement research projects. The project needs to be completed in the next two years. Ask about my specific areas of interest.” Respond to questions related to your specific interests. This can help you think through whether there is a feasible project in your areas of interest. If you already have an idea for a quality improvement project, ask the LLM for recommendations to help you formalize details and meet a desired timeline.

Reason – Why do you need the task completed? This is where you should include the specific reasons why the output is necessary and any relevant information that will guide the LLM to complete the task most effectively (e.g., draft a letter of appeal to an insurance company, generate ideas for a quality improvement project, write patient instructions for COVID-19 supportive care).

References – What sources should the LLM use to guide its output? This is critically important to ensure the program isn’t pulling in suspect or unreliable information. You can write this in the form of supporting documentation the program should reference or use to inform its output or any prior examples of completed tasks (e.g., “write a letter of recommendation based on this CV,” or provide the LLM a dataset and ask it to mine the dataset in order to answer a question).

Revise – How should the output be refined? This should include two primary components — evaluation and iteration. Assess the output and provide follow-up corrections, modifications, and further guidance to shape the LLM’s next reply (e.g., modify the tone of a response or make broader adjustments to the output).

These four elements are the foundation of using LLMs effectively. Once they’re second nature, consider using some advanced techniques outlined in Table 2 to further tailor the output to your needs.

ADVANCED PROMPTING TECHNIQUES FOR LARGE LANGUAGE MODELS

Prompting technique Definition How to invoke
Tree-of-thought prompting Allow the LLM to consider and suggest multiple reasoning strategies “Provide multiple pathways to achieve [X] and explain your reasoning for each”
Chain-of-thought prompting Encourage the LLM to justify its reasoning when solving a complex task “Explain your reasoning in a stepwise fashion”
Chain-of-density prompting Systematically prompt to make the output narrower and more succinct “Provide increasingly condensed summaries of this content in [X] format”
Prompt chaining Ask a series of prompts, using the previous output to provide context for the following prompt “Based on your last response, [X]”
Meta-prompting Ask what type of prompt would best suit your needs “How should I best write my prompt in order to achieve [X]?”

AN IMPORTANT TIME FOR EXPERIMENTATION

LLMs can be used across many domains of family medicine — medical education, administrative tasks, clinical care, social determinants of health, research, quality improvement, career development, etc.

It’s an important time for experimenting with using LLMs effectively in controlled, low-risk situations that can help you feel comfortable with the new technology before it becomes an unavoidable part of practice. At some point in the near future, LLMs will probably be integrated into most EHRs and clinicians will be expected to use them for letter generation, note summarization, and other tasks. Until then, using third-party LLMs to test a variety of use cases is the best way to prepare yourself.

Almost any consumer LLM on your computer or phone will be capable of various uses. In most cases, you can choose the one you are most familiar with and start trying things out. But a word of caution specific to clinical uses: Using an LLM that limits sources to medical journals and practice guidelines instead of consumer models is helpful because it allows you to verify data veracity from the original source.6 Again, never use protected health information in a query unless you have explicit permission from your health system.

Understanding how to effectively and responsibly prompt is a critical step toward learning to be efficient with LLMs. We need not be scared of these tools; AI will never replace the human capacity to connect with a patient, critically analyze their concerns, and determine the best course of treatment. But if it can reduce the administrative burden and let clinicians focus on patient care, we should all embrace it moving forward.

Dr. Kindler is an assistant professor at the University of Pittsburgh School of Medicine’s Department of Family Medicine and faculty clinical informatics fellowship at University of Pittsburgh Medical Center (UPMC).

Dr. Kravchenko is an assistant professor at the University of Pittsburgh School of Medicine’s Department of Family Medicine.

Dr. Bartlett is an assistant professor at the University of Pittsburgh School of Medicine’s Department of Family Medicine and faculty at UPMC Shadyside Family Medicine Residency in Pittsburgh.

Send comments to fpmedit@aafp.org, or add your comments to the article online.

Author disclosures: no relevant financial relationships.

  1. 1.Artificial intelligence-enabled medical devices. U.S. Food and Drug Administration. Reviewed July 10, 2025. Accessed July 21, 2025. https://www.fda.gov/medical-devices/software-medical-device-samd/artificial-intelligence-enabled-medical-devices
  2. 2.Fornell D. FDA has now cleared 700 AI healthcare algorithms, more than 76% in radiology. HealthImaging.com. Dec. 13, 2023. Accessed July 21, 2025. https://healthimaging.com/topics/artificial-intelligence/fda-has-now-cleared-700-ai-healthcare-algorithms-more-76-radiology
  3. 3.Waldren SE. The promise and pitfalls of AI in primary care. Fam Pract Manag. 2024;31(2):27-31.
  4. 4.When AI gets it wrong: addressing AI hallucinations and bias. MIT Management Sloan Teaching & Learning Technologies. Accessed July 21, 2025. https://mitsloanedtech.mit.edu/ai/basics/addressing-ai-hallucinations-and-bias/
  5. 5.Lee HP, Sarkar A, Tankelevitch L, et al. The impact of generative AI on critical thinking: self-reported reductions in cognitive effort and confidence effects from a survey of knowledge workers. Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems. 2025;1121:1-22. https://dl.acm.org/doi/10.1145/3706598.3713778
  6. 6.Rebedew D. Four AI-enhanced mobile apps to assist primary care physicians. Fam Pract Manag. 2025;32(4):15-20.

Copyright © 2026 by the American Academy of Family Physicians.

This content is owned by the AAFP. A person viewing it online may make one printout of the material and may use that printout only for his or her personal, non-commercial reference. This material may not otherwise be downloaded, copied, printed, stored, transmitted or reproduced in any medium, whether now known or later invented, except as authorized in writing by the AAFP. See permissions for copyright questions and/or permission requests.