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.

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.