A Framework to Assist Chat Operators of Mental Healthcare Services (2020)

Abstract: Conversational agents can be used to make diagnoses, classify mental states, promote health education, and provide emotional support. The benefits of adopting conversational agents include widespread access, increased treatment engagement, and improved patient relationships with the intervention. We propose here a framework to assist chat operators of mental healthcare services, instead of a fully automated conversational agent. This design eases to avoid the adverse effects of applying chatbots in mental healthcare. The proposed framework is capable of improving the quality and reducing the time of interactions via chat between a user and a chat operator. We also present a case study in the context of health promotion on reducing tobacco use. The proposed framework uses artificial intelligence, specifically natural language processing (NLP) techniques, to classify messages from chat users. A list of suggestions is offered to the chat operator, with topics to be discussed in the session. These suggestions were created based on service protocols and the classification of previous chat sessions. The operator can also edit the suggested messages. Data collected can be used in the future to improve the quality of the suggestions offered.

## introduction due to recent advances in natural language processing (nlp), chatbots are being developed and used in different domains, such as customer support, voice assistant, and medicine. particularly, chatbots are used in medicine to diagnose medical conditions based on patients' symptoms @xcite , to classify mental states @xcite , and to promote health education @xcite . besides, chatbots have been developed for providing advice and education on mental health conditions. @xcite reviewed the academic literature and found applications that targeted neurological disorders (e.g., insomnia, dementia, depression), well-being, addictions, sexually-transmitted-diseases, among others. the authors pointed out that the field is still in its youth and is more focused on developing rather than testing and assessing efficacy. they also suggested that chatbots are more likely to promote health and behavior change (e.g., @xcite ) if integrated with human support, which had been overlooked by studies included in their review. however, physicians believe that actual chatbots cannot effectively care for all of the patients' needs @xcite . standard chatbots cannot display human emotion, and cannot provide detailed diagnosis and treatment due to their limitation in consider all of the factors of the patient @xcite . @xcite also stated that healthcare chatbots can be a risk to patients when the patients do not fully understand a diagnosis. in this work, we describe an open-source framework for developing a chatbot with human support using well-known nlp libraries. then, we showcase an application for promoting smoking cessation using the framework. ## related work in this section, we discuss the ethical implications of developing chatbots for mental health. we also present examples of applications of healthcare assistance, emphasizing their benefits and their distinct architectural designs. lastly, we distinguish our proposed framework from the current literature showing why it can potentially be an improvement. people diagnosed with a mental disorder are not always inclined to seek treatment @xcite . @xcite discuss the causes of this behavior, such as concerns about social opinion and negative attitudes towards drug-based treatment options, negative experiences with professional caregivers, lack of insight into their illness, and accessibility barriers like time or location (shift workers and rural communities). chatbots are a potential solution as they can be available 24/7 over an internet connection @xcite . it is indispensable to address ethical and social implications when applying artificial intelligence (ai) in healthcare @xcite . the first thing to note is that regulations are often general and are one step behind ai's advances. @xcite provided an analysis of the risks and benefits of implementing ai solutions to mental health from an ethical perspective. according to the authors, conversational agents can potentially stop working and incorporate human biases. also, security is a high priority due to the nature of the information. conversational agents users must be aware that they are not interacting with a human, but with an ai. benefits include new opportunities for reaching patients (e.g., fear of stigmatization), increase treatment engagement, and improve patients' response @xcite . in addition to the ethical perspective, most healthcare conversational agents still have to be tested in randomized controlled trials. it can better determine how well the agents can assist a patient in the long run @xcite . research should also focus on providing better guidelines for chatbots development @xcite . conversational agents are designed accordingly with their goals. they can have a specific task to accomplish. symptoma @xcite and aquabot @xcite are examples of conversational agents for specific tasks. symptoma differentiates more than 20,000 diseases, whereas aquabot diagnoses autism and achluophobia (the fear of darkness). on the other hand, there are non-specific task agents, such as vik @xcite and clara @xcite . the former helps patients diagnosed with breast cancer, their relatives, and friends with advice and reminders. the latter is used to share information, suggest behavior, and offer emotional support during the covid-19 pandemic. as this work aims to implement a conversational assistant and apply it to promote smoking cessation, it is suitable to examine the impacts of a chatbot acting in this environment. in a two-arm controlled trial, @xcite compared the standard version of the pro version of the smokefree app against the standard version plus a chatbot. a total of 54,214 smokers participated in the study. after one month, researchers compared the groups for engagement (number of login sessions) and self-reported quit rates. they found that chatbot plus the standard version led to a 101% increase of engagement. however, quit rates did not differ statistically @xcite . there are some examples of real-time messaging recommendations. in @xcite , keyboard applications recommend emojis based on the typed words. gmail has a smart reply feature to suggest short responses to emails @xcite . an example of a tool that supports humans in a conversation is solutionchat @xcite . the framework proposed by the authors of solutionchat can assist the moderators of a discussion group. it provides an environment where multiple users can discuss matters, express their thoughts, and vote for potential solutions. there is the presence of a human moderator to guide the debate. the moderators in charge of managing discussions are often overloaded. solu-tionchat can offer suggestions to moderators and ends up promoting time-saving and even quality improvement to the discussion. according to the authors, their work is the first moderator assistance system for online chat conversation to combine summarization and real-time messaging suggestions. moreover, to the best of our knowledge, solu-tionchat is the framework that comes closest to our proposal. both can read messages and assist a human operator as suggesting intents. the difference between the frameworks lies in their objectives. so-lutionchat's authors designed it for management purposes. it aims to identify discussion stages and featured opinions in a structured discussion. our proposed framework aims to answer questions and offer information in the form of a question and answer approach. also, a human is present here to confirm the suggestions. consequently, this supervision can be used to provide implicit feedback. healthcare is an area where the adoption of a fully automated chatbot is delicate. the presence of a human guiding the conversation is desirable. to overcome the risks of deploying a fully automated chatbot and benefit from the nlp techniques' advantages, we propose a conversational agent that assists human operators. the framework can classify users' utterances and provides content suggestions. ## general architecture a framework to provide support to an operator of an assistance chat in the healthcare field is proposed here. instead of being a fully automated chatbot, the proposal provides support for the chat operators. the main benefits of using the proposal are improving the quality of the conversation and reducing its time. when chat operators are supplanted (which is a latent tendency for our case study), the framework assists their training, giving them suggestions for the conversation in practice. more details are in section 4. this section describes the general architecture, which considers the benefits of advances in nlp and overcomes the opposing sides of applying chatbots in healthcare. in the proposed framework, the user's intent is identified when a message is sent to the chat operator. when a user sends multiple messages, they are gathered together into a single one. as a result, one intent is predicted for this new merged message. next, a set of potential answers related to that predicted intent is selected and displayed to a chat operator. the operator then selects and edits the message. subsequently, the operator sends the answer to the user. data generated during the framework's execution is collected to improve the quality of the classification and suggestions. figure 1 presents the proposed framework. ## case study: viva sem tabaco viva sem tabaco (vst) is a web-based intervention for smoking cessation. the website's content was adapted from evidence-based guidelines for treating tobacco addiction @xcite . vst provides information, quizzes, personalized quit smoking plans, and a chat. in this platform's chat, the chat operator is a counselor. a counselor is responsible for identifying a user's concerns and answering appropriately. the counselors are undergraduate students of health courses, trained by the psychologists' team. due to the healthcare area's delicateness, it is desirable that counselors are well trained and adequately follow the intervention's guidelines. a team of psychologists guarantees the quality of the vst platform's content. they create the web site's content and train new counselors. the psychologists also composed a document containing instructions for the chat interactions, specifying how the counselors should assist a user looking for help on vst. according to this document, the counselor must identify the user's need and answer with appropriate content from the vst's website. the current version of the open-source implementation of the proposed framework is available in the python programming language foot_0 . we are incorporating the framework into vst to enhance the counselor's performance by (i) keeping the conversation focused and avoid ambiguities, and (ii) reducing the response time. we used spacy and rasa. the former is a free, open-source library for natural language processing. we imported its pretrained word embedding for portuguese. the latter is an open-source machine learning framework, developed to implement contextual ai assistants and chatbots. rasa is used for generating models to classify intents of an utterance. rasa uses spacy's word embeddings models to represent texts numerically. ## concluding remarks and future works in this work, we propose a framework to assist chat operators of healthcare systems. the framework classifies the user's utterances into intents. it provides real-time suggestions to the chat operators of mental healthcare services. the advantages of adopting the proposed framework include improving the quality and reducing the time of conversations between users and counselors. the conversation's quality is increased due to the assumption that the framework's suggestions reduce ambiguity and rambling in the chat operator's discourse. the conversation's time is reduced due to the real-time suggestions offered by the framework. the chat operator does not waste time overthinking or searching for appropriate content to answer the users. a fully automated approach would be faster, but removing the human from the framework would lead to the negative characteristics of conversational agents present in the literature. users looking for mental assistance are often mentally weakened, and a human can handle unusual situations. however, through the feedback module and further evaluation, the framework may become fully automated in the future. future works include adopting the framework in other health-related domains, gathering and analyzing data of its usage. the framework can be easily adapted to be used in other domains, by adding new training data, sets of intents, and sets of suggestions. reports from users and counselors can be collected in order to evaluate the framework's efficacy.