Internship Stories

building a chat bot using Kore.ai XO platform

Varshith
Associate Engineer, Kore.ai

Kore.ai

July, 2023

Varshith P

How I went about building a chat bot using Kore.ai XO platform

I have always been intrigued and curious about how customer service tasks can be automated. Hence, I was very eager when presented with an opportunity while enrolled in the Full Stack Developer course at Gradious, to work with the Kore.ai Virtual Assistant Conversation Builder to build a live bot.

 

Having seen the benefits of Virtual Assistants in Banking, Shopping, etc., I wanted to explore their potential in the healthcare field. Thus was born Health Assist – a virtual assistant that helps the user with doctor appointments, lab tests, pharmacy (medicines), talking to a doctor, getting alerts about test results, and payment of medical bills. 

 

Do watch this brief video where I tour the Health Assist bot, or scroll down to read all about it.

Use Cases

The bot can be accessed over the web channel. It can easily be opened up in other channels as well.

Users need to register to use the bot and the user details will be saved for future use.

 

Some of the use cases I have implemented include:

  • Booking / cancelling a doctor’s appointment,
  • Booking/ cancelling a lab test,
  • Ordering medicines,
  • Payment of medical bill,
  • Booking a blood donation slot,
  • Booking an ambulance, and
  • Checking the booking and order histories.

The use case that I am really happy building is the Medicine Ordering Facility.

It includes:

  • Maintaining a cart:
    • Medicines can be added or removed from the cart at any point
    • The bill amount gets updated automatically
  • The user can check out the cart at his/her convenience:
    • Items are maintained in the cart till check out time, and
  • The user gets alerts regarding the status of the ordered medicines

This Assistant sends user notifications on appointment booking and order status. It also answers simple queries regarding common diseases and related pre-emptive measures, medicines etc. Users can also opt to talk to a doctor.

To get the medicine-related information, I integrated SerpApi: Google Search API into the bot.

 

Data Tables provided by the Kore.ai XO platform were used to store payment information and MongoDB with Node.js to store user information.  

Health assistance welcome screen chat bot
Welcome Screen
Form template health Appointment form
Form Template
health Assistance card template
Card Template

Bot Features

I enjoyed exploring the various features offered by the Kore.ai XO platform to enhance Health Assist’s user experience and make it interactive. Of the vast suit of features that the Kore.ai XO platform offered to build the bot, I would like to highlight a few that helped me build the bot and make it more usable.

 

  • Most chat bot conversations are bi-directional i.e. bot/user asks a question and the user/bot replies. This can be tedious when gathering large volumes of data from the user for example medical history when booking a doctor’s appointment or for bill payment. One feature of Kore.ai’s conversational platform that came in handy was – Forms. I felt this appropriate to gather all the details in one go and quite convenient for the user too. Forms were used for gathering information while booking doctor appointments, lab tests and payments.
 
  • Using a sub-task for the payment module really paid off. I could reuse it in various places in my bot like paying for medical bills, lab tests and doctor appointments.
 
  • Created custom dashboards for a bird’s eye view of the types of complaints raised, and the type of doctor requested for most appointments. I used pie charts to display these details so that the analysis can be done and action taken easily by the concerned person. In order to generate these charts message-level and bot-level meta tags had to be defined explicitly at the entity node and in some places in the bot action script node.
 
  • Another template that I used was widgets and panels for displaying scheduled doctor appointments. For this, I had to enable Widget SDK. Based on the information being displayed and its purpose, I used various templates like carousels, lists, buttons, etc for different display purposes. But this had a downside. Because of this, I could not enable channels like WhatsApp, Telegram and others, since the display might not be supported by these channels and it might affect the bot performance.
 
  • The “Talk to a doctor” feature in Health Assist was implemented using the Agent Transfer feature of the conversation builder. For this, I had to enable Botkit SDK and add an Agent Transfer node for that task. Also, two events – on Message and on Agent Transfer were enabled. This ensured that all the messages that the user enters after opting to Talk to a Doctor are transferred directly to a live agent, a doctor in this case, instead of the bot handling them.

In Conclusion

Due to time limited time I had to built this bot, I was not able to build some of the use-cases like insurance coverage, choosing a medicine delivery slot etc. Given more time, I am sure I can enhance the bot a lot, as there are still many features of the Kore.ai XO platform that I still have to explore. I enjoyed and learnt a lot while working on this project with the team at Gradious and I am looking forward to build more interactive conversational bots in the future as part of the Kore.ai team.