User interfaces in computer applications can be in different forms such as graphical user interfaces, command lines, menu driven, form based and natural language [1
]. Recent development of computer technology, Internet of Things (IoT) and artificial intelligence (AI) generated more advanced interfaces such as chatbots and virtual reality [3
]. A chatbot is a software application designed to replace humans to provide user communication through an on-line chat conversation. Our research team proposes that there is a need to make the chatbot humanlike, by simulating the ways a human would behave and respond in the user conversation, especially when covering emotional and sensitive topics [6
]. The chatbot is talking to real human beings, often worried and in distress. A chatbot should not just be vocalizing the written content available on a website. It should be constructed like a fictional character in literature, to whom the user can feel connected, who can be a reassuring voice in times of need. We named our chatbot the RT Bot.
Technically, the RT Bot has the necessary features, complete with routine testing, turning and updates necessary to pass the standard of the Turing test [9
]. Nowadays, a chatbot in any domain is very popular as a virtual assistant to answer questions from users in business, industry and healthcare [11
First, the RT Bot must be loaded with the necessary information. It is not just reading out information regarding cancer health that can be found in cancer centre or hospital websites. Such websites usually provide a list of topics which are neither interactive nor offer any personal touches, in attempting to understand the concerns of the users. Cancer patients, families and practitioners, on the other hand, are in challenging, often stressful, situations, wanting to access accurate information as efficiently as possible. On top of this, there is seldom any information specifically on radiotherapy, despite the large number of cancer patients, especially those with advanced stage (metastatic) disease that have to go through this process. Having “someone” with professional knowledge who can “listen” to them, provide the medical information with good will and encouragement goes a long way to help patients and families struggling with death [14
]. As it is quite impossible to have real medical professionals to stand by around the clock to answer questions especially during the pandemic period, an educational chatbot would be essential to disseminate health information to the users. For example, the radiation treatment process is often a black box for cancer patients and families. They may scramble for answers everywhere, from visits to libraries, to Google search, asking Siri, or posting their questions to WhatsApp groups. However, they may not be getting the sort of accurate information they need. Recent innovative computer technology and technique such as IoT and AI apps in mobile devices can be used to provide the information about radiotherapy needed by patients and their families [16
]. However, these still need to be customized to be relevant to the user’s query.
The performance of a chatbot can be enhanced by AI, which makes the chatbot more powerful than a conventional website and Google searches, because the machine learns from the user’s request and improves its knowledge base with each interaction [11
]. It is situational, providing answers specific to the situations and environment of the query [18
]. Machine learning (ML) and natural language processing (NLP) are two branches of AI generating the chatbot. Machine learning can read text to discern the sentiment of the user through natural language understanding [19
]. The NLP applications try to understand natural human communication and respond to the user using a similar and natural language [20
]. Machine learning is used to understand vast nuances in human language and to learn to answer in a way that the user is likely to comprehend. The innovation in AI through powerful ML algorithms and NLP can enable the chatbot to hold conversations with the user without too much human intervention.
Medical chatbots can carry out different functionalities. In cancer treatment, Bibault et al. [21
] have investigated and found that chatbots can create bi-directional information exchange with patients, which could be leveraged for the treatment process, screening and follow-up. This AI-assisted chatbot can be deployed over various modalities such as text messaging, mobile applications and chat rooms. In healthcare, Chung et al. [22
] proposed a chatbot-based healthcare service with a knowledgebase for cloud computing. They proposed a mobile health service based on a chatbot in response to accidents or change of conditions of patients with chronic disease, which may occur in everyday life. Lokman et al. [23
] designed a chatbot that can function as a virtual diabetes physician. The chatbot allows diabetic patients to have diabetes management advice without going to the hospital. Hajare et al. [24
], on the other hand, proposed a chatbot that not only can answer each and every query asked by the end user, but also focuses on a local database as well as a web database for educational purposes. The chatbot is built making use of the most recent technologies such as ML, NLP, pattern matching, data processing algorithms to enhance the performance. Setiaji et al. [25
] draws attention to a human-to-machine conversation model using knowledge in a database. This chatbot includes a core and an interface that accesses that core in relational database management systems. The database stores the knowledge, and the interpreter stores the programs of function and procedure sets for pattern-matching requirements. The above AI-assisted chatbots in medicine show that the main challenges are to train the chatbot to understand the context of the user, to learn how the chatbot handles open-ended or unstructured inputs from the user, especially about emotional or sensitive topics.
In this paper, we present the design of an educational chatbot for different kinds of users: cancer patients and their families, general public and radiation staff working in the cancer centre or hospital. We will cover the different stages of design, including defining the problem, creating conversational flow, chatbot training, testing and evaluation, maintaining and updating. We also discuss the programming and implementation issues we encountered when creating the educational chatbot in radiotherapy. The objective of the chatbot is to conduct a basic and comprehensive information transfer from the chatbot provider to the user regarding simple knowledge in radiotherapy, customized for different kinds of users. The chatbot is designed taking advantage of some AI features such as NLP and informed by communication strategies for the targeted audience.
To demonstrate the communication flow and running at the start, the chatbot created based on the architectural scheme in Figure 4
begins by introducing itself and asking the user questions to categorize the user into patient, radiation staff, from the general public or from the patient’s family as shown in Figure 7
In this example, the user identified himself as radiation staff in the cancer centre. The chatbot then displayed a list of items showing a variety of information that the user might want to know (Figure 8
The contents of the list included different categories of information such as patient consultation, simulation, treatment planning, treatment delivery, patient follow-up, quality assurance and so on. This list was designed specifically for the radiation staff. For patients and the general public, they had their own list of information. When the user (radiation staff) selected “Simulation” from the list, the chatbot further asked the user to clarify if he or she was interested in “CT-SIM” or “Conventional SIM”. These are two common treatment simulation methods in radiotherapy. To answer that, the user only needed to click the icons to obtain the information as shown in Figure 9
Sometimes, the user may ask the chatbot a question directly. For example, the user asked the chatbot “What is clinical trial?” in radiotherapy as shown in Figure 11
. In that case, the chatbot answered the question and asked the user if he or she wanted to know more, such as different phases of clinical trial. The user could then select a phase (Phase 1–4) from the chatbot. In Figure 11
, the user picked up Phase 1. The chatbot would then explain further the Phase 1 trial in greater details.
4.1. NLP and ML
George Bernard Shaw said: “Progress is impossible without change, and those who cannot change their minds cannot change anything.” [31
]. ML brought about sweeping changes in recent years and accounted for significant progress in medicine such as in creating medical chatbots. The Turing test is used to evaluate the intelligence of the machine, and the test is passed if a human being cannot distinguish the machine from another human being through conversation [32
]. Since then, NPL was developed to enhance interactions between computer and human language. In the past, NLP depended on a set of hand-written rules coupled with dictionary look up to learn and understand the language from the user. It can be seen that such hand-written rules would only become more and more complex and unmanageable. ML, on the other hand, can simplify and enhance the learning process because the computer can automatically focus on some common cases selectively based on the ML algorithm. These automatic learning procedures supported by, for example, neural networks, can help to generate models to manipulate unfamiliar and erroneous user’s input.
NLP includes a number of developed tasks in text and speech processing. These tasks include word segmentation, text-to-speech, stemming, sentence breaking, relationship extraction and so on [33
]. Compared to other conversational and prescriptive medical chatbots, the goal of our educational chatbot is to provide information transfer to users who may be radiation staff, patients or people from the general public. Therefore, the main focus of the NPL in our design is to understand and classify the expression from user’s with different backgrounds. In creating such a chatbot, some NLP tasks were used such as (1) Name Entity Recognition
: this process helps to find out the entity of a person, location and organization from the user’s input; (2) Intent
: this process helps to execute an appropriate action to achieve the user’s goal; (3) Context
: this process differentiates the user’s input to investigate if the message may have different meaning in the conversation; and (4) Entity Linking
: this process helps to link any words which are referred to an entity such as a popular location, a well-known company or a famous person.
4.2. Programming and Implementation
In programming and running the educational chatbot, one issue found was the lack of global ability to restart the conversations freely by the user, as the chatbot is deposited on an IoT. For the IBM Watson Assistant, though the “Clear” function in the developer tools allows the conversation to reset back to the first node, when creating the chatbot in the platform, such a function is not available once the chatbot is published. Therefore, to implement this ability globally, every single node needs to be reworked manually. The solution is to add a new intent, linked to an exit node back to the first node. However, adding an exit node to some key parts of conversation would result in unforeseen error because the initial design of logic in programming did not foresee the need for this functionality.
Another programming issue in creating an educational chatbot for radiotherapy is the lack of ability to perform mathematical operations for the context variables. For example, when the chatbot offers a radiation safety test to the user (radiation staff) as training, it is desired that the chatbot could calculate the final mark of the test and provide a letter grade or percentage result to the user. In this case, the results can only be displayed in text format, where each question is either “Correct” or “Incorrect”. When creating the chatbot, the development tool does not allow the developer to add up the context variables of the result of each question.
For the AI-assisted chatbot, NLP is used to understand and interpret user inputs. Sometimes, this is challenging and can be a difficult task due to the complexity and variability of human language. Moreover, the chatbot may have difficulty in understanding the context of a conversation. To avoid a poor understanding of open-ended or unstructured user inputs, and to address the difficulty in identifying intents and entities, the chatbot will first identify the user’s background and classify the user into a user group (e.g., patient, radiation staff and general public). This can direct the chatbot to access the data related to the user’s background. In addition, to further avoid confusion and inappropriate responses, the chatbot will include guidance with fixed options to help the user.
For integration and implementation, the chatbot can be included in a website. IBM Watson Assistant allows the developer to integrate the chatbot into different third-party media such as WhatsApp with Twilio, Slack, Facebook Messenger, SMS with Twilio and Intercom as shown in Figure 4
. The chatbot can also be deposited into a website setting up through, for example, Weebly or WordPress. Since the educational chatbot in radiotherapy is quite specific, depositing it into a website allows the chatbot to be found by web crawlers. This ensured that if someone looks for a radiotherapy chatbot on a search engine, the chatbot can be found readily. This would not be the case if the chatbot was implemented through WhatsApp or Facebook.
For the privacy and security concerns, our educational chatbot only provides a single directional information flow from the chatbot to the user. Therefore, there is no storage and record of any user information such as personal data in the chatbot. Moreover, we do not find any significant time delay issue in the chatbot created using the IBM Watson platform.
4.3. Testing and Updating
Although the chatbot is powered by innovative computer technologies such as ML to provide humanlike communication to the user, various human user tests are necessary to find out any bugs in the chatbot and to evaluate its performance. This involves testing the chatbot with real users or simulated user input, and evaluating its performance based on accuracy and user satisfaction. The tests can be conducted by inviting different stakeholders to use the chatbot, including, people from the general public, patients and radiation staff, to test the chatbot for their respective databases. In the test, an evaluation template can be set up to measure different metrics regarding the user’s experience in using the chatbot. For example, the test can ask the evaluators to score their experience on a scale in a range of grades, based on the metrics of information quality, user experience and navigability, or the test can be designed following the recent international standards for measuring the “quality in use” of medical chatbots [34
]. The test can be carried out remotely through email invitation, or in person in a research meeting or conference, gathering a number of potential users such as radiation staff. To further evaluate and improve the chatbot, workshops for healthcare workers working with patients and families can be conducted to introduce the chatbot and ask them for feedback. These workshops are decent and essential in quality assurance to improve and fine-tune the chatbot.
When the educational chatbot is created and implemented, a continuous update of the contents and features are necessary. These include making adjustments to the conversational flow, adding new intents and entities or updating the training data. Although the chatbot has been validated before implementation, it may find it difficult to handle some edge cases which may not be covered by the training data, or the user may use an unexpected input. Moreover, some small errors which are missed in the validation process due to human variation may exist. These errors would be found occasionally by the users. Their feedbacks to the developer are important to further improve the chatbot. This process would take time but is worthwhile to continue in order to maintain the quality of the chatbot. Moreover, the content of the chatbot needs to be updated routinely to keep pace with new developments in radiotherapy, such as new cancer treatment techniques, new radiation safety policies or new statistical data in radiotherapy. The chatbot should be subject to continuous improvement, updated and modified frequently based on the feedback from the user, new features (e.g., new NLP algorithm) offered to the chatbot and new information in radiotherapy.
4.4. Chatbot Content Management
Building the content for the chatbot is a time-consuming process as the scope of information demanded by different groups of users can be extensive and under continuous update. Each item of information is subject to further breakdown of sub-items and so on. Since each item in the category is unique, the chatbot should provide information in a simple and comprehensive way as per different user classes. A careful selection and filtration of the content is necessary. For example, if the user asks for information about “Brain radiotherapy”, a simple explanation should be displayed with a further question following a customized chatbot conversation stream. In this case, the chatbot can further ask the user if he or she wanted to know more about different options of brain radiotherapy such as gamma knife, cyber knife or stereotactic radiosurgery offered by a medical linear accelerator. In addition, plain English should be used for patient and user from the general public while technical terms should be used if the user group is radiation staff.