Available via license: CC BY-NC 4.0
Content may be subject to copyright.
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
SAR Journal – Volume 7 / Number 3 /2024. 213
Multi-language Psychological Health Chatbot
Huda Hamdan Ali P
1
P, Yousef Majid Mahmood P
1
P
P
1
PImam Alkadum University College
Abstract – Diagnosing and treating mental and
psychological health problems has long been a
challenge for people and psychologists. This is due to
several reasons, one of which is society's view, where
people can be treated as abnormal. Therefore, with the
development of technology, especially artificial
intelligence techniques, researchers began to work on
finding different ways for people with psychological
problems to ensure their privacy and personal
information. In this paper, the design and
implementation of a chatbot was reviewed for helping
people who suffer from some psychological problems,
and to take advice or suggest ways to recover based on
a database of books related to this topic. A modified
artificial intelligence algorithm was used; the chatbot
integrates natural language processing (NLP)
algorithms to facilitate smooth and intuitive
interactions. Taking into account the inability of some
Arabic-speaking users to write or understand the
answers in English, as the approved sources are mostly
written in English. So the feature of translating
questions was added and then replying also in the
language that the user understands. After the
implementation and testing of the chatbot by a group
of people, the accuracy of the results was satisfactory.
The accuracy rate is up to 85% and the accuracy of the
results depends on the accuracy of the questions.
Keywords – psychological, chatbot; AI, digital
interventions.
DOI: 10.18421/SAR73-07
Uhttps://doi.org/10.18421/SAR73-07
Corresponding author: Huda Hamdan Ali ,
Imam Alkadhim University College
Email: 31TUhudahamdan@iku edu.iqU31T
Received: 29 July 2024.
Revised: 04 September 2024.
Accepted: 08 September 2024.
Published: 27 September 2024.
© 2024 Huda Hamdan Ali & Yousef Majid
Mahmood; published by UIKTEN. This work is licensed
under the Creative Commons Attribution-
NonCommercial-NoDerivs 4.0 License.
The article is published with Open Access at
Uhttps://www.sarjournal.com/
1. Introduction
Artificial Intelligence (AI) could be benefit
psychological health with the objective of
contribution healing platforms, accurate diagnosis, in
addition customized cures [1]. The challenges faced
by millions of people worldwide who suffer from
illnesses such as depression, anxiety, bipolar
disorder, and schizophrenia by examining the current
state of AI in mental health and exploring its
potential, limitations, and directions for future
research.
Limitations and opportunities for future study.
Issues are related to psychological health.
Furthermore, by inspecting speech, facial
expressions, and performance patterns, AI aids in
diagnosis [2].
AI-based chatbot purchases prominence as
effective modes of psychotherapy, offering
continuous support, self-help resources, and
cognitive-behavioral therapy [3].
Woebot, Wysa, Youper, and other psychological
health AI tools consume virtual reality treatment,
wearable sensors, machine learning-based diagnosis,
and natural language processing for clinical records
[4].
The main concept of digital psychological health
system encourages inclusion, equity, and cultural
sensitivity in the distribution of healthcare. It inspires
experts and designers to practice AI and digital
psychological health to support people steer
psychological suffering and illness and create
equitable futures for them [5].
Various researchers' effort to implement medical
chatbot in diverse ways and for different aims, where,
Athota, Lekha, et al. (2020) present a medical chatbot
using AI to diagnose diseases and provide preliminary
details before consulting a doctor. The chatbot uses natural
language and a database for data storage, using n-gram,
TFIDF, and cosine similarity for ranking and sentence
similarity calculation. The study contributes to the
exploration of AI-driven chatbots for healthcare systems
[6].
Seq2Seq is a deep recurrent neural network-based
adaptive therapy chatbot designed for COVID-19
students by Intissar Salhi and colleagues.
Nevertheless, training imposed limitations on
performance, and future research should take into
account more powerful computing instruments [7].
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
214 SAR Journal – Volume 7 / Number 3 /2024.
Goonesekera and Yenushka (2021) conducted a
pilot research to assess the efficacy of Otis, a chatbot
powered by cognitive behavioural therapy, as an
early health anxiety management intervention for
adults. The 14-day program, which was conducted
over Facebook Messenger, demonstrated notable
gains in quality of life, personal well-being, and
overall anxiety. The study demonstrates the potential
of chatbots for psychological wellness and the
variables affecting their utilisation [8].
Ahmad, Rangina, et al. (2022) propose Personality-
Adaptive Conversational Agents (PACAs) as a
solution for psychological health services, addressing
limitations of current conversational agents. They
developed six design principles for PACAs,
evaluating their potential in psychological health
support and offering guidance for practitioners [9].
Castañeda-Garza, Gerardo, et al. (2023) emphasize
that the COVID-19 pandemic has heightened
attention on mental health issues, with anxiety and
depression being major contributors to disability.
Even with challenges similar to inadequate finance
and infrastructure, AI deals an encouraging solution
through AI-based cognitive-behavioural therapy. The
study discusses AI applications in three spaces,
highlighting their potential contributions and
conversing ethical considerations similar to privacy,
security, and accessibility [10].
Objectives of the proposed work is to assesses AI's
application in psychological health care, focusing on
healing efficacy, digital dynamics, equity, inclusion,
and socially learned technologies for permission.
2. Proposed Methodology
The technical architecture of the suggested
chatbot is proposed to offer users a smooth and
instinctual support seeking knowledge. The chatbot
uses the CPU to perform instructions and runs
straight on dedicated or local hardware. This scheme
makes sure the chatbot can work fine without relying
on "cloud based services", which might be valuable
for privacy and data control.
The chatbot is designed using a strong design and
includes natural language processing (NLP)
technologies to support seamless and user-friendly
interfaces.
The chatbot can realize user inputs and response
to them with precision and responsiveness thanks to
this advanced technology. Users may escalate the
chatbot's operative use of CPU power for real-time
dialogues and it is highlighting on data integrity and
user privacy by being attentive of the technological
design underlying it. This section aims to provide
users with guidance on navigating the chatbot
interface so they may fully use its capabilities and
take advantage of the sophisticated technological
infrastructure that is in place.
3. Implementation
A refined version of Llama 2, which is (intelligent
AI Chat Assistant Humongous dataset is used to form
Chatty. Modelled after the human brain to solve
problems) designed especially for conversation use
cases is called Llama 2-Chat. Our Psychological
Health Chabot’s integration of Llama 2 models is
intended to improve the Chabot's comprehension of
natural language and response. Utilising Llama 2's
sophisticated capabilities, the chatbot seeks to respond
to users' enquiries on psychological health in a way
that is more precise, pertinent to the context, and
sympathetic, as seen in Fig 1. The pertaining
Approach employed in Llama 2 involves robust data
cleaning, updates to data mixes, and a 40% increase in
total tokens. The doubled context length and grouped-
query attention contribute to improved inference
scalability, crucial for dialogue interactions. Our
preparation quantity contains a new mix of publicly
existing data, carefully curated to dismiss sensitive
information context, and sympathetic, as seen in
Figure 1.
3.1. Implementation Requirements
The Psychological Health Chatbot requires a
high-performance CPU, specifically the Intel Core i9
and i7 Series, to handle intricate language models and
real-time interactions. These processors offer efficient
parallel processing and excellent computational
capabilities, ensuring seamless execution of complex
language processing tasks and an engaging user
experience. The recommended hardware components
are Intel Core i9 and i7 Series.
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
SAR Journal – Volume 7 / Number 3 /2024. 215
Figure 1. General Diagram for the proposed method
Selecting the right processor and RAM is crucial
for the chatbot's responsiveness and speed. A
minimum of 16GB DDR5 or DDR4 RAM is
recommended for handling dynamic conversations
and ensuring swift access to frequently used data..
Efficient storage is crucial for quick data retrieval
and smooth operation of our Psychological Health
Chatbot, with SSDs providing fast access and ample
capacity for language models and essential files.
4. Results
Once the suggested technique has been designed
and implemented, users are greeted with an easy-to-
use interface that enables smooth conversation with
the chatbot when they run the program using
Streamlit.
Users of the interface can submit their questions
or concerns about psychological health in the text
input area.as seen in Figure 2. The description of the
implemented method is shown in bellows:
4.1. Accessing the Chatbot Interface
Users are greeted with an easy-to-use interface as
shown in Figure 2 when they run the chatbot
application with Streamlit, which enables smooth
conversation with the chatbot. Users of the interface
can submit their questions or concerns about
psychological health in the text input area.
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
216 SAR Journal – Volume 7 / Number 3 /2024.
Figure.2. User-Friendly Interface
4.2. Initiating Conversations
To commence a conversation with the chatbot,
users need to enter their queries or express their
emotions in the text input field as depicted in Figure
3.
Figure 3. User Interaction Example
4.3. Receiving Responses
After submitting a query or message to the
chatbot, users will receive responses tailored to their
specific needs and emotional states. For instance, see
Figure 4:
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
SAR Journal – Volume 7 / Number 3 /2024. 217
Figure 4. Receiving Responses
4.4. Engaging in Dialogue
Handlers can participate in a conversation with
the chatbot by swapping several messages and
answers.
The chatbot conserves a conversation history,
allowing users to evaluation previous contacts results in
addition remain continuing conversations seamlessly. This
feature supports users to discover different issues and seek
continuous sustenance from the chatbot, as shown in
Figure 5.
Figure 5. Engaging in Dialogue
4.5. Multi Language Functionality (Arabic-English)
With easy conversation in Arabic and further
languages, the chatbot attends a widespread range of
persons. More availability and miscellany are made
probable by the chatbot's capability to converse with
handlers in their native language.
The addition of multilingual abilities guarantees
that persons with changeable linguistic backgrounds
can obtain the support they necessitate while also
improving the chatbot's usability. Moreover, the
chatbot's multilingual capability stimulates more
unbroken communication and immersive user
knowledge as shown in Figure 6.
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
218 SAR Journal – Volume 7 / Number 3 /2024.
Figure 6. Multi-Language Functionality
4.6. Accessing Additional Resources
Chatbot not only provides users entree to
extra resources and evidence on mental and
psychological health, also similarly brings real-time
help through text-based exchanges. A user's
understanding of psychological health concerns may
be developed by demanding resources, such as
articles, guides, and self-help tackles, to advance
discover individual interests, (see Figure 7).
As a final point, at any point during the dialogue,
handlers have the choice to close the session with the
chatbot by closing the application or steering away
from the chatbot interface as shown in Figure 8. The
chatbot sustains person's privacy and confidentiality,
guaranteeing that sensitive information is not kept or
shared outside the session.
Figure 7. Accessing Additional Resources
Figure 8. End session
SAR Journal. Volume 7, Issue 3, Pages 213-219, ISSN 2619-9955, DOI: 10.18421/SAR73-07, September 2024.
SAR Journal – Volume 7 / Number 3 /2024. 219
5. Challenges
Natural Language Understanding (NLU),
Developing NLU models that are capable of
correctly deciphering user enquiries and sentiments is
a challenging task. It is essential to comprehend the
nuances of language and context in order to respond
in a way that is both pertinent and sympathetic.
• Ethical Considerations: It is crucial to address
ethical issues such user privacy, data security, and the
possibility of harm. Building user trust requires
making sure the chatbot abides by moral principles
and norms.
• Resource Requirements and Technical Limitations:
Development and scalability may be hampered by
overcoming technological limitations, such as the
requirement for strong processing resources, such as
high-performance PCs or cloud servers. For best
functionality, finding a balance between resource
limits and performance is essential.
• User Engagement and Retention: Maintaining user
engagement and retention can be challenging because
users may eventually become disengaged or lose
interest. For long-term success, tactics to keep users
interested and promote repeat visits must be put into
practice.
6. Conclusions and Recommendations
In general, the proposed multi-language chatbot,
developed using AI, successfully supports people
who suffer from mental health issues but are reluctant
to disclose their problems to others. This approach
preserves user privacy while providing accurate
advice based on scientific resources.
There were numerous difficulties to overwhelm
while building a chatbot for psychological health, one
of which is the necessity for a robust technological
basis. Several improvements might increase the
chabot's influence and reach worldwide. There are
several chances to advance the chatbot for
psychological wellness in the future:
1) Include an avatar to encourage conversation with
chatbot; 2) For real-time mirroring, combine emotion
recognition; 3) Use your facial expressions to
increase responsiveness; 4) Recognizing user
sensations with a camera examine using the user's
webcam to identify emotions; 5) Construct
algorithms that can evaluate and determine emotional
statuses; 6) Comprise the capability to identify
emotions in chatbot responses; 7) Make sure security
and privacy are maintained; 8) Perform research on
usability to ensure accuracy and efficacy.
Internet approachability by constructing the chatbot
more commonly is reachable online, and users from
different regions in the world will be able to consume
its resources and services for psychological health
help.
Inventers may develop the psychological health
chatbot; go forward psychological health sustenance
technology and getting a global user base, by tackling
these obstacles and clutching opportunities for
improvement.
References:
[1]. Lee, E. E., Torous, J., De Choudhury, M., Depp, C.
A., Graham, S. A., Kim, H. C., ... & Jeste, D. V.
(2021). Artificial intelligence for mental health care:
clinical applications, barriers, facilitators, and
artificial wisdom. Biological Psychiatry: Cognitive
Neuroscience and Neuroimaging, 6(9), 856-864.
Doi: 10.1016/J.BPSC.2021.02.001
[2]. Rana, A., Dumka, A., Singh, R., Panda, M. K., &
Priyadarshi, N. (2022). A computerized analysis with
machine learning techniques for the diagnosis of
Parkinson’s disease: past studies and future
perspectives. Diagnostics, 12(11), 2708.
[3]. Savage, N. (2020). How AI is improving cancer
diagnostics. Nature, 579(7800).
[4]. Gavrilova, Y. (2022). AI Chatbots & Psychological
Healthcare. Iot for all.
Retrieved from:
https://www.iotforall.com/ai-chatbots-mental-
healthcare?ss360SearchTerm=AI%20Chatbots
[accessed : 12 June 2024]
[5]. Pendse, S. R., Nkemelu, D., Bidwell, N. J., Jadhav, S.,
Pathare, S., De Choudhury, M., & Kumar, N. (2022).
From treatment to healing: envisioning a decolonial
digital mental health. In Proceedings of the 2022 CHI
Conference on Human Factors in Computing Systems,
1-23.
[6]. Athota, L., Shukla, V. K., Pandey, N., & Rana, A.
(2020). Chatbot for healthcare system using artificial
intelligence. In 2020 8th International conference on
reliability, infocom technologies and optimization
(trends and future directions)(ICRITO), 619-622.
IEEE. Doi: 10.1109/ICRITO48877.2020.9197833.
[7]. Salhi, I., El Guemmat, K., Qbadou, M., & Mansouri,
K. (2021). Towards developing a pocket therapist: an
intelligent adaptive psychological support chatbot
against mental health disorders in a pandemic
situation. Indonesian Journal of Electrical
Engineering and Computer Science, 23(2), 1200-1211
Doi: 10.11591/ijeecs.v23.i2.pp1200-1211.
[8]. Goonesekera, Y. (2021). Pilot testing of Otis: a
chatbot for health anxiety. [Masters Thesis,
University of Auckland] Retrieved
from: https://researchspace.auckland.ac.nz/handle/2
292/56822 [accessed: 14 June 2024]
[9]. Ahmad, R., Siemon, D., Gnewuch, U., & Robra-
Bissantz, S. (2022). Designing personality-adaptive
conversational agents for mental health
care. Information Systems Frontiers, 24(3), 923-943.
Doi: 10.1007/S10796-022-10254-9.
[10]. Castañeda-Garza, G., Ceballos, H. G., & Mejía-
Almada, P. G. (2023). Artificial Intelligence for
Mental Health: A Review of AI Solutions and Their
Future. What AI Can, 373-399.
Doi:10.1201/B23345-22.