0% found this document useful (0 votes)
158 views

Conversational AI Powered Chatbot Using Lex and AWS

Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-6 | Issue-3 , April 2021, URL: https://www.ijtsrd.com/papers/ijtsrd49722.pdf Paper URL: https://www.ijtsrd.com/engineering/computer-engineering/49722/conversational-ai-powered-chatbot-using-lex-and-aws/pradyumna-saini

Uploaded by

Editor IJTSRD
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

Conversational AI Powered Chatbot Using Lex and AWS

Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-6 | Issue-3 , April 2021, URL: https://www.ijtsrd.com/papers/ijtsrd49722.pdf Paper URL: https://www.ijtsrd.com/engineering/computer-engineering/49722/conversational-ai-powered-chatbot-using-lex-and-aws/pradyumna-saini

Uploaded by

Editor IJTSRD
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

International Journal of Trend in Scientific Research and Development (IJTSRD)

Volume 6 Issue 3, March-April 2022 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470

Conversational AI Powered Chatbot Using Lex and AWS


Pradyumna Saini, Mohd Tajammul

School of Computer Science and IT, Jain University, Jayanagar, Bangalore, Karnataka, India

ABSTRACT How to cite this paper: Pradyumna Saini


Artificial intelligence-based application for their treatment. Thus, | Mohd Tajammul "Conversational AI
telehealth will rapidly and radically transform in-person care to Powered Chatbot Using Lex and AWS"
remote consultation of patients. Because of this, it developed a Published in
Multilingual Conversational Bot based on Natural Language International Journal
of Trend in
Processing (NLP) to provide free primary healthcare education,
Scientific Research
information, advice to chronic patients. The study introduces a novel and Development
computer application acting as a personal virtual doctor that has been (ijtsrd), ISSN: 2456-
opportunely designed and extensively trained to interact with patients 6470, Volume-6 | IJTSRD49722
like human beings. This application is related to a server less Issue-3, April 2022,
architecture and it aggregates the services of a doctor by providing pp.1622-1627, URL:
preventive measures, home remedies, interactive counseling sessions, www.ijtsrd.com/papers/ijtsrd49722.pdf
healthcare tips, and symptoms covering the most prevalent diseases
in rural India. The paper proposes a conversational bot for delivering Copyright © 2022 by author (s) and
telehealth in India to increase the patient's access to healthcare International Journal of Trend in
knowledge and leverage of artificial intelligence to bridge the gap of Scientific Research and Development
Journal. This is an
demand and supply of human healthcare providers. This AI
Open Access article
application has resulted in reducing the barriers for access to distributed under the
healthcare facilities and intelligent consultations remotely to allow terms of the Creative Commons
time to time care and quality treatment, thereby effectively assisting Attribution License (CC BY 4.0)
the society. (http://creativecommons.org/licenses/by/4.0)

KEYWORDS: chatbot Alexa; conversational technology, digital


health Amazon Web Services; Internet of Things

I. INTRODUCTION
The major challenges that India faces is to cater to a wide variety of patients. Many people are suffering
good quality and affordable healthcare industry to its from chronic diseases, disabled patients, and patients
growing population. The World Health Report issued living in areas would benefit most from such
by World health Organization has ranked India’s powerful virtual assistants’ tools. Advantages of these
healthcare system at 112 out of 190 countries. System: reduced time on the part of physicians,
Same time are not cost-efficient and well-matched to improved security of patient data.
their medical needs. To seek more ways to provide The healthcare domain is facing a range of challenges
timely medical care, access and quality treatment to due to increasing service demand. Shortage of trained
the patient, the role comes into play which connects professionals and their limited availability while
patients with healthcare providers. providing treatment to the patients is a major
In the current growing age of Artificial Intelligence challenge. The main reason for the problem is that
(AI) powered chatbots are playing a leading role by healthcare practitioners have to overcome
exemplifying the function of a virtual assistant that organizational, temporal and geographical barriers to
could manage a conversation via speech. use of voice assist the patients. The availability of trained
queries to get answers, perform actions and professionals to provide an authentic treatment within
recommendations according to users needs. They are the appropriate time is important for disease
adaptable to the user's individual language usages, diagnosis, assisting patients having cholesterol, blood
searches , and preferences with continuing use. pressure, diabetes or other severe diseases and for the
treatment of pregnant women. Mobile Health services
applications to access and record the patient's data. At resolve these concerns, helping patients with
the patient's side, it is a cheaper alternative; AI- authentic healthcare accessible from remote locations
enabled virtual assistants that can render 24x7 care to irrespective of time and space. Traditional mHealth

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1622
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
applications were limited to basic functions such as This interest and demand for chatbot applications has
recording exercise activities or counting calories emphasized the need to be able to quickly build
burnt. However, mobile health applications are complex chatbot applications supporting AI-based
becoming more adaptive and complex, providing natural language processing in order to be able to
advanced features like disease diagnosis and assistive fluently chat with the user. Furthermore, any non-
patient treatment. Chatbots or conversational agents trivial chatbot requires accessing an orchestration of
come under the modern category of mHealth services. internal and external services in order to perform the
They use natural languages and voice- based requested user actions.
interaction while communicating with the patients, As such, chatbots are becoming complex software
through a ‘question-answer oriented’ interface model. artifacts that require a high-level of expertise in a
II. BACKGROUND AND RELATED WORK variety of technical domains, ranging from NLP to a
A. Smart Phone apps deep understanding of the APIs of the targeted instant
AirStrip offers a mobile, interoperable platform that messaging platforms and third-party services to be
allows care coordination between multiple devices integrated.
and multiple care settings. Data from an tech health The research use primary data, which was collected
records, health information exchanges, medical using structured questionnaire. The sample size for
devices, and other monitoring solutions can be the study that consists of 100 respondents. The
accessed by smartphones, tablets, and computers from questionnaire has prepared in such a way so as to
hospitals, post-acute care centers, and community- gather data from the respondents, which will be
based care organization. The AirStrip platform gives helpful in attaining the objectives of the study. The
providers a tool to all data into one platform that can collected data has been carefully scrutinized,
be accessed via telemedicine, and integrates with tabulated and analyzed using simple statistical
other vendor systems. techniques like percentages. and support to translate
This patient-faces mobile app allows patients to more than 30 languages. The cognitive service
directly find information on their health conditions ‘Language Understanding Intelligent Service’ (LUIS)
and gives them step-by-step guide to treat conditions has been used in
in the most effective way possible.
B. Chatbot features and implementation
standards
The authors also mention the principles to modify
healthcare applications. These implementation
standards can be used as a reference while structuring
and designing chatbot applications. The standards
meets four parameters- user experience/ adherence,
data safety, data privacy, data integration, and the design; for creating HTTP endpoints to return
effectiveness. The authors have also described JavaScript Object Notation (JSON) responses,
challenges to handle these parameters. developing new models and while training the
language model with sample utterances. The design
C. Existing solutions uses the Telegram messaging app. It performs
Instant messaging platforms have been widely message encryption and offers a free, open-source
adopted as one of the main technologies to and secure platform. The chatbot tracks user location
communicate and exchange information. Nowadays, through Google Maps Application Programming
most of them provide built-in support for integrating Interface.
chatbot applications, which are automated
conversational agents capable of interacting with Many articles and research papers have underlined
users of the platform. Chatbots have proven useful in the increasing popularity and acceptance of
many other contexts to automate tasks and improve pregnancy companion mobile apps. The chatbot is
the user experience, such as automated customer effective than a smartphone app as it provides a voice
services, education, and e-commerce. Moreover, interface through a personalized platform. Current
existing reports emphasize that chatbot design will chatbot designs provide suggestions and tips on many
become a key ability in IT hires in the near future. topics like lifestyle, personal wellbeing, healthy diet,
The global chatbot market is projected to reach 2 and others. However, some additional aspects are
billion dollars by 2024, growing at a CAGR necessary to make these chatbots more relevant for
(compound annual growth rate) of 29.7%. users. In [14-27], authors have given a number of
solutions for security mechanism in cloud computing.

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1623
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
III. DESIGN AND METHODOLOGY Plus, Echo Studio or Echo dot are enabled with
A. Technology Acceptance Survey Alexa. Amazon Alexa provides multiple function like
The authors explain the ‘Unified Theory of real-time data extraction, voice interaction, weather
Acceptance and Use of Technology’ () system to forecast, broadcasting, smart audio-video streaming,
analyze the user acceptance of technology and the tasks list management, home-automation control and
application use context. The advanced ver. deals with other. Third-party users can also configure these
the technology application in private contexts. can be functionalities by designing and installing a custom
considered as a reference while analyzing the impact ‘skill’ on Alexa enabled smart speaker. The skill, just
of a chatbot in many applications. Researchers have like a mobile phone application allows the user to
already used the model in the context of mHealth perform certain defined tasks that involve features
applications. It focuses on aspects such as Effort such as service assistance or voice interaction. Alexa
expectations, Performance expectations, Facilitating has become a popular tool in realizing the concept of
conditions, Social influences, Price values Hedonic intelligent and interactive chatbots.
motivations and Habits. A set of questions were
Designing a chatbot on top of a custom Alexa skill
framed to verify the primary familiarity of the user
allows developers to utilize a range of Amazon Web
with the smartphone or chatbots and to predict how
Services like AWS Lambda, Simple Email Service
frequently they are using them. Multiple questions
(SES), Simple Notification Service (SNS) and
were asked to record user opinions while accepting
DynamoDB.
the chatbot as a assistant and as a replacement tool for
the traditional smartphone interaction.

AWS Lambda is a cloud computing platform that


allows users running code without managing or
provisioning the cloud servers. The developer is
Fig 1 Survey summary- charged only for the compute time consumed- no
Almost all users were having a primary exposure for charge when the code doesn’t run. The Lambda
technology, but some of them accepted that they function codes are run on a computing infrastructure
don’t use chatbots more frequently. As most of the having high-availability. It also manages the
interviewees often feel the need for a doctor’s advice administration of cloud computing resources, capacity
in a day, they admitted that sometimes they can’t provisioning and automatic scaling, maintenance of
raise their queries or questions with someone. the server and operating system, code logging and
Although they prefer using a search engine like monitoring. The developer just supplies the Lambda
Google to get the answers; they were in favor of a function code in one of the supported languages, and
chatbot to replace it. Users were asked to provide the other services are handled by AWS Lambda.
their consent for the parameters on the scale of 1-5 AWS DynamoDB is a NoSQL database service
(strongly disagree, disagree, neutral, agree, strongly providing higher scalability and quick performance.
agree) while looking at the feasibility of a chatbot. Developers don’t have to worry about the
Figure 1 shows a statistical summary of the survey, management of hardware provision, replication,
which highlights the positive user inclination towards software patching, setup, and configuration, or cluster
a Health chatbot. scaling as this is handled by DynamoDB. It also
The survey analysis interpreted from factors resulted secures the sensitive data by encrypting it at rest,
in a fairer analysis of the technology acceptance. The reducing the burden on the developer. It allows the
responses from the users were helpful in structuring creation and maintenance of any amount of data.
the chatbot design features, making it a relevant and More on, DynamoDB serves incoming requests are
engaging tool for the users. any traffic level.
B. Design and Block diagram AWS SNS is a cloud-based notification service that
Alexa is a popular virtual voice assistant application can be used for generating message notifications from
developed by Amazon. Devices like Amazon Echo serverless and distributed applications. It is a durable

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1624
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
and secure platform that offers higher throughput C. Data source selection
with higher availability. An authentic and reliable data source is needed to
extract the backend data which is used for the chatbot
AWS SES is a cloud-based service that can be
design. Considering these features a platform
configured for generating email notifications,
recommended by healthcare practitioners, the
transactional or marketing emails. SES is a reliable,
National Health Service (NHS) website was selected
cost-effective, flexible and highly-scalable service
as a dataset source. NHS is the national healthcare
useful for multiple use cases serving different
system in the United Kingdom. The website has
requirements.
information content about pregnancy such as weekly
AWS Lex enables you to build applications using guide, recommendation, and also suggestions about
a speech or text interface powered by the same relevant miscellaneous topics.
technology that powers Amazon Alexa.
Lex bot interactions with AWS Lambda In Lex IV. IMPLEMENTATION AND
you now create a single Lambda function per VERIFICATION
language per bot, which must be able to support A. Implementation aspects
AWS Developer account and AWS Management
both types of Lex interaction:
console account are needed to configure an Alexa
Initialization/Validation - Lambda is called at
skill with Amazon Web Services. ASK Developer
every turn of the converation. This allows you to
Console enables the programmer to configure and
initialise, validate or override slot data values.
publish a custom Alexa skill. On the other side, the
Amazon Connect - An easy-to-use omnichannel AWS Management console enables the programmer
cloud contact center that helps you provide to utilize multiple AWS services, monitor cloud
superior customer service at a lower cost. Over services, user and roles management, handle costing
ten years ago, Amazon’s retail business needed a and billing and execution requirement.
contact center that would give our customers
personal, dynamic, and natural experiences. In this growing world of AI, consumers are getting
technological help in all facets of their lives. The data
Figure 2 displays the integrated system block provides various ways to get information and has
diagram. Voice communication can be observed radically changed the way of communication.
between the pregnant woman and the Alexa enabled
Echo dot device. Alexa Skills Kit (ASK) handles user Innovation has enhanced our lives with more
requests captured in as an audio signal. It converts the opportunities, and everything is quite simple for us.
audio input into the equivalent text to detect the Everybody likes to collaborate and expect quick
‘intent’ or context of the request. Corresponding to answers without much delay. You can use online
the detected intent, the associated Lambda function networking platforms or websites regularly for
event gets evoked. Request response interaction various reasons to connect with others.
between the Lambda function and ASK takes place in A chatbot is a program or service that easily connects
the JSON format. Suitable actions are performed by with us to help solve our queries/problems. The
Lambda for the raised request, such as extraction of services that a chatbot can deliver are quite diverse,
the data or generation of a response. The Lambda from providing important life-saving health messages
function interacts with AWS DynamoDB for data to checking the weather. While interacting with
storage or data retrieval. ASK translates the responses chatbots, you should feel as if you are talking with a
sent by the Lambda function to audio output for the real person only.
user. SNS and SES are triggered through the Lambda
function to generate short text notifications or emails From my perspective, chatbots or smart assistants
in case of certain events. with artificial intelligence are dramatically changing
businesses. There is a wide range of chatbot building
platforms that are available for various enterprises,
such as e-commerce, retail, banking, leisure, travel,
healthcare, and so on.

Fig 2 system block diagram

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1625
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
Publication | IEEE Xplore
https://ieeexplore.ieee.org/document/9271971
[5] Ticketing Chatbot Service using Serverless
NLP Technology | IEEE Conference
Publication | IEEE Xplore
https://ieeexplore.ieee.org/document/8576921
[6] https://aws.amazon.com/events/aws-
innovate/data/
[7] Amazon Web Services (AWS), (2018). “What
CONCLUSION AND FUTURE SCOPE Is AWS Lambda? Documentation”
The chatbot solution offers suggestions and
recommendations Health care ; such as patient care [8] https://docs.aws.amazon.com/lambda/latest/dg/
medical check experienced emotional feelings, welco me.html [Accessed 24 July 2019]
observed symptoms, suggestions, and [9] Amazon Web Services (AWS), (2018). “What
recommendations about other relevant topics. The Is Amazon DynamoDB? Documentation”.
design also addresses one more limitation of the [online] Available from
existing solutions, providing mobile message and https://docs.aws.amazon.com/amazondynamod
email notification service in the case of an b/latest/ developer guide/Introduction.html
emergency. The chatbot records daily sleep duration [Accessed 04 July 2019]
and regular exercise activities, by maintaining a diary
[10] Amazon Web Services (AWS), (2018).
log which is useful while consulting the doctor. It also
“Amazon Simple Notification Service,
provides tips and information about multiple topics
Overview”. https://aws.amazon.com/sns/
that are relevant to medicine.
[11] Amazon Web Services (AWS), (2018).
The paper presents a proof of concept model to
“Amazon Simple Email Service, Overview”.
analyze the multiple possible services, which a health
https://aws.amazon.com/ses/
care chatbot system can provide. The primary
objective was the implementation of the probable use [12] https://aws.amazon.com/partners/training/path-
cases by applying a suitable technology. The tech-pro/
proposed solution is not a full-proof solution; [13] https://build.amazonalexadev.com/Alexa-for-
however, it is possible to further extend its features Business-Confirmation.html?aliId=eyAWS
and the technology application demonstrations to Management Console (amazon.com)
structure a
[14] Alam T., Tajammul M., Gupta R. (2022)
The proposed approach of recording sleep time and Towards the Sustainable Development of Smart
exercise activities from the user conversation can be Cities Through Cloud Computing. In: Piuri V.,
replaced with the help of smart fitness devices or Shaw R.N., Ghosh A., Islam R. (eds) AI and
body wearable’s to record them automatically. Smart IoT for Smart City Applications. Studies in
healthcare devices that monitor personal health Computational Intelligence, vol 1002.
parameters such as blood oxygen level,
Electrocardiogram readings, heart rate, and body [15] Tajammul, M., Shaw R.N., Ghosh A., Parveen
temperature; can be used along with the chatbot R. (2021) Error Detection Algorithm for Cloud
system to identify the emergency. Outsourced Big Data. In: Bansal J.C., Fung
L.C.C., Simic M., Ghosh A. (eds) Advances in
REFERENCES Applications of Data-Driven Computing.
[1] https://ai-chatbot.sustainablelivinglab.org/ Advances in Intelligent Systems and
[2] https://ieeexplore.ieee.org/document/9137944D Computing, vol 1319.
evelop ment of a Voice Chatbot for Payment [16] Tajammul, M, Parveen, R., “Cloud Storage in
Using Amazon Lex Service with Eyowo as the Context of Amazon Web Services”,
Payment Platform | IEEE Conference International Journal of All Research Education
Publication | IEEE Xplore and Scientific Methods, vol. 10, issue 01, pp.
[3] https://ieeexplore.ieee.org/document/9105762 442-446, 2021.
[4] Personal robotic assistants: a proposal based on [17] Tajammul, M., Parveen, R., “Auto Encryption
the intelligent services of the IBM cloud and Algorithm for Uploading Data on Cloud
additive manufacturing | IEEE Conference Storage”, BIJIT - BVICAM’s International

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1626
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
Journal of Information Technology, vol. 12, [23] Tajammul, M., Parveen, R., Delhi, N. (2018).
Issue 3, pp. 831-837, 2020. Comparative Study of Big Ten Information
[18] Tajammul, M., Parveen, R., “Key Generation Security Management System Standards,
International Journal of Engineering Research
Algorithm Coupled with DES for Securing
Cloud Storage,” International Journal of in Computer Science and Engineering
(IJERCSE) Vol 5, Issue 2, pp. 5-14, 2018.
Engineering and Advanced Technology
(IJEAT) ISSN: 2249-8958, Volume-8 Issue-5, [24] M. Tajammul, R. Parveen, N. K. Gaur and S.
June 2019 no. 5, pp. 1452–1458, 2019. D, "Data Sensitive Algorithm Integrated with
[19] Tajammul M., Parveen R., “Two Pass Compression Technique for Secured and
Multidimensional Key Generation and Efficient Utilization of Cloud Storage," 2021
Encryption Algorithm for Data Storage IEEE 4th International Conference on
Security in Cloud Computing”, International Computing, Power and Communication
Journal of Recent Technology in Engineering, Technologies (GUCON), 2021, pp. 1-9, doi:
Vol. 8, Issue-2, pp. 4152–4158, 2019. 10.1109/GUCON50781.2021.9573648.
[25] Tajammul, M., Parveen, R., (2017).
[20] Tajammul M., Parveen R., “Algorithm for
Comparative Analysis of Big Ten ISMS
Document Integrity Testing Pre-Upload and
Standards and Their Effect on Cloud
Post- Download from Cloud Storage”,
Computing, 978-1-5386-0627
International Journal of Recent Technology in
Engineering, Vol. 8, Issue-2S6, pp. 973– 979, 8/17/31:00c2017IEEE; 9001; 362367.
2019. [26] Tajammul, M., and R. Parveen, "To Carve out
[21] Tajammul, M., Parveen, R., “Auto Encryption Private Cloud with Total Functionality," 2020
Algorithm for Uploading Data on Cloud 2nd International Conference on Advances in
Storage”, BIJIT - BVICAM’s International Computing, Communication Control and
Journal of Information Technology, vol. 12, Networking (ICACCCN), 2020, pp. 831-835,
Issue 3, pp. 831-837, 2020. doi: 10.1109/ICACCCN51052.2020.9362826.
[27] M. Tajammul, R. Parveen and I. A. Tayubi,
[22] Tajammul, M., Parveen, R., and M.
Shahnawaz, “Cloud Computing Security Issues "Comparative Analysis of Security Algorithms
and Methods to Resolve: Review,” Journal of used in Cloud Computing," 2021 8th
Basic Applied Engineering and Research, vol. International Conference on Computing for
5, no. 7, pp. 545–550, 2018. Sustainable Global Development (INDIA
Com), 2021, pp. 875-880,
doi:10.1109/INDIACom51348.2021.00157.

@ IJTSRD | Unique Paper ID – IJTSRD49722 | Volume – 6 | Issue – 3 | Mar-Apr 2022 Page 1627

You might also like