Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Akshay Rajesh Shinde, Nitish Dulaji Shekhare, Atharv Hemant Shingewar, Prashant Y. Itankar
DOI Link: https://doi.org/10.22214/ijraset.2022.41788
Certificate: View Certificate
The purpose of the project is to make any domain-specific website, in our case banking, more usable by integrating a chatbot that serves as an interface for customer inquiries about services. This reduces customer interaction time with websites, thereby valuing their time and improving their overall experience. As part of this project, we explored and attempted to create an intelligent chatbot that could extract relevant information, recognize various intents and execute the pre-mapped actions. To create a contextual assistant for the above purpose, we used the RASA framework. To train the model, we constructed a custom dataset that includes multiple intents and entities. Additionally, we provide some python scripts (RASA actions) that will be executed when some intents are detected. Our solution consisted of creating a pipeline having a chatbot and several actions triggered by the chatbot. These actions will connect with the database and then provide the required data or make changes according to the user’s query and display the feedback back to the user via the chat widget.
I. INTRODUCTION
At a very basic level chatbot can be considered to be an agent which can interact with a user like a human (voice or text) and understand what the user wants from it and provide a specific set of services to the user according to the user’s demands. Chatbot also acts as an information-gathering tool using which the organization can know their customer base more clearly and understand their needs. Chatbots are used in a wide range of domains right from health care services to customer relationship management services.
A chatbot broadly comprises three subsystems which are Natural Language Understanding(NLU) which understands what the user is trying to communicate or what is the intent of the provided sentence, Dialog Management which maintains the state of communication by remembering what key pieces of information have been provided by the user and how to drive the conversation ahead and Natural Language Generation(NLG) which handles the part where the chatbot figures out what the bot should respond to back to the user. RASA is an open-source Natural Language Processing(NLP) tool that is used to build virtual assistants and contextual chatbots. RASA provides two main modules Rasa Open Source and Rasa Action Server. Rasa Open Source has Rasa NLU to recognize the intent of communication and Rasa core to decide what to do next and how to proceed with the conversation. Rasa Action Server allows the hosting of Python scripts to perform certain custom tasks like processing or modifying databases in the backend. This paper presents a chatbot deployed on a banking website that offers certain services like checking account balance, making a transaction, and many more to users right in the chat window.
II. LITERATURE SURVEY
This paper [1] presents the use of the RASA framework for building smart context remembering chatbots, it also describes how Rasa NLU works and how its performance is elevated by using intent recognition and entity extraction. It also compares the accuracies of entity extraction using Rasa NLU and a NN, results show Rasa NLU performs better to extract entities when whole sentences are provided as compared to neural networks which require segmented inputs. This paper discusses Rasa by implementing a chatbot related to the finance domain, using which the users can inquire about stock-related information.
RASA NLU can introduce a vital component in intelligent chatbot systems. We can compose the system to extract the entity after intent recognition. This can be further improved for complicated sentences and more entities.
This paper [2] briefly discusses advancements in the field of AI and how this has led to major shifts in some organizations about how they operate. It further mentions how the banking industry has moved to use chatbots for providing an interface to customers so that they can have an assistant throughout the day for service. This paper also gauges the ability of current chatbots to provide all the services that a user needs.
It includes several strategies for managing dialogue in the banking and finance industry based on ontology. Although further use of AI can make the chatbot not only respond to questions but also self-learning to improve itself in more stages, improving user service quality and also reducing human load.
III. PROPOSED SYSTEM
A. Problem definition
Technology use in today’s banking sector continues to be high, pushed by the ever-increasing need for more banking services. In the competitive banking area, the customer expects quick responses increasing the load for banks to catch up with the requirements.
This project aims to develop a website with a chatbot that is not only capable of having conversations with the customer but also has the ability to listen to commands and make changes to the database.
B. Dataset
The custom dataset is created which contains in total of thirty-six intents out of which twenty are domain-specific intents these are the ones that are related to common banking queries and sixteen intents are written for basic utterances while in a conversation. Dataset consists of eleven entities(transaction_amount, email_id, location, phone_no, etc) that can be recognized by the model and will further be stored in slots which in turn will drive the conversation. For domain-specific intents, on average approximately fifteen examples are provided per intent. Here are some of the example sentences from the intent ‘pin_change’:-
C. Technology Used
IV. PROJECT ARCHITECTURE
A. Architecture
As shown in Fig. 1, firstly the user will provide a message on the website through the chat window, this message will be passed over to the RASA server by the website. The Rasa server will process the message and then recognize the intent of the message and extract entities if they are present. If this is a simple conversational text then the Rasa server will utter a predefined response and will wait for the next message from the user or else the Rasa server will pass on the extracted entities to the Rasa action server that will call upon a certain action which will establish a connection with the database to either read/modify the database. Once all the processing is done, a feedback message will be uttered by the action server back to the user mentioning the status of the queried process.
B. Design Implementation
a. nlu.yml - This file stores all the example sentences for all the intent over which the model will be trained.
b. stories.yml - This file contains all the predefined conversation paths. A story is a representation of a conversation between the user and the chatbot.
c. domain.yml- In this file, all the intents, entities and slots are registered. It also stores some predefined responses(utterances).
d. config.yml - This file has all the details about the pipeline which is going to be used while training the model. There are many factors that can be customized to tune the model according to our choice and have varying results.
2. Rasa: Rasa action server hosts a file ‘actions.py’ which contains custom python scripts that can be used to connect to the database, external APIs or can be used to perform certain processing steps. Our project has a total of nineteen actions that are dedicated to perform operations like transactions, checking account balances, changing PINs, etc. Another file named ‘otp.py’ is present which has the function to send OTP to the user via mail using ‘smtplib’.
V. PROJECT OUTPUTS
Our model makes use of the DIET classifier which stands for Dual Intent Entity Transformer Classifier. As the name suggests this model is able to recognize intents as well as extract the entities. A model trained over the above dataset achieved an accuracy of 98.4% and an F1 score of 0.862 with a loss of 1.24.
TABLE I
Metrics with respect to Intents
Intent |
Precision |
Recall |
F1-score |
amount_provided |
1.0 |
0.0909 |
0.1669 |
stop_transfer |
1.0 |
1.0 |
1.0 |
change_phoneno |
1.0 |
1.0 |
1.0 |
greet |
1.0 |
0.9230 |
0.9600 |
account_balance |
1.0 |
1.0 |
1.0 |
inform_currency |
1.0 |
1.0 |
1.0 |
credit_used |
1.0 |
1.0 |
1.0 |
phoneno_provided |
1.0 |
1.0 |
1.0 |
register_complaint |
1.0 |
1.0 |
1.0 |
transfer_otp_provided |
0.8461 |
1.0 |
0.9166 |
pin_change |
1.0 |
1.0 |
1.0 |
complaint_provided |
1.0 |
1.0 |
1.0 |
transfer_money |
1.0 |
0.8636 |
0.9268 |
mini_statement |
1.0 |
1.0 |
1.0 |
authinform |
1.0 |
1.0 |
1.0 |
order_cheque_book |
1.0 |
1.0 |
1.0 |
block_card |
1.0 |
1.0 |
1.0 |
interest_rates |
1.0 |
1.0 |
1.0 |
pin_provided |
0.5416 |
1.0 |
0.7027 |
branch_locater |
1.0 |
1.0 |
1.0 |
new_card |
1.0 |
1.0 |
1.0 |
Table I provides the precision, recall and F1 score for all the domain-specific intents, and we can observe the accuracy is around 1.0 while precision and recall are close to each other. There are some intents that have low accuracy like pin_provided as it is ambiguous for the model to recognize PIN from various numerical entities like OTP, amount, phone number, etc.
In Fig. 2 the user interface of the chatbot is shown where initially the user is asking about the account balance but here the user is not authenticated so the chatbot displays a message containing “For security reasons, I have to authenticate you, Can I please get your email address. Thank you”. So the user will provide the email and an OTP (One Time Password) will be sent on the email provided. After successfully entering the OTP the user will get a message stating “Thanks for the info, I have successfully authenticated you. You may ask any query now.” After that, the user asks about his/her account balance and the account balance is displayed.
Further, if the user wants to transfer some funds then the chatbot will ask the user to enter a 12 digit account number after that the amount which is to be transferred. For enhanced security purposes the user will have to enter a transaction OTP which is sent on his/her email. After successfully entering the transaction OTP the user will get a message where he/she is informed that the transaction is completed and a transaction reference id is provided.
If the user wants to know about his/her latest transactions a mini statement is provided as shown in Fig. 2.
VI. FUTURE SCOPE
Performance can be enhanced by using various procedures of machine learning. Chatbots can be integrated with voice commands to enhance the user experience. More banking services can be simplified by the use of a powerful chatbot. The quality of chatbots can be improved in the future by research in the field of banking. Security of chatbots will have to be improved as the security will be improved, people will be willing to share their information with the chatbot and also data collection will get easier. In the banking domain, contextual assistants need to cover more Indian languages thereby increasing the usability of chatbots.
VII. ACKNOWLEDGMENT
We would like to extend our thanks to all the sources of motivation. We would like to grab this opportunity to thank Dr. S. D. Sawarkar, principal for encouragement and support he has given for our project. We express our deep gratitude to Dr. A. P. Pande, head of the department who has been the constant driving force behind the completion of this project. We wish to express our heartfelt appreciation and deep sense of gratitude to my project guide Prof P. Y. Itankar for his encouragement, invaluable support, timely help, lucid suggestions and excellent guidance which helped us to understand and achieve the project goal. We are also thankful to all those who helped us directly or indirectly in completion of this work.
Implementation of this project would make the user experience of a customer on the website, more friendly and seamless. A chatbot can also act as an information-gathering tool that would help the organizations to inspect the needs of customers and then implement them.
[1] Jiao, Anran. (2020). An Intelligent Chatbot System Based on Entity Extraction Using RASA NLU and Neural Network. Journal of Physics: Conference Series. 1487. 012014. 10.1088/1742-6596/1487/1/012014. [2] Fathima, Sasha & Student, Suhel & Shukla, Vinod & Vyas, Dr Sonali & Mishra, Ved P. (2020). Conversation to Automation in Banking Through Chatbot Using Artificial Machine Intelligence Language. 10.1109/ICRITO48877.2020.9197825. [3] Singh, Netra & Singh, Devender. (2019). Chatbots and Virtual Assistant in Indian Banks. Industrija. 47. 75-101. 10.5937/industrija47-24578. [4] Petr Lorenc, “Joint model for intent and entity recognition” in arXiv:2109.03221v1 [cs.CL] 7 Sep 2021 [5] The Rasa documentation. [Online]. Available: https://rasa.com/docs/rasa/2.x [6] Django documentation. [Online]. Available: https://docs.djangoproject.com/en/4.0/
Copyright © 2022 Akshay Rajesh Shinde, Nitish Dulaji Shekhare, Atharv Hemant Shingewar, Prashant Y. Itankar. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET41788
Publish Date : 2022-04-23
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here