integrate controlled interaction, multilingual support, and adaptability to resource-constrained environments.
Existing solutions often prioritize conversational capabilities at the expense of response consistency, while
others fail to address the accessibility needs of underserved populations. Consequently, there is a need for a
solution that balances the delivery of structured and reliable healthcare information with ease of use, ensuring
that healthcare communication is accurate, accessible, and inclusive for all users. To address these challenges,
this research develops and evaluates SehatBot, an AI-powered hybrid conversational chatbot designed
specifically for the WhatsApp messaging platform. SehatBot employs a menu-driven, rule-based finite-state
architecture, chosen for its simplicity, ease of implementation, and high usability among users. It also selectively
incorporates AI-based intent analysis to provide greater flexibility in interpreting user inputs. This hybrid
design combines a structured healthcare knowledge base with intelligent intent recognition to ensure the
consistent, accurate, and clear dissemination of healthcare information through a scalable and adaptable
system. The feasibility and effectiveness of the proposed SehatBot are evaluated through a controlled pilot study
conducted at the prototype level. This research contributes to the development of a multilingual healthcare
interaction framework, a structured healthcare knowledge organization strategy, and a messaging-based
deployment model designed for low-bandwidth and resource-constrained environments. The study focuses on
the conceptual design, system architecture, implementation, and prototype evaluation of the proposed chatbot.
Consequently, the system is not intended to perform clinical diagnoses, provide medical prescriptions, or initiate
emergency interventions.
[6]
Furthermore, the proposed solution is designed exclusively for deployment on the
WhatsApp messaging platform and does not include integration with other digital communication channels.
Due to the exploratory nature of this research, the study is limited to prototype-level evaluation and does not
include large-scale field deployment or statistical benchmarking of the system's performance.
2. Methodology
The proposed SehatBot system will be a modular, messaging-based healthcare chatbot that can provide
multilingual medical information via a structured conversational interface. The architecture of the system is
layered in separate modules or layers so each layer can be developed independently, scaled as needed, and
maintained separately. These include Messaging interface, Processing unit, Knowledge base, Data storage layer.
The backend of the system will utilize Python programming language and the Flask web framework to handle
incoming http request(s) and webhook communication.
[7]
Incoming user messages from the WhatsApp Business
API will be accepted via secure POST request.
[8]
Those POST requests will be passed and sent to the processing
layer.
[9]
For development & testing purposes, Ngrok will be used to expose the local Flask server to the internet,
allowing real-time webhook communication. However, in a production-oriented setup, deployment will be
configured on an Ubuntu-based virtual private server (VPS), where NGINX will act as a reverse proxy and
Gunicorn will manage application execution.
[10,11]
In addition to configuration of the VPS, Docker
containerization will be utilized to ensure portability of the application across multiple environments and
consistent deployment across multiple platforms.
[12]
The messaging layer is responsible for integrating with the
WhatsApp Business API, which provides encrypted communication using HTTPS & JSON payloads. It handles
only message transmission & reception, separated from internal processing logic. Once the received message is
processed by the core processing module, it performs intent recognition, state tracking, and response selection.
2.1 System workflow representation
In order to give a holistic overview of the interaction pipeline, the overall operational workflow of the chatbot
is depicted in Fig. 1. Fig. 1 gives a representation of the stages of processing in a sequential manner from the
user initiation to the response generation and then to the continuation of the session. Instead of giving a
description of the technologies, the workflow is centered on transitions between user interaction and response
generation.
2.1.1 Explanation
User input either via text or voice is routed through a central processing unit. Voice input is converted to text by
Speech-To-Text (STT), whereas text input is sent through to analysis. To generate the appropriate response path,
a finite state machine (FSM) is utilized to control conversation flow; it will ensure that users advance through a
series of steps in a logical sequence that includes collecting input, analyzing input and generating a response.
[2,13]
Once the relevant information has been retrieved, the response generation process utilizes contextually
tracked state along with knowledge retrieval to format the response into readable sections in the form of
structured messages suited for messaging interfaces. Upon providing a response, the system presents options
to allow users to proceed with their interaction or end the interaction thus controlling the conversational loop.
The Natural Language Processing (NLP) component of the system employs a hybrid method that combines rule-
based methodology with NLP based on models. Rule-based methodologies are employed when there are
predefined questions/queries and when consistency in medical responses is required, whereas NLP models can
be applied to more general user input to analyze them. In this manner, the system maintains both reliability and