Prompt Engineering in Healthcare
Abstract
:1. Introduction
Contributions and Outline
- Overview and providing practical insights into prompt engineering techniques;
- Importance of well-crafted prompts to elicit valuable responses from AI models;
- Potential applications of prompt engineering in primary care medicine;
- Best practices for the effective implementation of prompts in primary care.
2. Related Work
2.1. Understanding Prompt Engineering
2.2. Best Practices for Prompt Engineering in Healthcare
2.2.1. Incorporating Domain-Specific Knowledge and Guidelines
2.2.2. Iterative Refinement and Validation of Prompts
2.2.3. Addressing Ethical Considerations and Potential Biases
3. Methods
3.1. Applications of Prompt Engineering in Family Medicine
3.2. Enhancing Patient–Provider Communication
3.3. Streamlining Clinical Documentation and Administrative Tasks
3.4. Supporting Medical Education and Training
3.5. Facilitating Personalized Care and Shared Decision Making
4. Experiments and Results
- Task or instruction to be carried out;
- Assign a role to ChatGPT;
- Examples provided through context;
- Input for which LLM should generate an output.
4.1. In-Line Approach
4.1.1. Obesity Prompt
Template
- Context: Below is an examplePatientInfo: {age: 41,Gender: “Male”,height: “6 feet”,weight: “190 pounds”,Symptoms: “breathlessness, increased sweating, snoring, difficulty doing physical activity, often feeling very tired, joint and back pain, low confidence and self-esteem, feeling isolated”,Habits: “binge eating”,History: “”,Allergies: “”,Diagnostic Data: “BMI above 25”}Output: {Natural Remedies: “Dietary changes, Cutting calories, Feeling full on less, eat more plant-based foods, physical activity, exercise, keep moving, Limiting unhealthy foods and beverages, Increasing physical activity, Limiting television time, screen time, and other sit time, Improving sleep, Reducing stress”,Over the Counter Medicines: “”,Prescription Medication: “Bupropion-naltrexone, Hydrogels, Liraglutide (Saxenda), Orlistat (Alli, Xenical), Phentermine-topiramate (Qsymia), Semaglutide (Ozempic, Rybelsus, Wegovy)”,Medical Treatment: “general physical exam, calculating BMI, Endoscopic sleeve gastroplasty, Intragastric balloon for weight loss, Counseling, support groups, Weight-loss surgery, Adjustable gastric banding, Gastric bypass surgery, Gastric sleeve, Vagal nerve blockade, Gastric aspirate”,Preventive Measures: “Keep a food diary of what you eat, Eat five to nine servings of fruits and vegetables daily, Choose whole grain foods, Weigh and measure food to learn correct portion sizes, Learn to read food nutrition labels and use them; keep track of the number of portions been eaten, reduce portion sizes and using a smaller plate can help lose weight, Aim for an average of 60 to 90 min or more of moderate to intense physical activity three to four days each week”,Precautions: “avoid high-carbohydrate or full-fat foods, Don’t eat highly processed foods made with refined white sugar, flour, high fructose corn syrup and saturated fat, Don’t eat foods that are high in “energy density”, or that have a lot of calories in a small amount of food, For dessert have a serving of fruit yogurt a small piece of angel food cake or a piece of dark chocolate instead of frosted cake ice cream or pie,”,Possible Causes: “Unhealthy diet, Liquid calories, sugared soft drinks, Inactivity, diet that’s high in calories, full of fast food, and laden with high-calorie beverages, eating oversized portions, lacking in fruits and vegetables, Family inheritance, genetics and influences, lack of sleep, stress, Metabolism”}
Sample Query and Output
- Query#1: “PatientInfo: {age: 28, Symptoms: “High BMI, overweight”, Habits: “job that requires 10 h sitting. like to eat sweets”}”The output generated by ChatGPT for Query#1 is shown below in Figure 1.
4.1.2. Flu, Cold, Cough—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 23,Gender: “Male”,Symptoms: “fever, cold, cough, stuffy nose, runny nose, sneezing, watery eyes, sore throat, respiratory virus”,History “”,Habits: “”,Allergies: “pollen, Penicillin”,Diagnostic Data: “”}Output: {Natural Remedies: “Hot Water, Hot Drinks, Steam, Gargling, Humidifier, Honey, Turmeric, drink hot fluid, cool mist humidifier, saline nose drops or sprays, nasal suctioning with a bulb syringe”,Over the Counter Medicines: “Cough Drops, Menthol, syrup, Nasal Spray, Tylenol, Advil, robitussin, Antihistamines, Decongestants, Expectorants, Suppressants, Acetaminophen (e.g., Tylenol, Panadol), Ibuprofen (e.g., Advil, Nuprin), Naproxen sodium (e.g., Aleve), Cough expectorants (e.g., Robitussin), Cough suppressants (e.g., Robitussin DM ), Lozenges and throat sprays (e.g., Chloraseptic, Cepastat, Halls), Paracetamol”,Prescription Medication: “Antibiotics such as Amoxicillin, Augmentin (amoxicillin/clavulanate), Cefdinir Cefpodoxime, Clindamycin, Daxbia (cephalexin), Doxycycline, Keflex (cephalexin), Penicillin, Suprax (cefixime), Zithromax (azithromycin), Antiviral medication (e.g., Tamiflu), Mortin, ibuprofen, aspirin, Nasal decongestants”,Medical Treatment: “”,Preventive Measures: “flu shot”,Precautions: “avoid cold water, avoid oily and spicy food, avoid bathing by cold water”,Possible Causes: “dust, pollen, allergens, viruses, other irritants, viral infection, influenza viruses, irritation to the mucous membranes of the nose or throat”}
Sample Query and Output
- Query#2: “{age: 55, Gender: “Male”,Symptoms: “Sore throat, Nasal congestion”, Allergies: “peanut butter”}”The output generated by ChatGPT for Query#2 is shown below in Figure 2.
4.1.3. Mental Illness—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 31,Symptoms: “obsessive Compulsive Disorder (OCD), Obsessive Compulsive Personality Disorder (OCPD), and phobias, Personality disorders, Paranoia, disturbances in thinking, disturbances in emotional regulation, disturbances in behaviour, Anxiety Disorders, depression, Bipolar Disorder, feeling sad, Schizophrenia, attention deficit hyperactivity disorder (ADHD), autism, Autism spectrum disorder (ASD), psychosis, Mental disorders, Eating disorders, Post traumatic stress disorder (PTSD), Dissociation and dissociative disorders, Anxiety and panic attacks, Borderline personality disorder (BPD), Loneliness, Stress, Suicidal feelings, Trauma, addiction, social anxiety disorder”,Habits: “”,History: “”,Allergies: “”,Diagnostic Data: “ ”}Output: {Natural Remedies: “mindfulness, relaxation techniques, breathing techniques, learning to be assertive, dietary adjustments, meditation and yoga, exercise, physically active, building self-esteem, structured problem solving, support groups, family interventions, cognitive problem solving, social skills training, social support, Skills training, Lifestyle Modifications, Keeping a journal, Socialize, delve into a hobby, refocus mind, socialize”,Over the Counter Medicines: “”,Prescription Medication: “Antidepressants, anti-anxiety medication, Selective Serotonin Reuptake Inhibitor (SSRI), Benzodiazepines, Buspirone, Tricyclics, Monoamine oxidase inhibitors (MAOIs), Beta blockers, Atypical Antipsychotics,”,Medical Treatment: “Talk based therapies, Lifestyle and behavioural advice, psychoeducation, counselling and cognitive behavioural therapy, psychosocial rehabilitation, psychosocial interventions, psychological treatments, Cognitive behavioral therapy (CBT), Exposure and response prevention (ERP), Behavioral therapy, Speech therapy, Occupational therapy, Social skills therapy, Counseling, cognitive therapy, Psychotherapy,”,Preventive Measures: “Develop healthy coping mechanisms, maintain a routine, prioritize self-care, establish a support system”,Precautions: “Avoid alcohol and recreational drugs, Quit smoking, cut back or quit drinking caffeinated beverages, avoid triggers or stressors”,Possible Causes: “genetic predisposition, environmental factors, traumatic life events”}
Sample Query and Output
- Query#3: “{age: 22, Symptoms: “anxiety, depressed, negative emotions, pessimistic”}”The output generated by ChatGPT for Query#3 is shown below in Figure 3.
4.1.4. Dental Issues—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 41,Symptoms: “cracks fractures and cavities, Chipped Tooth, tooth decay, sensitive teeth, Inflammation of tooth pulp, cracked tooth, impacted tooth, Persistent Bad breath, Black or brown spots on the teeth, Gingivitis, swollen gums, bleeding gums, toothache, periodontitis, swelling in jaw, pain while chewing and biting, gum irritation, Sharp, jabbing tooth pain, Shrinking and receding gums, red swollen tender gums, Stained Teeth”,Habits: “sweet tooth, each too much chocolates”,History: “”,Allergies: “”,Diagnostic Data: “ ”}Output: {Natural Remedies: “Saltwater rinse, Hydrogen peroxide rinse, Ice packs”,Over the Counter Medicines: “acetaminophen, ibuprofen, Orajel, Toothache Oil, Oral Pain Relief, Genexa Pain Reliever, Gum Relief gel, Toothache Spray, Anbesol Pain Relief, Advil Liqui-Gels”,Prescription Medication: “Antibiotics, pain relievers ”,Medical Treatment: “dental restoration like dental filling or dental crown, inlay, onlay, dental X-ray, ceramic restoration, Root canal therapy, tooth extraction, dental bridge, dental implant, sealants and fluoride treatments”,Preventive Measures: “brush teeth twice a day, use fluoride toothpaste, use toothbrush with softer bristles, Floss between teeth once a day, Use an antibacterial mouthwash twice a day, don’t smoke, thorough cleaning from dental health professional, regular dental checkups”,Precautions: “avoid eating sugary and acidic foods, avoid or limit soft drinks and ice creams, visit dentist regularly for exams and cleanings, avoid cold air, avoid hot and cold drinks”,Possible Causes: “Poor oral hygiene, eating extreme hot and cold foods which worns off the enamel, soft drinks, smoking, Chewing hard foods, Grinding of teeth while asleep, Brushing teeth too hard too often and too long, consuming plenty of sugary and acidic foods such as soda and sweets over a long period of time, Bedtime Bottles for kids, Cough Drops, Gummy Candy, Soda, Opening Stuff With Teeth, Sports drinks, Potato Chips, Constant Snacking, Chewing on Pencils, Frequently drinking Tea Coffee wine, Binge Eating”}
Sample Query and Output
- Query#4: “{age: 35, Symptoms: “dental cavities, swollen gums”, Habits: “drink tea and coffee twice a day”}”The output generated by ChatGPT for Query#4 is shown below in Figure 4.
4.1.5. High Blood Pressure—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 53,Symptoms: “headaches, blurred vision, chest pain, dizziness, difficulty breathing, nausea, vomiting, anxiety, confusion, buzzing in the ears, nosebleeds, abnormal heart rhythm”,Habits: “eat oily and salty food”,History: “”,Allergies: “”,Diagnostic Data: “systolic blood pressure readings is greater than 140 mmHg, diastolic blood pressure readings is greater than 90 mmHg”}Output: {Natural Remedies: “eating a healthier diet, eating low-salt diet, quitting tobacco, losing weight, being physically active, exercise”,Over the Counter Medicines: “”,Prescription Medication: “Water pills, diuretics, ACE inhibitors, enalapril and lisinopril, Angiotensin-2 receptor blockers (ARBs), losartan and telmisartan, calcium channel blockers, amlodipine and felodipine, Diuretics, hydrochlorothiazide, chlorthalidone, Angiotensin-converting enzyme (ACE) inhibitors, Beta blockers, Renin inhibitors, Aldosterone antagonists, Alpha blockers, Alpha-beta blockers, Central acting drugs, Vasodilators”,Medical Treatment: “urine and blood test, Electrocardiogram (ECG or EKG)”,Preventive Measures: “Lifestyle changes, Eat more vegetables and fruits, sit less, Be more physically active, walking, running, swimming, activities that build strength, aerobic activity, Lose weight if overweight, Keep appointments with your healthcare professional, Get regular exercise, Develop healthy sleeping habits to get a good night’s rest, Use less salt, Manage stress, Maintain a healthy weight, eat a healthy diet rich in whole grains, fruits and vegetables, and low-fat dairy products”,Precautions: “avoid eating salty food, avoid food high in saturated or trans fats, stop smoking, avoid tobacco and alcohol,”,Possible Causes: “old age, genetics, overweight, obesity, physical inactivity, high-salt diet, drinking too much alcohol, excessive salt consumption, diet high in saturated fat and trans fats, low intake of fruits and vegetables, consumption of tobacco and alcohol, family history of hypertension, age over 65”}
Sample Query and Output
- Query#5: “{age: 47, Symptoms: “hypertension, chest pain, dizziness”, Habits: “smoke and drink alcohol”}”The output generated by ChatGPT for Query#5 is shown below in Figure 5.
4.1.6. Low Blood Pressure—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 53,Symptoms: “Confusion, Dizziness or lightheadedness, Nausea, Fainting, passing out, syncope, Fatigue, Neck or back pain, Headache, Distorted or Blurred vision, Heart palpitations, fluttering, vomiting, Fast, shallow breathing, Fatigue or weakness, Feeling tired, sluggish or lethargic, Confusion or trouble concentrating, Pale skin, Low cardiac output, Low urine output”,Habits: “”,History: “”,Allergies: “”,Diagnostic Data: “blood pressure is below 90/60 mmHg”}Output: {Natural Remedies: “Increasing salt intake, Eating smaller meals with fewer carbohydrates, Drink more water, Drink alcohol in moderation, drinking more fluids”,Over the Counter Medicines: “”,Prescription Medication: “”,Medical Treatment: “urine and blood test, Electrocardiogram (ECG or EKG), Increasing blood volume, fluid resuscitation, intravenous (IV) fluids or plasma or blood transfusions, Making blood vessels constrict,”,Preventive Measures: “”,Precautions: “”,Possible Causes: “Prolonged bed rest (orthostatic), Depression, Parkinson’s disease, Pregnancy, low blood volume, Endocrine problems, Allergic reaction (anaphylaxis), Nutritional deficiencies, Dehydration, Orthostatic hypotension, Extreme temperatures, Anti-anxiety medicines, antidepressants, Diuretics, Painkillers, Not drinking enough fluids (dehydration), Hormonal problems such as an underactive thyroid (hypothyroidism), diabetes, or low blood sugar (hypoglycemia), over-the-counter medications, prescription medicines, Heart arrhythmias, dehydration from vomiting, diarrhea, or fever, Loss of blood from bleeding, High or Low body temperature”}
Sample Query and Output
- Query#6: “ {age: 51, Symptoms: “hypotension, Feeling tired, Fainting”}”The output generated by ChatGPT for Query#6 is shown below in Figure 6.
4.1.7. LDL (Bad) Cholesterol—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 41,Symptoms: “”,Habits: “”,History: “”,Allergies: “”,Diagnostic Data: “ ”}Output: {Natural Remedies: “Positive lifestyle habits, eating healthy, exercise, maintain healthy weight, manage stress, get enough good qaulity sleep”,Over the Counter Medicines: “”,Prescription Medication: “statins, mipomersen, ezetimibe, bile acid sequestrants, bempedoic acid, PCSK9 Inhibitors, lomitapide and evinacumab, Bile acid sequestrants, Cholesterol absorption inhibitors, Zetia, Bile-acid-binding resins, cholestyramine (Prevalite), colesevelam (Welchol) and colestipol (Colestid), Fibrates, Niacin, Omega-3 fatty acid supplements, nicotinic acid”,Medical Treatment: “blood test, LDL apheresis”,Preventive Measures: “healthy diet that limits saturated fat, maintain healthy weight, physical activity”,Precautions: “avoid smoking, usage of tobacco products”,Possible Causes: “Family history of high cholesterol, familial hypercholesterolemia, Unhealthy eating habits, Not being physically active, Being overweight, Smoking, Tobacco use, exposure to second-hand smoke, stress, drinking alcohol, less active, overweight, obesity, Genetic conditions”}
Sample Query and Output
- Query#7: “{age: 38, Symptoms: “low-density lipoprotein cholesterol”, Habits: “eat oily food”}”The output generated by ChatGPT for Query#7 is shown in Figure 7.
4.1.8. Diabetes—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 41,Symptoms: “Urinating often, Feeling very thirsty, Feeling very hungry even though eating enough, Extreme fatigue, Blurry vision, Cuts and bruises are slow to heal, Weight loss even though eating more, tingling, pain, or numbness in the hands or feet, Lose weight without trying, dry skin, sores that heal slowly, more infections than usual, Presence of ketones in the urine, Feeling irritable or having other mood changes, Dry mouth and itchy skin, Yeast infections, Unplanned weight loss, Nausea and vomiting”,Habits: “”,History: “”,Allergies: “”,Diagnostic Data: “ ”}Output: {Natural Remedies: “”,Over the Counter Medicines: “”,Prescription Medication: “metformin, sulfonylureas, sodium-glucose co-transporters type 2 (SGLT-2) inhibitors, Alpha-glucosidase inhibitors, Biguanides, Dopamine-2 agonist, Bromocriptine, Dipeptidyl peptidase-4 (DPP-4) inhibitors, Glucagon-like peptide-1 (GLP-1) receptor agonists, Meglitinides, Sodium-glucose transport protein 2 (SGLT2) inhibitors, Sulfonylureas, Thiazolidinediones (TZDs), Metformin, GLP-1 and Dual GLP-1/GIP Receptor Agonists, Insulin releasing pills (secretagogues), Starch blockers, Repaglinide, Nateglinide”,Medical Treatment: “Incretin based therapies”,Preventive Measures: “maintain health body weight, stay physically active, eat a healthy diet”,Precautions: “avoid sugar and saturated fat, avoid smoking, avoid tobacco, Monitor Your Blood Sugar Levels, Eat A Healthy Diet, Exercise Regularly, Manage Stress Levels, reduce alcohol intake”,Possible Causes: “Insulin resistance, Autoimmune disease, Hormonal imbalances, Pancreatic damage, Genetic mutations, Overweight, obesity, Genes and family history of diabetes, high blood pressure, high cholesterol, physically inactive”}
Sample Query and Output
- Query#8: “{age: 62, Symptoms: “Urinating often, Cuts and bruises are slow to heal”, Habits: “eating too much sweets”}”The output generated by ChatGPT for Query#8 is shown below in Figure 8.
4.1.9. Joint Issues—Prompt
Template
- Context: Below is an examplePatientInfo: {age: 65,Gender: “Male”,height: “”,weight: “”,BMI: “”,Symptoms: “joint pain, joint, Stiffness, joint swelling, Inflammation, joint redness, joint warmness, Tenderness or sensitivity around a joint, heat or warmness around joints, reduced range of motion, Reduced ability to move the joint, Redness and warmth of the skin around a joint, Warm, red, tender joints, Difficulty moving a joint, Loss of flexibility, Grating sensation, Difficulty walking or climbing stairs, Popping or cracking sound, Grinding sensation,”,History: “”,Habits: “run 3 miles every day on road”,Allergies: “”,Injuries: “”,Diagnostic Data: “ANA Test, CBC, Uric Acid Test”}Output: {Natural Remedies: “Ice packs and heating pads, Regular exercise, physical therapy, Stretching, Yoga, Swimming, Losing excess weight, Eating a healthy plant-based diet, Acupuncture, Massage therapy”,Over the Counter Medicines: “anti-inflammatory medicine like acetaminophen, nonsteroidal anti-inflammatory drugs (NSAIDs), Ointments that contain menthol or capsaicin to soothe aching joints, glucosamine, chondroitin, and fish oil, supplements, Ibuprofen, Aspirin”,Prescription Medication: “Disease-modifying antirheumatic drugs (DMARDs), injections, Azathioprine, Adalimumab, Etanercept, Methotrexate, Hydroxychloroquine, Infliximab, Leflunomide, Sulfasalazine, Celecoxib, Naproxen, Diclofenac, Abatacept, Certolizumab pegol, Golimumab, Meloxicam, Acetaminophen, Anakinra, Corticosteroids, Diclofenac sodium with misoprostol, Rituxan, Actemra, Hyaluronic acid therapy, Surgery”,Preventive Measures: “”,Medical Treatment: “X-ray, ultrasound, MRI, CT Scan”,Precautions: “Doing low-impact exercise, Rest, Avoiding tobacco products, avoid running on hard surface (e.g., road), Always wearing proper protective equipment, Using assistive devices (e.g., Canes, crutches, and walkers)”,Possible Causes: “age, overweight, obesity, wear and tear, running, playing too much sports”}
Sample Query and Output
- Query#9: “{age: 73, Gender: “Male”, Symptoms: “Knee Joint pain”, Habits: “Cycling for 30 min everyday, Smoking”}”The output generated by ChatGPT for Query#9 is shown in Figure 9.
4.2. Bot Approach
5. Discussion
5.1. Ensuring the Safety, Accuracy, and Reliability of Generative AI in Healthcare
5.2. Navigating Regulatory and Legal Considerations
5.3. Continuously Updating Prompts to Reflect Evolving Medical Knowledge and Practices
5.4. Fostering Interdisciplinary Research and Collaboration
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- McCulloch, W.S.; Pitts, W.A. Logical calculus of the ideas immanent in nervous activity. Bull Math Biophys. 1943, 5, 115–133. [Google Scholar] [CrossRef]
- Hebb, D.O. The Organization of Behavior: A Neuropsychological Theory, 1st ed.; Psychology Press: New York, NY, USA, 1949. [Google Scholar]
- Rosenblatt, F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychol. Rev. 1958, 65, 386–408. [Google Scholar] [CrossRef] [PubMed]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30. [Google Scholar] [CrossRef]
- ChatGPT Passes Turing Test: A Turning Point for Language Models. Available online: https://www.mlyearning.org/chatgpt-passes-turing-test/ (accessed on 15 June 2024).
- Sallam, M. ChatGPT utility in healthcare education, research, and practice: Systematic review on the promising perspectives and valid concerns. Healthcare 2023, 11, 887. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Heston, T.F.; Khun, C. Prompt engineering in medical education. Int. Med. Educ. (IME) 2023, 2, 198–205. [Google Scholar] [CrossRef]
- Meskó, B. Prompt engineering as an important emerging skill for medical professionals: Tutorial. J. Med. Internet Res. 2023, 25, e50638. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Liévin, V.; Hother, C.E.; Motzfeldt, A.G.; Winther, O. Can large language models reason about medical questions? Patterns 2024, 5, 100943. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Ahmed, A.; Zeng, X.; Xi, R.; Hou, M.; Shah, S.A. MED-Prompt: A novel prompt engineering framework for medicine prediction on free-text clinical notes. J. King Saud Univ.-Comput. Inf. Sci. 2024, 36, 101933. [Google Scholar] [CrossRef]
- Greyling, C. Eight Prompt Engineering Implementations, Medium. 2023. Available online: https://cobusgreyling.medium.com/eight-prompt-engineering-implementations-fc361fdc87b (accessed on 15 June 2024).
- Wang, L.; Chen, X.; Deng, X.; Wen, H.; You, M.; Liu, W.; Li, Q.; Li, J. Prompt engineering in consistency and reliability with the evidence-based guideline for LLMs. Npj Digit. Med. 2024, 7, 41. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Prompt Engineering for Generative AI. Google Machine Learning Education. 2023. Available online: https://developers.google.com/machine-learning/resources/prompt-eng (accessed on 15 June 2024).
- Chen, B.; Zhang, Z.; Langrené, N.; Zhu, S. Unleashing the potential of prompt engineering in large language models: A comprehensive review. arXiv 2023, arXiv:2310.14735. [Google Scholar] [CrossRef]
- Lin, Z. How to write effective prompts for large language models. Nat. Hum. Behav. 2024, 8, 611–615. [Google Scholar] [CrossRef] [PubMed]
- Arora, S.; Narayan, A.; Chen, M.F.; Orr, L.; Guha, N.; Bhatia, K.; Chami, I.; Re, C. Ask me anything: A simple strategy for prompting language models. arXiv 2022, arXiv:2210.02441. [Google Scholar] [CrossRef]
- Zhou, D.; Schärli, N.; Hou, L.; Wei, J.; Scales, N.; Wang, X.; Schuurmans, D.; Cui, C.; Bousquet, O.; Le, Q.; et al. Least-to-most prompting enables complex reasoning in large language models. arXiv 2022, arXiv:2205.10625. [Google Scholar] [CrossRef]
- Zamfirescu-Pereira, J.D.; Wong, R.Y.; Hartmann, B.; Yang, Q. Why Johnny can’t prompt: How non-AI experts try (and fail) to design LLM prompts. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems, Hamburg, Germany, 23–29 April 2023; ACM: New York, NY, USA, 2023; pp. 1–21. [Google Scholar] [CrossRef]
- Guilleminot, S.; Cadogan, M. AI Prompting Techniques. Life in the Fast Lane. 2024. Available online: https://litfl.com/ai-prompting-techniques/ (accessed on 15 June 2024).
- Hu, Y.; Chen, Q.; Du, J.; Peng, X.; Keloth, V.K.; Zuo, X.; Zhou, Y.; Li, Z.; Jiang, X.; Lu, Z.; et al. Improving large language models for clinical named entity recognition via prompt engineering. arXiv 2024, arXiv:2303.16416. [Google Scholar] [CrossRef] [PubMed]
- Khan, B.; Fatima, H.; Qureshi, A.; Kumar, S.; Hanan, A.; Hussain, J.; Abdullah, S. Drawbacks of artificial intelligence and their potential solutions in the healthcare sector. Biomed. Mater. Devices 2023, 1, 731–738. [Google Scholar] [CrossRef] [PubMed]
- Alnegheimish, S.; Guo, A.; Sun, Y. Using natural sentence prompts for understanding biases in language models. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Seattle, WA, USA, 10–15 July 2022; pp. 2824–2830. [Google Scholar]
- Xu, Z.; Peng, K.; Ding, L.; Tao, D.; Lu, X. Take Care of Your Prompt Bias! Investigating and Mitigating Prompt Bias in Factual Knowledge Extraction. arXiv 2024, arXiv:2403.09963. [Google Scholar]
- Farhud, D.D.; Zokaei, S. Ethical issues of artificial intelligence in medicine and healthcare. Iran. J. Public Health 2021, 50, i–v. [Google Scholar] [CrossRef] [PubMed]
- Singhal, K.; Azizi, S.; Tu, T.; Mahdavi, S.S.; Wei, J.; Chung, H.W.; Scales, N.; Tanwani, A.; Cole-Lewis, H.; Pfohl, S.; et al. Large language models encode clinical knowledge. Nature 2023, 620, 172–180. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Tang, L.; Sun, Z.; Idnay, B.; Nestor, J.G.; Soroush, A.; Elias, P.A.; Xu, Z.; Ding, Y.; Durrett, G.; Rousseau, J.F.; et al. Evaluating large language models on medical evidence summarization. Npj Digit. Med. 2023, 6, 158. [Google Scholar] [CrossRef] [PubMed]
- Gerke, S.; Minssen, T.; Cohen, G. Ethical and legal challenges of artificial intelligence-driven healthcare. In Artificial Intelligence in Healthcare; Academic Press: New York, NY, USA, 2020; pp. 295–336. [Google Scholar]
- Hetrick, C. Why Doctors Using ChatGPT Are Unknowingly Violating HIPAA. Available online: https://priceschool.usc.edu/news/chatgpt-doctors-data-privacy-hipaa/ (accessed on 7 July 2023).
- Alder, S. Is ChatGPT HIPAA Compliant? Available online: https://www.hipaajournal.com/is-chatgpt-hipaa-compliant/ (accessed on 15 December 2023).
- Wang, C.; Liu, S.; Yang, H.; Guo, J.; Wu, Y.; Liu, J. Ethical considerations of using ChatGPT in health care. J. Med. Internet Res. 2023, 25, e48009. [Google Scholar] [CrossRef] [PubMed]
Task | Good Prompt | Better Prompt |
---|---|---|
Explaining a diabetes diagnosis to a patient | Explain what diabetes is and how it affects the body. | You are a family clinician. Explain a new diabetes diagnosis to a 45-year-old patient with a high school education. Define diabetes, how it affects the body, potential complications, and the importance of lifestyle changes and medication adherence. Use simple language and analogies to ensure understanding. Use a friendly tone. |
Providing instructions for using an inhaler | Provide step-by-step instructions on how to use an inhaler properly. | Play the role of a family clinician. Give clear, step-by-step instructions to a 60-year-old patient with asthma on how to properly use their new metered-dose inhaler. Include information on priming the inhaler, shaking it, exhaling before use, inhaling deeply, holding their breath, and cleaning the device. Use simple language and short sentences. |
Discussing the benefits and risks of a prostate cancer screening | Discuss the potential benefits and risks of prostate cancer screening for a 55-year-old male patient. | You are a primary care clinician. Discuss the potential benefits and risks of prostate cancer screening with a 55-year-old male patient who has no family history of prostate cancer. Cover the purpose of the PSA test, its limitations, the possibility of false positives, and the potential for overdiagnosis and overtreatment. Use balanced language and provide context to help the patient make an informed decision. |
Prompt Type | Description | Usefulness | Example |
---|---|---|---|
Zero-shot | A prompt that provides a task or question without any examples (zero-shot) or additional context | Useful for quickly generating responses to simple, straightforward queries or task | “What are the common symptoms of influenza?” |
Few-shot | A prompt that includes a few examples (few-shot) or demonstrations of the desired output before presenting the actual task or question | Helps the AI model better understand the expected format, style, and content of the response | “Here are two examples of patient education materials on hypertension: [Example 1] [Example 2]. Now, create a similar patient education material on type 2 diabetes.” |
Ask Me Anything | An open-ended prompt that encourages the AI model to respond to a wide range of questions or tasks related to a specific domain or topic | Enables clinicians to quickly access information and insights on various aspects of patient care, from diagnosis to treatment and beyond | “As a family clinician, I often encounter patients with mental health concerns, such as anxiety and depression. What are some best practices for screening, diagnosing, and initially managing these conditions in a primary care setting?” |
Least-to-Most | A prompt that breaks down a complex task into smaller, incremental steps, gradually guiding the AI model towards the final desired output | Useful for tackling more challenging or multi-faceted problems in healthcare, such as developing comprehensive treatment plans | “Let’s develop a personalized care plan for a patient with multiple chronic conditions. First, list the patient’s diagnoses and current medications. Next, identify potential drug interactions and contraindications. Then, suggest lifestyle modifications and preventive measures. Finally, create a summary of the care plan, including follow-up appointments and monitoring requirements.” |
Role Assignment | A prompt that assigns a specific role or perspective to the AI model, encouraging it to respond as if it were a particular type of entity or expert | Helps clinicians obtain insights and recommendations from different viewpoints, such as those of specialists or patient advocates | “Act as an endocrinologist and provide guidance on managing a patient with poorly controlled type 2 diabetes and comorbid hypertension.” |
Tone | A prompt that specifies the desired tone, style, or level of complexity for the AI-generated response | Enables clinicians to tailor the output to the intended audience or purpose, such as creating patient-friendly explanations or generating professional medical reports | “Explain the concept of herd immunity in simple terms suitable for a patient with limited health literacy. Use a friendly, direct tone.” |
Contextual Priming | A prompt that provides relevant background information or context before presenting the main task or question | Helps the AI model generate more accurate and context-aware responses by considering factors such as patient demographics, medical history, or clinical setting | “A 65-year-old female patient with a history of hypertension and hyperlipidemia presents to your clinic for a routine check-up. Her blood pressure is 145/90 mmHg, and her LDL cholesterol is 130 mg/dL. Considering her age, gender, and medical history, what lifestyle modifications and pharmacologic interventions would you recommend to reduce her risk of cardiovascular disease?” |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Patil, R.; Heston, T.F.; Bhuse, V. Prompt Engineering in Healthcare. Electronics 2024, 13, 2961. https://doi.org/10.3390/electronics13152961
Patil R, Heston TF, Bhuse V. Prompt Engineering in Healthcare. Electronics. 2024; 13(15):2961. https://doi.org/10.3390/electronics13152961
Chicago/Turabian StylePatil, Rajvardhan, Thomas F. Heston, and Vijay Bhuse. 2024. "Prompt Engineering in Healthcare" Electronics 13, no. 15: 2961. https://doi.org/10.3390/electronics13152961
APA StylePatil, R., Heston, T. F., & Bhuse, V. (2024). Prompt Engineering in Healthcare. Electronics, 13(15), 2961. https://doi.org/10.3390/electronics13152961