Healthcare Conversational Chatbot for Medical Diagnosis

Healthcare Conversational Chatbot for Medical Diagnosis

Rohan Jagtap (Sardar Patel Institute of Technology, Mumbai, India), Kshitij Phulare (Sardar Patel Institute of Technology, Mumbai, India), Mrunal Kurhade (Sardar Patel Institute of Technology, Mumbai, India) and Kiran Shrikant Gawande (Sardar Patel Institute of Technology, Mumbai, India)
DOI: 10.4018/978-1-7998-3053-5.ch020
OnDemand PDF Download:
No Current Special Offers


Medical services are basic needs for human life. There are times when consulting a doctor can be difficult. The proposed idea is an AI-based chatbot that will provide assistance to the users regarding their health-based issues. The state of the art in the aforementioned field includes extractive bots that extract the keywords (i.e., symptoms from the user's input) and suggest its diagnosis. The proposed idea will be a conversational bot, which unlike the QnA bot will take into consideration the context of the user's whole conversation and reply accordingly. Thus, along with symptom extraction, the user will get a better experience conversing with the bot. The user can also normally chat with the chatbot for issues like if the user is not emotionally sound. For example, the bot will console the user if he/she is feeling stressed by recognizing the emotional health of the user.
Chapter Preview


Chatbots are one of the most popular applications of Artificial Intelligence (AI). A chatbot is an AI software that can chat or converse with users in a way another human being would. Chatbots are basically used to simplify user interactions with computers via text or speech. There are many ways through which users can chat or converse with chatbots. Some of them are messaging apps, mobile phone apps or websites. Chatbots are one of the most advanced and promising technologies of human to computer interactions. Now how does a chatbot actually work? The answer is - Chatbot must have the ability to understand the intent of the user, extract the data accordingly and provide correct answers to the users. If it does not understand the user's request, it won’t be able to give correct answers. AI technologies like Natural Language Processing (NLP) and Machine Learning (ML) are used for teaching the chatbots to read, analyze and interpret human language. These technologies help chatbots in understanding the language and its meaning. Deep Learning (DL) is used to improve chatbot’s response to user requests.

There are many applications of chatbots present in the real world. Personal Assistants like Google Assistant, Siri, Alexa are some complex chatbots designed to answer a wide range of user queries like news updates, current weather, personal calendars, random questions. There are chatbots used for customer services as well with a limited scope of queries and responses. Nowadays chatbot applications are rapidly growing in the medical field. Some of the most popular uses of chatbots in the medical field are day-to-day assistance in patient care and wellness, tracking user’s physical health, providing food and diet recommendations and for the mental health of patients.

There are many times when consulting a doctor can be difficult. Even Google searching for symptoms can be a headache due to thousands of search results, many contradicting suggestions or misleading sites. At such times, a trained and tested chatbot dealing mainly with such cases is like heaven. There are many chatbots integrated with mobile apps that help patients in scheduling appointments, managing test reports, issuing reminders, providing diet and personalized recommendations. These chatbots are trained based on customized requests of users and their responses are handled by physicians. Thus a chatbot can very well play the role of a health coach. Some of the examples of chatbots in this field are Florence, Your.MD, Safedrugbot, Babylon Health. Thus Chatbots replacing humans in some functions makes the process more efficient, more effective and also cost-saving for patients and healthcare providers.

Key Terms in this Chapter

Teacher Forcing: An approach in training the sequence to sequence architecture wherein one provides the expected output as the input to the decoder, so as to minimize the cascading error resulting from the incorrect output been fed to the next decoder timesteps.

DL: Deep learning, a subset of machine learning that deals with ‘Deep’ Neural Networks; the name ‘Deep’ comes from the fact that a neural net can be many layers deep.

Inference Mode: The mode of processing input in a Neural Network wherein the output obtained won’t be contributing to the gradients and weight updation of the Network.

Model: The mathematical function of a machine learning algorithm that consists of all the weights and which when fed with a structured input as modeled, produces the output trained by the algorithm.

Tensorflow: Google’s Deep Learning library that helps to build Neural Networks with or without utilizing the system’s GPU with enhancement in performance for GPU based systems.

Feed-Forward Neural Network: The vanilla Neural Network architecture where an output neuron is the weighted sum of the inputs.

Softmax: A mathematical function that exponentiates the input and divides it by the sum of the exponentiation of all the inputs in a given set of inputs, hence defining a probability distribution of that input for a given set of inputs.

Word-Embedding: A way of representing words in the form of vectors wherein each element of the vector contains some notion of the value of the word with respect to other words in a given corpus.

Conversation Context: The ongoing topic of the conversation; the object on which the conversations tend to emphasize or the object that gives meaning to a conversation.

GRU: Gated Recurrent Unit, a variant of Long Short-Term Memory wherein the ‘input’ and ‘forget’ gates are combined to form one ‘update’ gate.

Diagnosis: The process of perceiving the patient’s medical issues and hence analyzing it on the basis of prior medical knowledge followed by inferring the cause, effect and medication to it (if applies).

Categorical Cross-Entropy: Also regarded as log loss, this function takes the negative log-likelihood of a normalized logit to be equivalent to the desired output and penalizes unlikeliness accordingly.

Complete Chapter List

Search this Book: