AI Healthcare Chatbots Using GCP's Med-Palm, Apigee, and Dialogflow

A Scalable, Secure, and Compliant Solution for AI Healthcare Chatbots Using GCP's Med-Palm, Apigee, and Dialogflow

(This conceptual idea and the demo assets were built for a GenAI Hackathon)
Rakesh Talanki
Principal Architect
Google Cloud
Juan Acevado
AIML Specialist
Google Cloud
Kevin Park
AppMod SCE
Google Cloud
Austin Murtha
Apigee CE
Google Cloud

Our Story

I remember an incident that happened last year. It was late at night and my daughter started to complain about tooth ache and was not eating anything. She had a hard time falling asleep. I think for anyone in this predicament, the first thing one would do is to Google. In my case, this is exactly what I did and looking through the different pages of information, I could not pinpoint what the issue could be and I was panicking. At this point I really wanted to call my Dentist and get his opinion. But since it was midnight, I could not reach my Dentist.

Challenges

The healthcare industry is facing a number of challenges, including a shortage of healthcare professionals as we saw during COVID, a growing demand for care, and rising costs. These challenges are leading to longer wait times for patients, decreased quality of care, and increased stress for both patients and healthcare professionals.

Solution Statement

We propose to develop a healthcare chatbot that can help to address these challenges. The chatbot will be powered by a large language model (LLM), MedPaLM, which is trained on a massive dataset of medical text. This will allow the chatbot to understand and respond to a wide range of patient questions and requests. The chatbot will also be able to access and process patient data from electronic medical records (EMRs). This will allow the chatbot to provide more personalized and comprehensive care.

The chatbot will be implemented using Google Cloud Platform (GCP) services. This will ensure that the chatbot is scalable, secure, and compliant with HIPAA regulations.

The chatbot will be available 24/7 and will be able to answer a wide range of patient questions. The chatbot will also be able to provide basic medical advice and refer patients to a healthcare professional if necessary.

The chatbot will be a valuable tool for both patients and healthcare professionals. It will help to improve the quality of care, reduce wait times, and increase patient satisfaction.

Benefits of the Solution

The benefits of the proposed solution include:

  • Improved quality of care: The chatbot will be able to provide more personalized and comprehensive care by accessing and processing patient data from EMRs.
  • Reduced wait times: The chatbot will be able to answer a wide range of patient questions 24/7, which will reduce wait times for patients.
  • Increased patient satisfaction: The chatbot will provide a more convenient and efficient way for patients to access healthcare information and services.

Risks and Challenges

The risks and challenges of the proposed solution include:

  • Compliance: The chatbot will need to be designed and implemented in a way that complies with HIPAA regulations.
  • Accuracy: The chatbot will need to be accurate in its responses to patient questions.
  • Adoption: The chatbot will need to be adopted by healthcare organizations and patients.

We believe that the benefits of the proposed solution outweigh the risks and challenges. We are confident that the chatbot will be a valuable tool for both patients and healthcare professionals.

Technology

This is a conceptual model, not production ready. 

GenAIHackathon-1.png

The following are the components of the healthcare chatbot:

  • Dialogflow: Dialogflow is a natural language processing (NLP) platform that allows you to build conversational interfaces for your applications. Dialogflow will be used to train the chatbot to understand and respond to patient questions. Dialogflow helps to create robust conversation flows as a managed service.
  • Apigee API Management: Apigee API Management is a service that helps you to secure, monitor, and control your APIs. These healthcare API will allow you to access and process healthcare data using the patient data from EMRs. These API’s will also help to create and manage medical records, and send prescriptions. Apigee helps to do the following all without the need of managing the infrastructure.
    • API Fulfillment
    • AuthN and AuthZ
    • Orchestration engine
    • SelfService of APIs
    • Monetize APIs
    • Secure connectivity to EMR
  • Med-Palm GenAI: Med-Palm GenAI is a large language model (LLM) that is trained on a massive dataset of medical text. Med-Palm GenAI will be used to provide the chatbot with the knowledge and expertise to answer patient questions. 
  • BigQuery and Looker: BigQuery and Looker can be used to analyze API traffic data. This data can be used to monitor models and determine which tenants are experiencing problems.

With Med-PaLM, we can create dynamic conversations we could not before with just using Dialogflow. This new type of modality helps developers create conversational applications easier and create a more tailored user experience without a complicated set of technologies.

We’re using Dialogflow to route the user through a predetermined chat experience without losing them on the path if we were to just use generative AI which could cause hallucinations. On top of this, we’re adding Med-PaLM and generative AI capabilities so that the user can still have dynamic conversations with the chatbot, which will feel more natural. This added feature could not be done before with any other technology. Let us give an example, in a conversation a user might say, “I Have a toothache”, or, “My tooth hurts”, or, “I hurt my tooth”, etc. For each one of these combinations of what a user might say, a Dialogflow intent has to have a set of training phrases for every single possibility of what a user might say. With genAI, passing this off to the Med-PaLM API, we can handle these dynamic prompts without the need to do all of this in Dialogflow. This also makes debugging and maintenance a lot simpler.

Demo Assets

Here is a simple conceptual AI Healthcare chatbot solution to demonstrate this concept.

Bard Family Dental

Demo video

Demo Source Code

Get started

The healthcare chatbot is a valuable tool that can help to improve the quality of care, reduce wait times, and increase patient satisfaction. The chatbot can be implemented using GCP's managed services to provide a scalable, secure, and compliant solution.

If you’re interested in exploring generative AI on Cloud, you can sign-up for our Trusted Tester program or reach out to your Google Cloud sales representative.

Read Apigee best practices for Contact Center AI or visit A responsible path to generative AI in healthcare to find out more.

Comments

Great job team! 🎉 Thanks for doing / sharing this.

proshanta
Staff

Very cool

kishantripathi
Bronze 4
Bronze 4

Great use case. It would have a great impact on mental healthcare.

Thank you for your observations. It will have a great impact on all types
of Healthcare. This article is a food for thought, hope we get to see such
use cases being implemented overcoming compliance challenges.
lynnlangit
Bronze 3
Bronze 3

Thanks for writing this article,  I am very interested in the details of getting this to work for clinicians. 

When I tried out the chatbot, the patterned input/output seemed to be very limited.  I am interested in leveraging the abilities of the LLM to provide for more flexible input in particular, i.e. accept '8/3/59' or 'Aug 3 59' for patient named 'Cox' as dob.  When I tried a couple of variations, they weren't accepted.  I want to be able to use LLM prompt testing tools in an automated way to test a solution like this. 

Does your team know of any examples of this approach?  #thanksInAdvance

jfacevedo
Staff

@lynnlangit we used Dialogflow for the input collection, which can accept flexible input. For this demo, we made it simple. You can find the github project for this demo here https://github.com/entrpn/dr-bard

lynnlangit
Bronze 3
Bronze 3

@jfacevedo thanks I'll take a look at the repo - much appreciated

nouradaadaa
Staff

Excellent demo, Rakesh!! @RakeshTalanki  Very well done! I appreciate your efforts.

ravikhanna
Staff

Great job @RakeshTalanki and the entire team. Great demo!

Version history
Last update:
‎09-07-2023 01:55 PM
Updated by: