RSS Amplifier

AI MicroApps for Education · Dec 13, 2024

Build an AI-Powered Clinical Patient

0
Sign in to vote or save

John Swope · AI MicroApps for Education

Of all the potential uses for AI in education, I like the potential to create more low-stakes, high-availability practice the most. Practice for the kinds of high stakes assessments that make you lose sleep the night before and make your palms sweaty the day of. AI can't replace these assessments but if it can offer some practice that takes the edge off and creates more confident students...awesome!

Take the high stakes world of clinical scenarios at medical schools. For the important practice of actually seeing and having a diagnosis conversation with a patient, medical schools have had only a few options:

  1. Hire actor patients which require training, scheduling and facilities.

  2. Use peer-to-peer role play which lacks some authenticity.

  3. Pay for some of the technology-enabled clinical scenario simulators, perhaps using VR or similar technologies. These solutions can be quite rigid and expensive.

With AI, the ability to spin up low-cost virtual patients is almost at the level that most faculty can do it. And the simulation in this article costs about $.03 per run using GPT-4o.

Before creating this clinical scenario simulation, I had to actually add a chatbot feature to my AI MicroApps repository. I had avoided chatbots in the past because the world has a lot of chatbot tools at this point and I have built MicroApps to be targeted, precise and guided. But in this case, I needed the ability to have a free-form conversation with a patient before getting into more specific diagnosis and feedback.

  1. Check out the quickstart to build your first “hello world” app: https://jswope00.github.io/AI-MicroApps-Docs/quickstart/

  2. Edit your version of the “app_clinical_chatbot.py” file.

  3. Modify the SYSTEM_PROMPT for your own interview. My prompt for this demo PM interview is “You are an assistant for a clinical simulation exercise for a student user who is playing the role of a doctor. You will answer the user's questions and sometime assess their accuracy.”

  4. The fields in phase 1 are:

    1. Markdown introduction to the scenario

    2. Image of the patient

    3. Chat Input with a max_messages of 10 to simulate a short conversation.

  5. And the phase 1 instructions include all the background that your patient should have. I’ve included patient details, patient history, and primary symptoms. But you might include more information about their immunization history or temperament.

  6. In phase 2 we ask the user for two things:

    1. Text Input for the primary complaint

    2. Long Text Input for a full differential diagnosis

  7. And in the phase 2 instructions we provide the AI with a lot of details about what potential diagnoses and evaluations could be.

  8. Finally there is a scoring rubric that checks for an accurate primary complaint and diagnosis. I haven’t made it very specific but it could be!

  9. Test your app. Once happy with it, deploy your app!

No posts

Read the original on johnswope.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.