Implementation of a Smarter Herbal Medication Delivery System Employing an AI-Powered Chatbot

—Medicinal plants are a practical and cost-effective alternative for treating common ailments, especially in areas with limited access to public healthcare systems. This paper introduces a prototype of an intelligent interactive system that merges chatbot technology with artificial intelligence (AI) to address inquiries related to treatment alternatives and the application of different medicinal plants for prevalent health conditions which promote and advance alternative healing practices in the locality. The platform is a hybrid online chat service that prioritizes consumer health and encourages the responsible use of medicinal plants. This study used a survey questionnaire to gather information from traditional healers and users and concerned government agencies about how well the system prototype performed. The system's performance was assessed in terms of effectiveness, efficiency, and customer satisfaction, with respondents providing an aggregate rating of "Strongly Agree". Significantly, this study lays the groundwork for education on the use of local medicinal plants to cure illnesses and highlights the importance of providing users with accurate and reliable information on the safe use of medicinal plants. This approach empowers users to make informed decisions about the plants they use, reducing the likelihood of harmful effects and optimizing the potential benefits of medicinal plants. By supporting this effort, this study contributes to the achievement of the third Sustainable Development Goal of the UN, which aims to promote health and well-being by offering the local populace a low-cost option as a first line of defense for improving their health and wellness.


INTRODUCTION
Individuals who have limited access to the nation's healthcare system frequently rely on herbal cures and medicines that treat a wide variety of illnesses and diseases. The World Health Organization (WHO) estimates that 21,000 pharmacological flowering plants have medicinal potential, which represents more than 30% of all plant species [1].
The Philippine TAMA Law of 1997 or the Traditional and Alternative Medicine Act represents a legitimate justification for highlighting the significance of traditional and complementary medicine for people's insurance. It was established to enhance the quality and health care services provided to the Filipino populace. The Philippine Institute of Traditional and Health Care (PITAHC) has been tasked with implementing the law whose primary purpose is to promote alternative and traditional medical items, methods, and techniques that are effective, safe, efficient, and readily available [2].
The Traditional Knowledge Digital Library (TKDL) website in the Philippines was created to ease the execution of the law. The use of traditional medicine in customs and activities associated with healing can be researched and examined by readers. The TKDL website lists 864 medicinal plants with 3,737 different medical uses [3]. Moreover, a group of researchers in the province of Catanduanes made available recorded data on specific plant species that are effective for treating a wide range of common ailments; the procedures used by healing practices while employing medicinal plants; and how the indigenous people's wisdom and experience shaped the plant medicines' formulation and its usage, and how they observed their effects on their patients [4] [5]. Whilst there is significance in using herbal treatments in medicine, there isn't a publicly available internet database that might give plant medicinal information in the form of a virtual conversation, making it challenging to spread and advance such information. Residents of Catanduanes' distant areas, who depend mostly on in-demand herbal medications from clinics, may have problems because of the absence of such a repository. Utilizing information and communications technology (ICT) may facilitate quick and accurate data analysis, effective decisionmaking, and an improved understanding of the requirements [6]. Knowing that folks prefer to communicate online, specifically on social media platforms like Facebook, developing an application addressing this issue would allow people in rural locations to be educated on plant healing techniques from the comfort of their own homes. ICT facilitates quick and easy access to knowledge, concepts, and experiences from numerous cultures, civilizations, and beliefs [7].
The use of Chatbot technology combined with AI can provide real-time access to information. Developing a chatbot with integrated AI can help provide humans with decisionmaking capabilities and web application experiences [8]. Using machine learning and natural language processing (NLP), chatbots facilitate human-to-human communication. In a range of fields, including medicine, agriculture, education, business, and e-commerce, NLP-based chatbots analyze and interpret real human language. Intelligent agents are capable of a variety of tasks, from straightforward physical work to intricate operations. One of the simplest and most popular types of intelligent human-computer interaction is a chatbot which is a basic illustration of an AI system. The use of chatbots in a diversity of businesses has been extensively researched in the The aim of the present study is to bridge the gap and offer design considerations for developing a prototype system that can retrieve up-to-date information on medicinal plants and their applications, which can then be disseminated to people in underserved areas or in places without access to proper medical care.
This paper presents the development of MedPlantBot, a prototype system that integrates chatbot technology with AI. Its purpose is to provide a comprehensive database of various medicinal plants, including taxonomic classification, medicinal benefits, and categorization. The MedPlantBot framework model was carefully designed and built on established chatbot design techniques and AI frameworks, leveraging Google's Dialogflow to provide users with insightful guidance on appropriate medicinal plants for their specific health concerns. This user-friendly system is available round-the-clock and can be accessed from anywhere with internet connectivity, making it a convenient source of prompt and accurate information for both simple and complex queries. The evaluation of the Chatbot system prototype in this study utilized the Chatbot Usability Questionnaire (CUQ), a survey instrument that measured the chatbot's performance. MedPlantBot has the potential to assist individuals in making informed decisions regarding their health and well-being.
This study aimed to develop an AI Chatbot model that could recommend medicinal plants for treating various ailments, illnesses, and diseases. The study involved identifying plant species with medicinal properties, analyzing the design techniques of existing Chatbots and AI Chatbot frameworks, and developing a framework model for the MedPlantBot Chatbot system. Additionally, the study evaluated the performance of the framework's prototype in terms of efficiency, effectiveness, and satisfaction. The development of MedPlantBot which shares information about using medicinal plants to treat illnesses is a game-changer in healthcare computing. This innovative technique harnesses the power of AI and NLP to offer users customized treatment programs that integrate traditional knowledge of medicinal plants. By merging the use of medicinal plants with modern healthcare practices, this chatbot presents an exciting opportunity to enhance healthcare outcomes and encourage a more comprehensive and sustainable approach to medicine. In essence, this study has the potential to provide residents with a cost-effective alternative to their initial healing practice, hence fostering better health and wellness. This coincides with the United Nations' third Sustainable Development Goal, which is Good Health and Well-Being.
The subsequent sections are organized as follows: Section II examines related works. Section III details the methodology employed by our proposed prototype system. Section IV contains the results and discussion. Section V summarizes our research findings while Section VI discusses the study's ramifications and future undertakings.

II. RELATED WORKS
This section presents the analysis of the design methodologies of existing chatbots. This study discovered that creating a chatbot requires a range of strategies and approaches.

A. Chatbot Design Process
Building a chatbot begins with determining the scope and needs [9]. It emphasizes that two strategies such as conversation flow and knowledge modeling are important considerations while creating the chatbot. An adequate definition of the questions and answers must come first. The design of the chatbot, which is built using a decision tree algorithm that creates branches based on user input intents, is noteworthy. It simplifies the search procedure. Also, [10] constructed the MedBot using random forest, an ML decision tree algorithm, to make decisions. Significantly, this highly accurate approach minimizes uneven data. Fig. 1 shows the general design of a chatbot system [11]. It is recommended to build a chatbot utilizing the aforesaid design, which comprises natural language and the user interface. backend, answer generation, natural language understanding (NLU), and dialogue management [12][10]. Ahmad et al. describes how a chatbot system works [13]. The user submits text using the chatbot's graphical interface. The text is then divided to find terms that may be used as patterns in pattern recognition. Finally, the system produces dynamic replies that are sent to the user. Many chatbots use the term "pattern matching" method that uses pattern recognition. Matching patterns are used to deliver valid replies to user inquiries founded on matching groups, such as plain statements, natural language, and semantic analysis and interpretation of the queries. Based on the Google Dialogflow (GDF) architecture and NLP, [12] created an AI Chatbot application that gives users access to information on COVID-19. The Chatbot agent combined a rule-based and a learning-based algorithm using the GDF framework design architecture to create a hybrid agent. The user interfaces for end users, natural language comprehension, and natural language creation make up its three (3) components. Similar work was done by Ranavare et al. who used GDF to create an NLP-based chatbot system. The purpose of the lesson was to inform the students about placement activities [14]. Furthermore, Muhammad et al. provides a thorough explanation for creating AI-enabled and speech-recognition chatbots that are utilized for English discussions where GDF acts as the AI's engine [15]. Software www.ijacsa.thesai.org developers leverage NLP-based GDF in constructing conversational user interfaces. GDF's APIs permit the incorporation of cognitive and AI services from other cloud providers. Facebook Messenger and other related services are already incorporated. Chatbots for popular messaging applications may be easily made by developers. Considerations for the design of intentions, entities, questions, and solutions must all be incorporated into a GDF-based intelligent chatbot. GDF provides knowledge base applications and sentiment classification [16]. According to the high-level design of Dialogflow, any channel technique that GDF provides can be used to connect a user to the platform. This platform converts real English into data that computers can comprehend by utilizing comparable sentences to build a machine-learning model. The GDF backend interacts with other APIs, databases, or services to complete the user's query [17]. The client interacts with the input device as shown in Fig. 2. The GDF engine accepts the query of the user. GDF then tries to determine the user's intent. Based on the intent, the fulfillment is conducted, and the data is sent from its source. The response is then processed into data that is usable. Eventually, the output device provided the user with the necessary information. The essential components of a chatbot are intents. To parse user data, intents' logic and elements are employed. This synchronizes the user's inputs with the result. In addition to contexts, Dialogflow supports entities, utterances, actions, training texts, and responses [9][18] [19] [15]. The intent describes each intended Chatbot action and the possible queries that could be used to complete the task. User requests are expressions or utterances that must be matched to the intent's questions. Entities are used to detect and extract meaningful information from natural language feeds. The inclusion of annotations to training words enables GDF to recognize generated data. Annotated group of words permits the specification of which variables to match and against which entities to match them. Once established in actions and parameters, tagged parameters are automatically applied.

B. Evaluating AI Chatbot System Performance
The system prototype is evaluated to determine whether it achieved the goal for which it was built. Furthermore, it enables design iteration before takeoff, which aids in the delivery of a successful and efficient product.
The AI Chatbot System's performance is evaluated based on three (3) metrics, namely, effectiveness, efficiency, and satisfaction [20]. Table I lists the quality characteristics arranged in accordance with ISO25000 based on an analysis of the evaluation instrument used in the existing chatbot system.

III. METHODOLOGY
This study established a process for building the system prototype from data gathering and collection of medicinal plants that exist in Catanduanes to identifying the technology and designing the system's framework as the basis for the development of the AI-based chatbot system grounded on the mixed-approaches strategy combining documentary analysis with qualitative and quantitative research methods. The methodology used in this study to construct the Chatbot framework was based on a review of [21], as shown in Fig. 3. www.ijacsa.thesai.org

A. Data Collection and Gathering
An initial review of the existing literature, in-depth interviews, and focus group discussions was conducted to identify the needs and select the appropriate technology and framework design for the study. Participants of the study were chosen voluntarily, and it was ensured that they had research experience and a deep understanding of the subject under investigation. Consequently, between January 2022 and March 2022, participants were interviewed in the province of Catanduanes, including domain experts, users, and practitioners of medical plants, as well as representatives from relevant government agencies and researchers who studied medicinal plants.

B. Data Analysis
A comprehensive literature analysis was conducted to organize and assess the documentary evidence of different discoveries from studies on frameworks, chatbots, and herbal medicines. The researcher looked up and analyzed previous research on chatbots in several internet databases.

1) Medicinal plants data:
Focus groups, interviews, and documentary analyses and assessments of past studies on the Catanduanes' medicinal plant study were undertaken by the researcher. There were 56 medicinal plants that have been identified [4]. The same study was carried out by [22]. The author provided a list of 115 medicinal plants utilized by Catanduanes' indigenous healers. From the list, ten (10) medicinal plants, such as Acapulco, Ampalaya, Bawang, Bayabas, Niyug-niyogan, Sambong, Tsaang-gubat, Ulasimang bato (pansit-pansitan) and Yerba Buena have been approved for usage by the Philippine Department of Health (DOH) and PITAHC [23]. Based on the information gathered, Catanduanes is home to all the medicinal plants endorsed by DOH and PITAHC.
Twenty-six (26) medicinal plants in Catanduanes were identified by the researchers. Limited research undertaken between 1998 and 2014 yielded the data, which included information on taxonomic classification, symptoms or diseases healed, and the preparation and application of the plants. Fig. 4   2) Proposed medplantbot system design architectural framework: After collecting the foundational data on medicinal plants, this study created training datasets, a knowledge base, and a conversational flow that revolves around the subjects and elements of a Chatbot based on the medicinal plant data from Catanduanes. The knowledge base offers a list of keywords, synonyms, and other phrases when conducting a keyword search. A group of knowledge bases consisting of MedPlantBot's frequently asked questions about medicinal plants is shown in Fig. 5. Each knowledge base contains medicinal plants profile, including their description, taxonomic classification, therapeutic uses, ailments cured, method of preparation, and application. The conversation flow for learning about medicinal plants from the MedPlantBot FAQ and knowledge base is shown in Fig. 6. It explains how to advance through the various tiers of the dialogue. The orange and green boxes reflect the user's input and MedPlantBot response, respectively. The flow of conversation directs communication while creating a chatbot. The connection between chatbots and humans remains flexible and personalized.
As indicated in Fig. 7, the overall serverless system design architecture for the MedPlanBot prototype system was then established. The framework comprises the system's architecture, which is designed on a serverless infrastructure for scalability and cost-effectiveness. The system employs multiple services, including Django, GDF, and Google Cloud Functions, to deliver a seamless and effective user experience. The design also includes natural NLP and machine learning (ML) algorithms to improve the chatbot's capacity to effectively comprehend and react to user queries. The created framework seeks to provide a user-friendly and reliable platform for accessing information about medicinal plants in Catanduanes. The MedPlantBot framework consists of multiple components that aim to offer a user experience that is smooth and efficient. These include (a) User Interface (UI). The UI is built using Django, a high-level python web application framework that enables the quick creation of websites. Users interact with the chatbot via text or voice through the UI; (b) GDF. The GDF serves as the main natural language understanding (NLU) and conversation engine. It receives user queries, identifies their intent, and retrieves relevant data from the data source. The response is processed and made usable before being sent to the output device to provide the user with the appropriate response. (c) Google Cloud Functions (GCF) is a serverless cloud-based core fulfillment solution that does not require server administration, operating system updates, or software configuration [24]. Its fully customizable chat widget provides consumers with live chat support. To connect a GDF-generated MedPlantBot to a website, obtain the account key from the GDF portal and then browse to the bot integration part of the chatbot platform, where the application id is provided.
The MedPlantBot framework employs NLU, AI, and serverless architecture to provide a customized chatbot experience. The seamless integration of these technologies facilitates user access to medicinal plant information. The framework strives to improve the user experience and give users a dependable and accurate platform.   3) Design prototype survey: The objective of this study is to develop a prototype system providing customers with accurate and useful information about medicinal plants. To evaluate its effectiveness, the researchers used a survey questionnaire that included three metrics: effectiveness, efficiency, and customer satisfaction [20]. The effectiveness metric measures how well the chatbot can provide accurate and relevant information. The efficiency metric measures how quickly the chatbot can respond to customer queries and provide solutions. The customer satisfaction metric measures how satisfied customers are with the overall performance of the chatbot.
The questionnaire was distributed to a selected group of one hundred fifty (150) participants, comprising traditional healers and herb users from Catanduanes with a keen interest in the use of medicinal plants for health and wellness, and IT professionals with expertise in chatbot technology and system design. The participants were chosen using the chain-referral and snowball methodology. During the survey, participants were required to engage in an online chat with MedPlantBot using any device such as a laptop, desktop computer, tablet, or smartphone. The survey questionnaire consisted of a series of questions that measured the participants' agreement with the chatbot's performance using a 5-point Likert scale. The scale included the following responses: Strongly Agree (SA), Agree (A), Neutral (N), Disagree (D), and Strongly Disagree (SD). Weighted mean statistics and frequency counts were used to evaluate the responses and determine the chatbot's overall performance. Along with the survey questionnaire, a nondisclosure agreement was provided to safeguard the participants' responses. The participants voluntarily participated in this study, and they had the right to quit at any time for any reason.

4) Designed framework's drawback:
The survey results revealed that respondents advocated for the inclusion of more comprehensive explanations of medicinal plant data, such as videos, images, and web pages. This suggestion was considered and incorporated into the knowledge bases of the proposed framework. Yet, the survey results demonstrated that only a small proportion of respondents could predict the user experience. Thus, future studies will require a larger data set covering all medicinal plants information found in the province of Catanduanes and a bigger sample size to obtain more precise and reliable results.

5) Case Study (Future Work):
Prior to the future use of the recommended platform, the system must be thoroughly tested to ensure that it meets the needs and expectations of the clients and that it functions properly. User acceptability testing, system testing, integration testing, and unit testing are a few instances of validation activities.

IV. RESULTS AND DISCUSSION
The focus of this research is to create, develop, and evaluate the effectiveness of an AI-based chatbot system that recommends beneficial plants and explains how to utilize them to treat diseases and illnesses. This section presents the developed MedPlantBot system prototype and its evaluation result.

A. The Developed MedPlantBot System Prototype
The MedPlantBot system prototype was developed using the dynamic approach when retrieving data. The prototype's system has functional and non-functional requirements. The functional requirements for the MedPlantBot are as follows: both regular users and admins must be given access to the system, and admins must be given the ability to administer inquiries, answers, and knowledge bases; the chatbot must be able to interact with users via text and speech, require the user to supply their name and email address before starting a conversation, answer user questions instantly, and be simple to integrate with well-known platforms like Messaging Apps, Google Assistant, Facebook pages, Skype, Telegram, and others; and the system shall permit real-time human interaction to answer questions that cannot be answered by the chatbot, and b) Non-Functional Requirements include, the system employs concise, clear, and easy-to-understand language; it shall maintain the knowledge bases and FAQs that are required for retrieval up to date, and it shall have an interactive and user-friendly interface. In less than three seconds, the system must immediately assign a live chat representative, react to inquiries in no more than three seconds, maintain discussion transcripts, be changeable and flexible, and must ensure the availability and accessibility of the system from any location; be able to seamlessly integrate with external APIs, and not need more than 24-hour maintenance outage per day. Fig. 8 to 12 demonstrate the dialogue between the user and MedPlantBot. The first window that displays after login into the system is depicted in Fig. 8. The bot explained the application's objective. The user can choose from a menu of topics such as medicinal plant profile and medicinal plant drugs, enter the desired question, or talk with the available human agent to address their concerns.  Fig. 9 shows an example of a user selecting "I have a question" from the menu. "What is the description of the Bakong plant?" asks the user. The customer is looking for information on Bakong, a medicinal plant. Fig. 10 depicts  www.ijacsa.thesai.org MedPlantBot's response to the query. To help the user become more familiar with the Bakong plant, the bot supplied both a description and an image of the plant. The description and the image are presented where it was retrieved from the MedPlantBot system's knowledge base. Fig. 9. An inquiry about a certain medicinal plant.  Fig. 11 shows the user's request for instructions on how to prepare Bakong plant to treat indigestion. A response to the query is provided once it is found on MedPlantBot's knowledge base. As reflected, the MedPlantBot gave the customer the instruction: "Boil ½ glass of chopped fresh roots in 2 glasses of water for 10 minutes." And if additional questions arise, the user can choose an option from a menu such as a plant profile, medication, or even talking with the available human agent. The user can just put the desired question in the box if he prefers not to choose from the available alternatives. When the user wants to have a real-time chat with the available human agent, he can simply select from the menu "Talk to Human". Once selected, MedPlantBot automatically displays the name of the available human agent in the window. They can now converse with each other. This is depicted in Fig. 12.

B. MedPlantBot's Performance Evaluation Result
The proposed MedPlantBot prototype design framework underwent evaluation using a CUQ instrument, which assessed its effectiveness, efficiency, and satisfaction. A total of 150 people were contacted to provide comments and suggestions for improving the application's design. As shown in Fig. 13, the MedPlantBot system received a high-performance rating of www.ijacsa.thesai.org 4.76 out of 5, indicating a strong level of agreement among users. This positive response is attributed to the user-friendly approach and architecture of the system. While the feedback was generally positive, some respondents did provide improvement suggestions. Specifically, users requested clearer notifications that the application should not be used for life-threatening situations, as well as more detailed explanations of medicinal plant information, such as videos, images, and web pages, and they even suggested that the system should cover all medicinal plants with therapeutic properties found in Catanduanes These suggestions could further improve the user experience and usability of the MedPlantBot system if implemented. The findings of this study indicate that chatbots are extremely user-friendly and can provide appropriate responses and treatment recommendations for a wide variety of ailments, making them readily available to anyone seeking natural remedies. Using a survey questionnaire, the effectiveness of the MedPlantBot framework in delivering herbal medication was evaluated. Respondents strongly agreed that the chatbot provides an intuitive interface that is highly efficient, effective, and satisfying. Users lauded the chatbot's ability to prescribe relevant herbal treatments and provide customized treatment plans. The MedPlantBot system prototype has the potential to contribute significantly to the healthcare industry, while simultaneously encouraging sustainability and ethical practices. This discovery could serve as a springboard for the development of comparable technologies that can aid in the responsible use of natural resources.

VI. IMPLICATIONS AND FUTURE WORK
The MedPlantBot technology has the potential to revolutionize healthcare through natural therapies. Its encouragement of medicinal plant use increases awareness of the importance of natural resources and contributes to the protection of biodiversity. In addition, the MedPlantBot serves as an educational tool for the community to learn more about the therapeutic usage of local medicinal plant resources. This framework offers a low-cost method for enhancing public health and welfare, aiding policymakers, and healthcare professionals in the development of herbal medication recommendations and regulations. Likewise, this research helps to the creation of a more sustainable and ethical approach to the use of medicinal plants, leveraging technology to ensure environmentally responsible resource management.
Future research can be carried out to enhance the chatbot's performance and broaden its capabilities, which can ultimately benefit more individuals in search of natural therapies. The MedPlantBot can be assessed and analyzed in terms of chatbot design characteristics based on ChatbotTest [18] such as a) Personality. The onboarding process is crucial for chatbots. Onboarding is uncommon, however. We observed that many users see Pedagogical Conversational Tutor (PET) more like a search engine than a conversational partner and that this perception is shared by many users: b) Onboarding. The Microsoft Azure Bot Framework-based personality-adaptive chatbot prototype is constructed on the web and can be inserted into a variety of channels since it is browser-based. For the task of employment suggestion, which is separated into two subdialogs, the appropriate discussion tree is triggered depending on the input personality: c) Understanding. The adoption of a chatbot for tourist planning in a unique way. By understanding the adoption variables, tourism businesses may use chatbot technology to improve the customer experience and increase consumer engagement; d) Answering. It must have access to an external body of wisdom and knowledge (for example, through data corpora) to perform the role of competence and respond to user inquiries, should keep data unique to the situation: e) Navigation. Information that links customers with programs services -which may contain a contact record's regular features as well as a textual description of the resource; f) Error management. The handling of errors in iHelper must be improved right away since typos are not caught. Using spellchecking APIs might help with this; and g) Intelligence. The conversation flow of intelligence chatbots may be tailored to clients and their use cases. The design component of chatbot software is essential. Furthermore, exploring the possibility of integrating a geographic information system (GIS) to map and expand the dataset of medicinal plants may be a promising avenue for future endeavors.