Chatbots are software that interacts with users by using an algorithm, without human back-end intervention. In the field of healthcare, chatbots are a new digital communication channel , just like websites and mobile applications. They are easy to use and simulate a human conversation through text or voice via smartphones or computers. One of the main functions of chatbots is to answer the most frequently asked questions on a given subject, which is why it arouses a strong interest in the medical field. It can take care of the questions of patients who increasingly aspire to become actors and responsible for their health .
Chatbots’ conversational abilities quickly improve  and public interest grows . Now, patients can interact in order to describe their symptoms then advice and information are given in return by chatbots. As an example, patients can use chatbots to check symptoms and monitor their mental health    assessed the effectiveness and adherence of a smartphone app delivering strategies used in positive psychology to improve happiness and reduce negative symptoms.
Laranjo et al.  conducted a systematic review of conversational agents in healthcare and showed that the use of conversational agents with unconstrained natural language input capabilities for health-related purposes was an emerging field of research. But, the authors noted that the few published studies were mainly quasi-experimental, and rarely evaluated efficacy or safety. Bibault et al.  made the same observation, if chatbots are shown to be effective and safe, they could be prescribed like any drug to improve patient information, monitoring, or treatment adherence. Chaix et al.  showed that a chatbot designed to help patient with breast cancer could improve medication adherence. In 2019, we conducted a prospective study comparing the quality of medical information delivered by a chatbot to that delivered by a multidisciplinary committee of physicians for breast cancer patients. 140 patients were randomized blindly between information provided by the chatbot Vik and information provided by doctors. In this phase III, non-inferiority, randomized, blind, controlled trial, the EORTC INFO25 scores from the chatbot were found to be non-inferior to the scores of the group of physicians .
Tools to develop chatbots are numerous on the internet. They are developed by big companies (Google, Microsoft, etc.), start-up companies or open-source projects. Those tools allow users to develop chatbot at all levels, from development (Microsoft chatbot framework) framework to fully functional and user-friendly interface (Chatfuel, CA).
However, today chatbots are often linked to service (Pizza order, music contrôle, etc.) with few commands available. The Natural Language Processing algorithm (NLP) is limited in their understanding and often miss.
As a consequence, the tools have the same limitation. They propose more scenario-based chatbots, using buttons or limited entities. The NLP algorithm is also a black-box with no or few personalizations.
Those tools are not interesting to create a virtual assistant because we need to understand the NLP algorithm decision. We cannot let a black box decide without being able to add a border or to custom the algorithm. Secondly, because we can’t send personal and health data to external actors. Finally, we aim to propose to the users a new chatbot experience that simulates a true chat with a human. We can’t stick to static scenarios.
2.2. Natural Language Processing
For a chatbot to be fully developed, both machine learning algorithms and Natural Language Processing are required. To build a chatbot, we have two crucial components to be supervised; Intent Classification, and Entity Recognition.
Intent detection is a classic supervised classification problem. For a given question, the objective is to identify among a predefined list of intents which one corresponds to the user’s request.
We use machine learning algorithms to address this problem. These algorithms rely on a learning base to build models that will then allow the Vik chatbot to understand the questions asked by the users. This learning base is made up of examples of questions that users might ask about each intent (“how to take my medicine?”; “can you remind me to take my treatment at 8:00 P.M.?”).
These templates also allow detecting questions for which Vik does not have an answer. In this case, a health professional can take over and give the appropriate answer. These questions are also used to enrich the learning base. In this way, the models are constantly evolving to ensure that Vik’s level of understanding is constantly improving.
Entity detection allows the extraction of relevant information from a question asked by a user. This information is used by Vik’s language comprehension system to add level of personalization to the answer given by Vik by adapting it to the user’s profile. For example, a user identified as a patient and a user identified as a caregiver will not always receive the same answer if they ask the same question.
Entity detection is also based on machine learning algorithms that operate in a similar way to those used for intensity detection.
Wefight designed a chatbot named Vik to empower patients with cancers or chronic diseases and their relatives via personalized text messages (Figure 1). Vik’s answers are very diverse and patients can find all the relevant, quality-checked, medical information they need. Vik informs about cancers and other chronic diseases (asthma, depression, headache…), treatments and their side effects, the quality of life with information about sport, fertility, sexuality, and diet. More practical information, like reimbursement and patients rights, are also available. The goal is to increase compliance, educate the patient and improve the quality of life of patients with chronic diseases.
We build several Vik for each disease. Each Vik has its contents, its own NLP model and interacts its way with the patient. So we could first think that it is better to build each Vik separately. But at the same time, some Vik have common content or feature. For example, a Vik about breast cancer and a Vik about lung cancer have common content to explain what a tumor is.
To be able to use both solutions, each of our Vik is composed of a tree of different content (Figure 2). Each Sub-Vik group the contents, the feature, the entities, and the model. From this global architecture, we can automatically construct each Vik separately. If a sub-Vik is modified, the modification is shared with all Vik.
Figure 1. Vik chatbot.
Figure 2. Vik’s model architecture.
Also, for development purposes, this architecture allows us to have git-like management of the Viks. To add new features, we first create a Vik dedicated to this feature, we test and control it, and then add it to the architecture or merge it with another Vik. The main Vik can be protected to prevent any direct modification on it.
Figure 3 shows how a user can interact with the chatbot. The user sends a message to Vik. Vik first creates a new profile if it is a new user, we ask them to
Figure 3. Vik’s architecture.
accept our TOS and to read the information about data treatment. If it is an old user, we retrieve all its data, and all the data of the Vik he is speaking with. Then the NLP will find intents and entities of the message. The NLP as a minimum threshold it must reach to accept the answer. If the threshold is not reached, then it will send to the user a proposition of the 3 most probable contents and a notification shows on our interface to be handled by a human. Then the feature linked to the intent is launched. It sends back an id of content. If there is an error or if nothing is sent, a generic message is sent and a notification shows on our interface to be handled by a human. The right content is found and personalized according to the user profile.
After setting up a conversation, the user will be shown the application interface where an acknowledgment message will be shown which is followed by waiting for the user’s response.
In the future, we will need to address multiple fields in one Vik to help patients that have multiple pathologies. Vik will have to find the right answer among the contents of all the pathologies. To do it, we will develop a module that is called before everything else. This module will decide which Vik will answer. This decision will be based on the previous question sent by the user, on the topic of the question (some topic are only related to one pathology), and on a global analysis of all the conversation between the Viks and the patients.
However this solution does not allow us to answer a question related to multiple pathologies, it just allows us to answer distinct questions on distinct pathologies. To do so, we will have to create an answer to global questions.
A healthcare chatbot like Vik allows patients with chronic diseases to have a way to find support and answers to their concerns during their disease.
Conversational agents may help patients with minor health concerns without seeing a real physician. If the quality of these softwares is not thoroughly assessed, they could be dangerous. If chatbots are effective and safe, they could be prescribed like a drug to improve patient information, monitoring, or treatment adherence.
New functionalities are planned to confirm Vik as an intermediary between the patient and the medical team to provide relevant information to the physicians and enable real-time monitoring.
Research supported by Wefight.
Study concept (BC), drafting of the manuscript and supervision (BC, AG, PN), acquisition of data (AG, PN), critical revision of the manuscript for important intellectual content (All authors).
 Garg, S., Williams, N.L., Ip, A. and Dicker, A.P. (2018) Clinical Integration of Digital Solutions in Health Care: An Overview of the Current Landscape of Digital Technologies in Cancer Care. JCO Clinical Cancer Informatics, 2, 1-9.
 Chaix, B., Bibault, J.E., Pienkowski, A., Delamon, G., Guillemassé, A., Nectoux, P. and Brouard, B. (2019) When Chatbots Meet Patients: One-Year Prospective Study of Conversations between Patients with Breast Cancer and a Chatbot. JMIR Cancer, 5, e12856.
 Zhang, S., Dinan, E., Urbanek, J., Szlam, A., Kiela, D. and Weston, J. (2018) Personalizing Dialogue Agents: I Have a Dog, Do You Have Pets Too? Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Volume 1, 2204-2213.
 Nadarzynski, T., Miles, O., Cowie, A. and Ridge, D. (2019) Acceptability of Artificial Intelligence (AI)-Led Chatbot Services in Healthcare: A Mixed-Methods Study. Digital Health, 5, Article ID: 2055207619871808.
 Hoermann, S., McCabe, K.L., Milne, D.N. and Calvo, R.A. (2017) Application of Synchronous Text-Based Dialogue Systems in Mental Health Interventions: Systematic Review. Journal of Medical Internet Research, 19, e267.
 Miner, A.S., Milstein, A., Schueller, S., Hegde, R., Mangurian, C. and Linos, E. (2016) Smartphone-Based Conversational Agents and Responses to Questions about Mental Health, Interpersonal Violence, and Physical Health. JAMA Internal Medicine, 176, 619-625.
 Ly, K.H., Ly, A.-M. and Andersson, G. (2017) A Fully Automated Conversational Agent for Promoting Mental Well-Being: A Pilot RCT Using Mixed Methods. Internet Interventions, 10, 39-46.
 Laranjo, L., Dunn, A.G., Tong, H.L., Kocaballi, A.B., Chen, J., Bashir, R., Surian, D., Gallego, B., Magrabi, F., Lau, A.Y.S. and Coiera, E. (2018) Conversational Agents in Healthcare: A Systematic Review. Journal of the American Medical Informatics Association, 25, 1248-1258.
 Bibault, J.E., Chaix, B., Nectoux, P., Pienkowski, A., Guillemassé, A. and Brouard, B. (2019) Healthcare ex Machina: Are Conversational Agents Ready for Prime Time in Oncology? Clinical and Translational Radiation Oncology, 16, 55-59.
 Bibault, J.E., Chaix, B., Guillemassé, A., Cousin, S., Escande, A., Perrin, M., Pienkowski, A., Delamon, G., Nectoux, P. and Brouard, B. (2019) A Chatbot versus Physicians to Provide Information for Patients with Breast Cancer: Blind, Randomized Controlled Noninferiority Trial. Journal of Medical Internet Research, 21, e15787.