0% found this document useful (0 votes)
548 views47 pages

AI Chatbot Solutions for Banking Sector

The bot can provide assistance to the customers at any time as they are trained to grasp their queries and provide the best possible solution simultaneously making them feel like they are interacting with a human.

Uploaded by

Candy Love
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
548 views47 pages

AI Chatbot Solutions for Banking Sector

The bot can provide assistance to the customers at any time as they are trained to grasp their queries and provide the best possible solution simultaneously making them feel like they are interacting with a human.

Uploaded by

Candy Love
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AI BASED DISCOURSE FOR BANKING INDUSTRY

A PROJECT REPORT

Submitted by

SAI GOWTHAM A (111619104002)


HARSHA VARDHAN D (111619104026)
CHERRISH B (111619104012)
AVINASH S (111619104009)

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

IN
COMPUTER SCIENCE AND ENGINEERING

R.M.K. COLLEGE OF ENGINEERING AND TECHNOLOGY


(An Autonomous Institution)

PUDUVOYAL

ANNA UNIVERSITY : CHENNAI 600 025

MARCH 2023

1
ANNA UNIVERSITY : CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “AI BASED DISCOURSE FOR BANKING
INDUSTRY” is the bonafide work of “SAI GOWTHAM A (111619104002),
HARSHA VARDHAN D(111619104026), CHERRISH B(111619104012),
AVINASH S (111619104009), who carried out the project work under my
supervision.

SIGNATURE SIGNATURE
Dr. VALARMATHIE P Dr. REJIN PAUL N R
PROFESSOR AND HEAD ASSISTANT PROFESSOR
Department of CSE Department of CSE
R.M.K College of Engg. and Tech, R.M.K College of Engg. and Tech,
Puduvoyal – 601 026. Puduvoyal – 601 026.

Submitted for the project viva-voce held on ____________

INTERNAL EXAMINER EXTERNAL EXAMINER

2
CERTIFICATE OF EVALUATION

College Name :
Department :
Semester :

Name of the Students


Name of the Supervisor with
Title of the Project with Registration
Designation
Numbers

The report of the project work submitted by the above students, in partial
fulfillment for the award of Bachelor of Engineering Degree in COMPUTER
SCIENCE AND ENGINEERING of Anna University, was confirmed to be the report
of the work done by the above students and then evaluated.

Submitted the project report during the viva voce held on……...………..

INTERNAL EXAMINER EXTERNAL EXAMINER

3
ACKNOWLEDGEMENT

Support on demand, encouragement at the needed moment and guidance in the


right direction are in dispensable for the success of any project. We have
received these in excess from all corners from various people, we are glad to
submit our gratitude to them.

We thank Thiru. R. S. Munirathinam, Founder and Chairman - RMK group of


Institutions, and Thiru. R. M. Kishore, Vice Chairman - RMK group of
Institutions for extending a generous hand in providing the best of resources to
the college. Dr. K. Ramar, the esteemed Head of our Institution has been a
source of motivation to all the staffs and students of our college. We are so much
thankful to him.

Our sincere thanks to Dr. VALARMATHIE P the Head of the Department for
her continuous support and motivation throughout our project.

We extend our profound gratitude to our Project Coordinator VIGILSON


PREM M and our Guide REJIN PAUL N R for their guidance. We thank them
for giving us full support to complete the project successfully.

Last, but not the least, we take this opportunity to thank all the staff members of
the Department of Computer Science and Engineering. Regards to ourfamily,
classmates and friends who offered an unflinching moral support for completion
of this project.

4
ABSTRACT

Artificial intelligence (AI) has been a subject of interest in the research field for
the past few years. It has now been brought closer to commercial use due to recent
technological advances and speedier data accessibility. Its relevance to global
business models is underlined by the significant investments in it made by
Internet powerhouses including Google, YouTube, Amazon and Facebook. In the
banking sector where data is of substantial value, AI has been incorporated in
pilot projects but its true applications have yet to see the light of day. In this study,
the drivers and barriers to successful AI implementation in the banking sector is
analyzed using a panel data of 28 semi-structured interviews with AI experts in
the field of banking and finance. AI-oriented role models and process capabilities
were revealed to be essential prior to having the trained algorithms reach the level
whereby the AI applications can run devoid of human involvement and moral
trepidations.

5
TABLE OF CONTENTS

CHAPTER PAGE
NO. TITLE NO.

ABSTRACT

1 INTRODUCTION

2 LITERATURE REVIEW

3 SYSTEM ANALYSIS

3.1 OVERALL DESCRIPTION

3.1.1 Existing System

3.1.2 Proposed System

3.2 SYSTEM CONFIGURATION

3.2.1 Hardware Requirements

3.2.2 Software Requirements

3.3 ARCHITECTURE DIAGRAM

3.3.1 Modules Implementation

4 SYSTEM STUDY

4.1 FEASIBILITY STUDY

4.1.1 Technical Feasibility

4.1.2 Economical Feasibility

4.1.3 Operational Feasibility

4.1.4 User Acceptance

5 SOFTWARE ENVIRONMENT

6
5.1 JAVA TECHNOLOGY

5.1.1 Python Programming language

5.1.2 Python platform

5.2 WHAT PYTHON TECHNOLOGY DO?

5.3 GUI

5.4 SQL
5.5 MACHINE LEARNING

6 TESTING

6.1 RESPONSE TIME

6.2 ERROR MANAGEMENT

6.3INTELLIGENCE

6.4 UNDERSTANDING

6.5 DELIVERS PERSONALIZATION

CONCLUSION

REFERENCES

A1 APPENDIX-1: CHATBOT

A2 APPENDIX-2: TRAINNING DATA

A3 APPENDIX-3: GUI-APP

7
LIST OF FIGURES

[Link] TITLE PAGE


NO
1.0 Services based on the backend application 16
software or other services

1.1 Working Method 21


1.2 Functioning Method 22

8
CHAPTER-1
INTRODUCTION

By enabling financial institutions to use machine learning and natural language


processing (NLP) to analyse consumer data and spot trends in customer
behaviour, preferences, and feelings, artificial intelligence (AI) has completely
changed the banking sector. Using AI and NLP to interact with consumers
through several channels, like chatbots, voice assistants, and mobile apps, is an
emerging trend in the banking sector. In the banking sector, AI-based
conversation has a wide range of uses, including marketing, customer interaction,
fraud detection, risk assessment, and compliance monitoring.

The banking sector gains from AI-based conversation in a number of ways,


including improved customer experiences, cost savings, greater risk
management, more revenue, and a competitive edge. However, it also poses a
number of difficulties, such as data quality, privacy issues, bias, and Fairness,
law, and moral principles are taken into [Link] these
difficulties, AI-based dialogue has bright future promises for the banking sector.
AI-based conversation will probably increase security and transaction processing
when combined with other technologies like blockchain. A wider range of use
cases, including wealth management, insurance, and investment banking, are also
likely to leverage AI-based conversation. More individualised and practical
services are anticipated to be developed as a result of the continuous focus on the
client experience, but ethical issues will continue to be a top priority for banks as
they implement AI-based conversation solutions.

The way private customers are interacting with banks is changing. They described
that the banking industry as a whole is making a consistent effort to shift

9
progressively towards 1 digital channels. This shift is embracing a change from
an account based view of a banking customer to a perspective, which sees
customers as unique individuals with different needs. The challenge is to provide
digital services that improve the customers experience by considering their
personalised and specific needs. This is a key factor for the creation of banking
services and products of the future. Consumers have already in multiple areas of
their lives adapted a digital lifestyle substituting daily habits with various digital
channels. Skinner (2014) states that digital social networks have large effects on
the digitalisation process of various industries. As a result digital solutions are
increasingly becoming an extension of traditional social interactions. During this
conversion consumers are increasingly expecting that financial services are
continuously digitally available in a customer friendly manner (Cuesta et al.,
2015). Thus, one field which is supposed to leverage AI technologies are
customer services.

With AI-based conversation, banks may interact with customers in a variety of


ways, including chatbots, voice assistants, and mobile apps. These tools can aid
with financial transactions, respond to client inquiries, and offer tailored
recommendations .By examining transactional data, spotting problematic trends,
and alerting the bank's security team, AI-based discourse can assist banks in
detecting fraud. Using AI-based conversation, banks can evaluate a customer's
creditworthiness by looking into their financial history, work situation, and other
[Link] examining client information and spotting any violations, AI-based
dialogue can help banks keep an eye on whether employees are following legal
[Link] examining client preferences, behaviour, and feelings, AI-based
discourse can assist banks in personalising their marketing messages.

Key terms: Artificial Intelligence, Banking, Customer service, virtual


assistant

10
CHAPTER-2

LITERATURE REVIEW

TITLE: A Survey of Chatbot Systems through a Loebner Prize Competition


Lens

AUTHORS: Leticia Seixas Pereira, João Eduardo Montandon, and Rodrigo L.


M. Santos.

A chatbot is emerged as an effective tool to address the user queries in


automated, most appropriate and accurate way. Depending upon the complexity
of the subject domain, researchers are employing variety of soft-computing
techniques to make the chatbot user-friendly. It is observed that chatbots have
flooded the globe with wide range of services including ordering foods,
suggesting products, advising for insurance policies, providing customer
support, giving financial assistance, schedule meetings etc. However, public
administration based services wherein chatbot intervention influence the most,
is not explored yet. This paper discuses about artificial intelligence based
chatbots including their applications, challenges, architecture and models. It
also talks about evolution of chatbots starting from Turing Test and Rule-based
chatbots to advanced Artificial Intelligence based Chatbots (AI-Chatbots). AI-
Chatbots are providing much kind of services, which this paper outlines into
two main aspects including customer based services and public administration
based services. The purpose of this survey is to understand and explore the
possibility of customer & public administration services based chatbot. The
survey demonstrates that there exist an immense potential in the AI assisted
chatbot system for providing customer services and providing better governance
in public administration services.

11
TITLE: A Review of Chatbot Technology

AUTHORS: N. A. C. Bianchi and R. A. Mugge

In the modern era of technology, chatbot is the next big thing in the domain of
conversational services. A chatbot is a virtual person who can effectively talk to
any human being using interactive textual as well as verbal skills. There are many
statistics available which suggest that integration of chatbot in any business as a
part of their customer service increases the business progress and customer
satisfaction exponentially. Hence it becomes crucial to understand the crux of the
chatbot technology. Owing to extensive research in this field, there are numerous
methodologies available to create a conversational entity. It becomes quite
confusing to decide a perfect method to generate conversational agent for the
desired purpose. Also, generation of chatbot is one issue and successful
integration is in itself another problem which is many times overlooked. This
paper provides some valuable insights on how to generate as well as how to
integrate a chatbot.

TITLE: Teaching Introductory Artificial Intelligence Using a simple Agent


Framework

AUTHORS: Maja Pantic, Reinier Zwitserloot, and Robbert Jan Grootjans

12
IEEE Transactions On Education, Vol. 48, No. 3, August 2005. This paper
describes a flexible method of teaching introductory artificial intelligence (AI)
using a novel, Java-implemented, simple agent framework developed specifically
for the purposes of this course. Although numerous agent frameworks have been
proposed in the vast body of literature, none of these available frameworks proved
to be simple enough to be used by first-year students of computer science. Hence,
the authors set out to create a novel framework that would be suitable for the aims
of the course, for the level of computing skills of the intended group of students,
and for the size of this group of students. The content of the introductory AI
course in question is a set of assignments that requires the students to use
intelligent agents and other AI techniques to monitor, filter, and retrieve relevant
information from the World Wide Web.

TITLE: Designing a Chat-bot that Simulates an Historical Figure

AUTHORS: Emanuela Haller and Traian Rebedea

IEEE Conference Publications, July 2013. There are many applications that are
incorporating a human appearance and intending to simulate human dialogue. But
in most of the cases the knowledge of the conversational bot is stored in a
database formed by a human experts. However, very few researches have
investigated the idea of creating a chat-bot with an artificial character and
personality starting from web pages or plain text about a certain person. This
paper describes an approach to the idea of identifying the most important facts in
texts describing the life (including the personality) of an historical figure for
building a conversational agent that could be used in middle-school CSCL
scenarios.

13
CHAPTER-3

SYSTEM ANALYSIS

3.1 OVERALL DESCRIPTION

3.1.1 Existing System

Customer-facing conversational interfaces are offered by a number of AI-based


discourse systems now used in the banking sector.

The conversational AI platform provided by Kasisto is tailored exclusively for


the banking sector. Using virtual assistants, the platform offers users
individualised banking experiences using natural language processing and
machine intelligence.

Clinc: Clinc is an artificial intelligence platform that provides customers with


conversational banking experiences via virtual assistants. To comprehend
consumer inquiries and deliver pertinent answers, the platform makes use of
deep learning and natural language processing.

[Link]: [Link] is a virtual assistant powered by AI that offers customers


conversational banking experiences. The software understands consumer
inquiries and offers tailored responses using natural language processing and
machine learning.

Disadvantages:

Chatbots have limited responses, so they're not often able to answer multi-part
questions or questions that require decisions. This often means your customers
are left without a solution, and have to go through more steps to contact your
support team. The purpose of a chatbot system is to simulate a human
conversation. Its architecture integrates a language model and computational
algorithm to emulate information online communication between a human and a

14
computer using natural language. The college student and employees can freely
upload their queries. One of the biggest challenges with using chatbots in
customer support comes with interpreting the messages and understanding the
user intention.

3.1.2 Proposed System

The system process user’s query and understands what he wants to convey and
simultaneously answers them appropriately. The questions asked by the users
can be in any specified format. There is no specific method for users to ask
questions. The built in artificial intelligence system understand users
requirements and provides suitable answers to the user. When people think of
conversational artificial intelligence, online chatbots and voice assistants
frequently come to mind for their customer support services and omni-
channel deployment. Most conversational AI apps have extensive analytics built
into the backend program, helping ensure human-like conversational
experiences.

Experts consider conversational AI's current applications weak AI, as they are
focused on performing a very narrow field of tasks. Strong AI, which is still a
theoretical concept, focuses on a human-like consciousness that can solve
various tasks and solve a broad range of problems. Despite its narrow focus,
conversation AI is an extremely lucrative technology for enterprises, helping
businesses more profitable. While an AI chatbot is the most popular form of
conversational AI, there are still many other use cases across the enterprise.

Advantage:
Staffing a customer service department can be quite costly, especially as you
seek to answer questions outside regular office hours. Providing customer
assistance via conversational interfaces can reduce business costs around
salaries and training, especially for small- or medium-sized companies.
Chatbots and virtual assistants can respond instantly, providing 24-hour
availability to potential customers.

15
3.2 SYSTEM CONFIGURATION

3.2.1 Hardware Requirements:

Hardware - Pentium
Speed - 1.1 GHz
RAM - 1GB
Hard Disk - 20 GB
Floppy Drive - 1.44 MB
Monitor - SVGA

3.2.2 Software Requirements:

Operating System - Windows


Technology - JavaScript,Python
Web Technologies - Python,Html, JavaScript, CSS
Application - Complex dialogues , Fast onboarding

16
3.3 ARCHITECTURE DIAGRAM

Fig:1.0 Services based on the backend application software or other


services

3.3.1 Modules Implementation

USER FLOW:

The NLU Engine is composed of multiple components of chatbot. To generate a


response, that chatbot has to understand what the user is trying to say i.e., it has
to understand the user’s intent.
Message processing starts with intent classification, which is trained on a
variety of sentences as inputs and the intents as the target. For example, if the
user asks “What is the weather in Berlin right now?” the intent is that the user’s
query is to know the weather.
Then, we need to understand the specific intents within the request, this is
referred to as the entity. In the previous example, the weather, location, and
number are entities. There is also entity extraction, which is a pre-trained model
that’s trained using probabilistic models or even more complex generative
models.
17
FETCHING RESPONSE:

To predict a response, previous user conversations are stored in a database with


a dictionary object that has information about the current intent, entities, and
information provided by the user. This information is used to:

• Respond to the user with a message defined by the rules set by the bot
builder
• Retrieve data from your database
• Make an API call to get results matching intent

The first option is easier, things get a little more complicated with option 2 and
3. The control flow handle will remain within the ‘dialogue management’
component to predict the next action, once again.

BACKEND INTERGRATION:
Since chatbots rely on information and services exposed by other systems or
applications through API, this module interacts with those applications or
systems via APIs.
Thus, the bot makes available to the user all kinds of information and services,
such as weather, bus or plane schedules or booking tickets for a show, etc.

ENVIRONMENT:
The environment is primarily responsible for contextualizing users’
messages/inputs using natural language processing (NLP). It is one of the
important parts of chatbot architecture, giving meaning to the customer queries
and figuring the intent of the questions.

18
CHAPTER-4

SYSTEM STUDY

4.1 FEASIBILITY STUDY

Chatbots were made to be the alternate for support centre or inquiries specific
jobs. In the hope to utilize the logical and thinking prowess of humans in more
regions where necessary. But in reality, it turned out even after 70 years of
development an AI chatbot feels rather robotic. The feasibility of a chatbot is not
as per expected. Chatbot fails at creating an emotional connection with the user
which completely destroys the conversation. The conversations don’t last as long
as fifteen minutes Most of the chatbots still do this day are using poor old rule-
based techniques. The complexity increases at an exponential level in regards to
creating it more humanly. Artificial intelligence is increasing at the highest rate
in the chatbot sector when compared to any other.

Here are some factors to consider for a GUI chatbot project in Python:

 TECHNICAL FEASIBILITY

 ECONOMICAL FEASIBILITY

 OPERATIONAL FEASIBILITY

 USER ACCEPTANCE

4.1.1 TECHNICAL FEASIBILITY

Availability of technology and tools e for developing a GUI chatbot in Python


This includes the programming language itself, as well as any required libraries,
frameworks, or other software. The technologies needed for making a chatbot

19
include choosing technologies that provide an agent interface, middleware stack
that includes a natural language processing platform that can manage various
models, public and private cloud deployment capabilities, interface that allows
non-developers

4.1.2 ECONOMICAL FEASIBILITY

This research is being done cost-efficient hosting with domain registration which
may include increased revenue, cost savings, or other economic benefits that can
be directly attributed to the chatbot. Demand in the market of chatbot services
with end customer services efficient manner of the banking system. Customer
feedback services been implemented for essential transcation or other services in
demand belong to end user satisfaction.

4.1.3 OPERATIONAL FEASIBILITY

Technical infrastructure which includes hardware, software and networking


capabilities. Integration with existing database or other tools. We use SQL format
files which may include customer account information with the corresponding
banking sector. Chatbots can be used for a variety of banking processes, like
collecting and processing data and documents, creating and managing customer
accounts, providing account details and balance information, reducing the
impending wait time and paperwork by using existing data to automate processes
for clients

4.1.4 USER-ACCEPTANCE FEASIBILITY

Chatbots can send timely notifications for transactional updates, payment


reminders, bank offers, policy offers, and more. Chatbots can inform customers
directly about the preferred communication channel and help build a rapport
between the customer and the bank.
20
CHAPTER-5

SOFTWARE ENVIRONMENT

5.1 PYTHON TECHNOLOGY

Python technology is both a programming language and a platform

5.1.1 Python Programming Language


Python is an interpreted, interactive, object-oriented programming language. It
incorporates modules, exceptions, dynamic typing, very high level dynamic data
types, and classes. It supports multiple programming paradigms beyond object-
oriented programming, such as procedural and functional programming
▪ Easy to code
▪ Free and Open source
▪ Robust Standard Library
▪ Interpreted
▪ Portable
▪ Object-oriented
▪ Procedure-oriented
▪ Support for GUI
▪ Simply Complex Software Development
▪ Extensible
Python is an interpreted, object-oriented, high-level programming language with
dynamic semantics. Its high-level built in data structures, combined with dynamic
typing and dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to connect existing
components together. Python's simple, easy to learn syntax emphasizes
readability and therefore reduces the cost of program maintenance. Python
supports modules and packages, which encourages program modularity and code
reuse. The Python interpreter and the extensive standard library are available in

21
source or binary form without charge for all major platforms, and can be freely
distributed.

Fig1.1 WORKING METHOD

Often, programmers fall in love with Python because of the increased


productivity it provides. Since there is no compilation step, the edit-test-debug
cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input
will never cause a segmentation fault. Instead, when the interpreter discovers an
error, it raises an exception. When the program doesn't catch the exception, the
interpreter prints a stack trace. A source level debugger allows inspection of local
and global variables, evaluation of arbitrary expressions, setting breakpoints,
stepping through the code a line at a time, and so on. The debugger is written in
Python itself, testifying to Python's introspective power. On the other hand, often
the quickest way to debug a program is to add a few print statements to the source:
the fast edit-test-debug cycle makes this simple approach very effective.

5.1.2 Python Platform


Starting with Python version 1.5a4, package support is built into the Python
interpreter. This implements a slightly simplified and modified version of the
package import semantics pioneered by the "ni" module.

"Package import" is a method to structure Python's module namespace by using


"dotted module names". For example, the module name A.B designates a

22
submodule named B in a package named A. Just like the use of modules saves
the authors of different modules from having to worry about each other's global
variable names, the use of dotted module names saves the authors of multi-
module packages like NumPy or PIL from having to worry about each other's
module names.

Starting with Python version 1.3, package import was supported by a standard
Python library module, "ni". (The name is supposed to be an acronym for New
Import, but really referrs to the Knights Who Say Ni in the movie Monty Python
and the Holy Grail, who, after King Arthur's knights return with a shrubbery, have

changed their names to the Knights Who Say Neeeow ... Wum ... Ping - but that's
another story.)

The ni module was all user code except for a few modifications to the Python
parser (also introduced in 1.3) to accept import statements of the for "import
A.B.C" and "from A.B.C import X". When ni was not enabled, using this syntax
resulted in a run-time error "No such module". Once ni was enabled (by executing
"import ni" before importing other modules), ni's import hook would look for the
submodule of the correct package.

The new package support is designed to resemble ni, but has been streamlined,
and a few features have been changed or removed

Fig1.2 FUNCTIONING METHOD

23
5.2 What can Python Technology Do?

Program development using Python is 5-10 times faster than using C/C++, and
3-5 times faster than using Java. In many cases, a prototype of an application
can be written in Python without writing any C/C++/Java code. Often, the
prototype is sufficiently functional and performs well enough to be delivered as
the final product, saving considerable development time. Other times, the
prototype can be translated in part or in whole to C++ or Java -- Python's object-
oriented nature makes the translation a straightforward process.
The best approach is often to write only the performance-critical parts of the
application in C++ or Java, and use Python for all higher-level control and
customization. There are several anecdotes about applications that started out as
pure C++ code to which Python was added as an extension language, where in
each new version the percentage of the application written in Python increased,
while also increasing the overall performance, functionality and reliability of
the application. (E.g. Case Study: Python in a Commercial Environment, by
Greg Stein, Microsoft, in Proceedings of the 6th International Python
Conference, and the Alice VR project at UvA and CMU.)
Python has a strong presence on the web. It is suitable for CGI programming
(on all platforms: Unix, Windows and Mac); there are interfaces to all major
commercial databases. Python has a library that interfaces to the main Internet
and web protocols, and has HTML parsing and generation toolkits. Python was
a major implementation language for Infoseek when they were smaller. At least
one company (Digital Creations) is selling a suite of server side tools using
Python. And finally, Python has been used to implement a web browser (Grail)
Python is in use at many places as an integration language, used to glue together
("steer") existing components. The strategy here is to create Python extension
modules (written in C/C++) that make the functionality of large components
written in C/C++ available to the Python programmer. The extension ("glue")

24
modules are required because Python cannot call C/C++ functions directly; the
glue extensions handle conversion between Python data types and C/C++ data
types and error checking, translation error return values into Python exception.

Creation of glue extensions is simplified by the existence of SWIG, which reads


header files containing function and method prototypes and automatically
generates the necessary type conversion and error checking code. In situations
where the underlying code (usually C code) doesn't use an object-oriented model,
the glue extension can in turn be wrapped in a Python module that defines a
proper class hierarchy, while delegating the performance critical operations to the
C code.

Using Python, better applications can be developed because different kinds of


programmers can work together on a project. For example, when building a
scientific application, C/C++ programmers can implement efficient numerical
algorithms, while scientists on the same project can write Python programs that
test and use those algorithms. The scientist doesn't have to learn a low-level
programming language, and the C/C++ programmer doesn't need to understand
the science involved.

Without Python, large amounts of C/C++ code often have to be written just to
provide a flexible enough input mechanism so that scientists can feed the program
its data, in all the variantions that are required for reasons of experimental setup
(for instance). With Python, Python can be used to wrote a much more flexible
input mechanism in a much shorter time, or Python itself can be the ultimate
flexible input mechanism. As an extreme example, Lawrence Livermore National
Laboratories is using Python to eventually replace a scripting language (BASIS)
that was developed in house for the same purpose; BASIS started out as a simple
input mechanism for Fortran programs, and gradually acquired many features of
scripting languages (variables, conditionals, loops, procedures and so on) with
increasing awkwardness.

25
Because Python has existing interfaces to so many different components in very
different application domains, Python is ideal for oddball integration tasks. It can
link a commercial database to number-crunching code; it can add a graphical user
interface to a network management tool; it can send email from a virtual reality
application.

5.3 GUI(Graphical User Interface)

In the late 1970s, the Xerox Palo Alto research laboratory created GUIs, which
are now common in Windows, macOS and many software applications. By using
specially designed and labeled images, pictures, shapes and color combinations,
objects were depicted on the computer screen that either resembled the operation
to be performed, or were intuitively recognized by the user.

In 1983, Apple introduced the first commercial use of a GUI in the Lisa computer,
followed shortly thereafter by the much more famous Apple Macintosh in 1984.
Then, in 1985, Microsoft released Windows 1.0. The introduction of these
systems revolutionized the use of personal computers, paving their way to
reaching the general public. Before these, the use of command-line UIs restricted
their use to advanced business users, scientists and information technology
experts.

Today, each OS has its own GUI (such as Ubuntu for Linux). Software
applications use these and add additional GUIs of their own, for example
Microsoft Word and Excel, or Adobe Photoshop. All internet browsers, such as
Chrome, Internet Explorer and Firefox use their own GUIs to allow the user to
navigate through websites which may also have their own GUIs (such as
Facebook, Instagram or WordPress sites). If a user opens, for example, a video
from a streaming video player inside a website, they will interact with four
different GUIs in total:

26
➢ The OS’s
➢ The browser’s
➢ The website’s
➢ The video player’s

Information is presented to the user via visual widgets that can be manipulated
without the need for command codes. The user interacts with these elements of
the interface (such as buttons, icons and menus), that respond in accordance with
the programmed script, supporting each user’s action. The same application
software or operating system may present different or slightly different GUIs as
it is patched and evolves. Even if the core of the application and its functions stay
the same, the appearance might be modified according to user needs or to improve
user experience — such as the case of the various Windows versions throughout
the years. Many GUIs use standard formats for representing text and graphical
elements (such as fonts or scroll bars), so it is possible to share data between
programs sharing the same GUI software.

How users interface with a computer is constantly being revised and reinvented.
Human ingenuity has brought users from the keyboard to the mouse and trackball,
touch screens and voice commands. A visual language has evolved as GUI has
become commonplace in both operating systems (OSs) and software applications.
Even those with limited computer skills can now, through the use of GUIs, learn
how to use computer applications for word processing, finances, inventory,
design, artwork or hobbies.

27
5.4 MACHINE LEARNING

In the world of machine learning, "learning" is the process of a computer


program or system gaining knowledge and improving its performance over
time. Imagine your computer program being a student, and the data it processes
being the lessons. The computer program starts off as a blank slate, with no
prior knowledge or understanding of the task it's supposed to perform.
As it's exposed to more and more data, it starts to make connections and
develop an understanding of the patterns and relationships within the data.
Think of it like a baby learning to walk. At first, the baby has no understanding
of how to walk, but as it's exposed to more and more experiences, it starts to
understand the mechanics of walking and eventually becomes a pro. Similarly,
the computer program goes through a process of trial and error, making
predictions and receiving feedback on how accurate they are. Just like a student
getting grades on their test, the computer program receives feedback on how
well it's doing and it uses that feedback to improve its performance. As the
computer program is exposed to more and more data, it becomes better and
better at the task it's supposed to perform. It's like a student who's been studying
for a test, the more they study, the better they perform. And just like a student
who graduates and becomes a master in their field, the computer program
becomes a true expert in the task it's been trained to perform. It can make
accurate predictions, identify patterns and relationships within the data, and
make decisions that are highly relevant to its task. This process of learning is
what makes machine learning so powerful and versatile. It allows computer
programs to adapt and improve over time, without the need for explicit
programming. It's like having a super intelligent, highly-skilled apprentice that
never stops learning and never gets tired. So, whether it's predicting stock
prices, detecting fraud, or driving a car, machine learning gives computers the
ability to learn and improve in ways that were once thought to be the exclusive
domain of humans. With machine learning, the possibilities are endless, and the
future is yours to shape.
There are three main types of machine learning:

▪ Supervised learning: In supervised learning, the machine learning


algorithm is trained on a labeled dataset, which means that the input data
is already labeled with the correct output. The algorithm learns to
28
recognize patterns in the data and uses that knowledge to make
predictions on new, unlabeled data. The most commonly used form of
machine learning. In supervised learning, the machine learning algorithm
is trained on a labeled dataset, which means that the input data is already
labeled with the correct output. The algorithm learns to recognize patterns
in the data and uses that knowledge to make predictions on new,
unlabeled data.

▪ Unsupervised learning: In unsupervised learning, the machine learning


algorithm is trained on an unlabeled dataset, which means that there is no
predefined output. The algorithm learns to recognize patterns and
relationships in the data without any guidance and can be used to find
similarities or groupings in the data. the data is not labeled, which means
that there is no predefined output. The algorithm learns to recognize
patterns and relationships in the data without any guidance and can be
used to find similarities or groupings in the data.

▪ Reinforcement learning: In reinforcement learning, the machine learning


algorithm learns through trial and error by interacting with an
environment. The algorithm receives rewards or punishments based on its
actions, and learns to maximize its reward over time.

Machine learning algorithms can be further categorized into different types,


including:
▪ Decision trees: A decision tree is a flowchart-like structure that uses a
tree-like model of decisions and their possible consequences. It is a
supervised learning algorithm that can be used for both classification and
regression.
▪ Neural networks: A neural network is a set of algorithms modeled loosely
after the human brain. It is used for both supervised and unsupervised
learning and can be used for a variety of tasks including image
recognition, natural language processing, and speech recognition.

29
▪ Support vector machines (SVMs): SVMs are a type of supervised
learning algorithm used for classification and regression analysis. SVMs
use a boundary to separate different classes or groups in the data.
▪ Clustering: Clustering is an unsupervised learning algorithm that is used
to group similar data points together. It can be used for tasks such as
customer segmentation, image segmentation, and anomaly detection.

There are many different applications of machine learning, including:

✓ Predictive analytics: Predictive analytics involves using machine


learning algorithms to analyze historical data and make predictions
about future events or behaviors. Predictive analytics can be used for
tasks such as sales forecasting, risk management, and fraud detection.

✓ Image and speech recognition: Machine learning algorithms can be


trained to recognize patterns in images or speech and can be used for
tasks such as identifying objects in an image or transcribing speech
into text.

✓ Natural language processing: Natural language processing involves


using machine learning algorithms to analyze and understand human
language. This technology can be used for tasks such as sentiment
analysis, chatbots, and language translation.

✓ Fraud detection: Machine learning algorithms can be used to identify


fraudulent behavior in financial transactions, healthcare claims, and
other areas.

30
CHAPTER-6

TESTING

The rapid advancements in next-gen technologies have significantly transformed


the way businesses connect and communicate with customers. Today, businesses
leverage advanced technologies like Artificial Intelligence (AI), Machine
Learning (ML), Robotic Process Automation (RPA), and Natural Language
Processing (NLP) to develop software bots and chatbots. These AI-based
conversational bots interact with customers in real-time and enable human-like
interactions between systems and humans. For businesses, these AI
conversational bots continue to be a faster mode of communication with their
customers as it delivers a greater customer experience (CX).

6.1 RESPONSE TIME:

In contrast to humans, chatbots can respond almost instantly, as they need only
fractions of a second to process user input and generate a response (Følstad et al.
2018; Schuetzler et al. 2021). However, some scholars suggest that instant
responses make chatbots appear unhuman-like, reducing the feeling of a natural
conversation (Holtgraves and Han 2007; Appel et al. 2012; Schanke et al. 2021).
Schuetzler (2015) argues that “it introduces a non-negligible feeling of
artificiality to interact with something that can respond instantly to anything you
say” (p. 50). Consequently, some researchers and practitioners delay chatbot
responses. In technology-mediated interaction (e.g., instant messaging), it refers
to the time it takes a person to respond to the other person’s message as well as
the lag time between consecutive messages (Moon 1999). It includes the time
needed to read, internalize, and make sense of another person’s message, as well
as the time needed to craft and edit a response (Derrick et al. 2013).

31
6.2 ERROR MANAGEMENT

Chatbot’s ability to deal with the errors and its ability to recover from those errors
must be tested. If a bot fails to understand user inputs, it must smartly ask
alternative questions to the customer or should connect the user with a live agent.
Our results reveal opposing effects of a delayed response time and shed light on
the differences between novice and experienced chatbot users. First, in line with
our expectations, a delayed (as opposed to instant) response time enhances novice
users’ social presence perceptions. However, we find the opposite effect for
experienced users: a delayed response time actually reduces their social presence
perceptions. ocial presence mediates the effect of chatbot response time on usage
intentions, and that this mediation is moderated by prior chatbot experience.
Corroborating our previous findings, the indirect effect of a delayed response time
on chatbot usage intentions via social presence is positive for novice users but
negative for experienced users. This finding suggests that a delayed response time
not only has opposing effects on users’ immediate social presence perceptions,
but also leads to markedly different downstream consequences on usage
intentions.

Test Results: All the test scenarios were successful. There were no faults found.

6.3 INTELLIGENCE

Chatbot’s intelligence must be tested to ensure it remembers things and provides


correct responses based on recorded or stored data. NLP language is been
implemented in the system so that bot can answer biggest questions to smallest
questions .

Test Results: All the test scenarios were successful. There were no faults found.

32
6.4 UNDERSTANDING

Chatbot should be able to understand all requests, small talk, idioms,


emojis sent by the user to frame appropriate responses. Those phrases
been divided into segments of characteristics which differ from one
another sequel process takes place with the word count of each
sentences in each phases.

6.5 DELIVERS PERSONALIZATION

AI-based bots are backed by ML and NLP technology, which helps bots learn
information explicitly from past interactions. Thus, they provide a more accurate
and personalized response to users. the impact is stronger for novice than for
experienced users, indicating that with increased experience, the importance of
social presence as a determinant of chatbot usage intentions could decrease.
Interestingly, we also find that when social presence perceptions are low,
experienced users have higher usage intentions than novice users. This finding
suggests that experienced users might be more tolerant of lower social presence
perceptions than novice users when forming their intention to use a chatbot.
Intelligent chatbot technology like Spectrum’s designed to personalize the
customer journey using real-time conversation. It is one of the most powerful and
useful capabilities. It learns to apply chatbot communication to amaze customers
and build better relationships with them as real time conversation.

33
CONCLUSION

In the number of organizations that implement chatbots to automate customer


service. Most, if not all, of the chatbots are intentionally designed to look and
act like humans. Our findings, however, challenge the assumption that chatbots
should always mimic human appearance and behavior. Taking users’ prior
experience into account, we find that a delayed response time of a chatbot –
which more closely resembles human behavior than an instant response time –
can have negative effects. While a delayed response time positively influences
novice users’ social presence perceptions and chatbot usage intentions, the
effect is negative for experienced users. These findings not only highlight the
important role of individual user characteristics in human–chatbot interaction,
but could also help explain some of the high-profile failures of human-like
chatbots (e.g., IKEA Anna) that could not sustain user engagement beyond an
initial interest (Brandtzaeg and Følstad 2018). Therefore, a major implication of
our study is that the current “one-design-fits-all” approach to chatbot design
could be one reason for the ongoing struggle to meet users’ expectations and
increase adoption. Finally, interactions between participants and chatbots in our
experiment were rather short (i.e., five minutes on average) and did not allow us
to track how perceptions and expectations evolve as users gain experience.
Therefore, longitudinal studies are required to examine how perceptions and
expectations evolve or change when people use a chatbot over a longer period
of time.

34
REFERENCES
1) Zhang, Y., & Oleson, M. (2018). A survey on chatbot design techniques in
speech conversation systems. Journal of Intelligent Information Systems, 50(2),
191-228.

2) Liao, Q. V., & Fu, W. T. (2017). How wechat and zhihu facilitate knowledge
sharing: A comparative analysis. Proceedings of the 2017 ACM Conference on
Computer Supported Cooperative Work and Social Computing, 1665-1680.

3) Azzopardi, G., Crane, M., & Lamsfus, C. (2019). Chatbots in customer service:
The potential for improved customer experience. Journal of Service Theory and
Practice, 29(1), 168-190.

4) Datta, A., & Bose, I. (2019). Designing chatbots for banking services: A
conceptual framework. Journal of Information Systems and Technology
Management, 16, e2019063.

5) Ramachandran, R., & Zhang, S. (2021). Conversational agents in healthcare:


A systematic review. Journal of Biomedical Informatics, 118, 103798

6) Bainbridge, W. S., & Roco, M. C. (2016). Progress in converging technologies,


advanced materials, and nanotechnology. Journal of Nanoparticle Research,
18(10), 294.

7) Kshetri, N., & Dholakia, R. (2019). Blockchain-enabled applications:


Understandings, applications, and research directions. International Journal of
Information Management, 49, 114-129.

8) Liu, Y., Li, X., & Cai, Y. (2019). Chatbot-based customer service automation:
A case study. International Journal of Industrial Engineering and Management,
10(3), 183-192.

35
APPENDIX 1

SAMPLE CODE: CHATBOT

import random

import json

import torch

from model import NeuralNet

from nltk_utils import bag_of_words, tokenize

device = [Link]('cuda' if [Link].is_available() else 'cpu')

with open('[Link]', 'r') as json_data:

intents = [Link](json_data)

FILE = "[Link]"

data = [Link](FILE)

input_size = data["input_size"]

hidden_size = data["hidden_size"]

output_size = data["output_size"]

all_words = data['all_words']

tags = data['tags']

model_state = data["model_state"]

model = NeuralNet(input_size, hidden_size, output_size).to(device)

model.load_state_dict(model_state)

[Link]()

36
bot_name = "Roxane"

def get_response(msg):

sentence = tokenize(msg)

X = bag_of_words(sentence, all_words)

X = [Link](1, [Link][0])

X = torch.from_numpy(X).to(device)

output = model(X)

_, predicted = [Link](output, dim=1)

tag = tags[[Link]()]

probs = [Link](output, dim=1)

prob = probs[0][[Link]()]

if [Link]() > 0.75:

for intent in intents['intents']:

if tag == intent["tag"]:

return [Link](intent['responses'])

return " For futher details contact your nearest branch contact no:
9448256970... Thank you for visiting us"

37
APPENDIX 2

SAMPLE CODE: TRAINNING CHATBOT

import numpy as np

import random

import json

import torch

import [Link] as nn

from [Link] import Dataset, DataLoader

from nltk_utils import bag_of_words, tokenize, stem

from model import NeuralNet

with open('[Link]', 'r') as f:

intents = [Link](f)

all_words = []

tags = []

xy = []

# loop through each sentence in our intents patterns

for intent in intents['intents']:

tag = intent['tag']

# add to tag list

[Link](tag)

for pattern in intent['patterns']:

38
# tokenize each word in the sentence

w = tokenize(pattern)

# add to our words list

all_words.extend(w)

# add to xy pair

[Link]((w, tag))

# stem and lower each word

ignore_words = ['?', '.', '!']

all_words = [stem(w) for w in all_words if w not in ignore_words]

# remove duplicates and sort

all_words = sorted(set(all_words))

tags = sorted(set(tags))

print(len(xy), "patterns")

print(len(tags), "tags:", tags)

print(len(all_words), "unique stemmed words:", all_words)

# create training data

X_train = []

y_train = []

for (pattern_sentence, tag) in xy:

39
# X: bag of words for each pattern_sentence

bag = bag_of_words(pattern_sentence, all_words)

X_train.append(bag)

# y: PyTorch CrossEntropyLoss needs only class labels, not one-hot

label = [Link](tag)

y_train.append(label)

X_train = [Link](X_train)

y_train = [Link](y_train)

# Hyper-parameters

num_epochs = 1000

batch_size = 8

learning_rate = 0.001

input_size = len(X_train[0])

hidden_size = 8

output_size = len(tags)

print(input_size, output_size)

class ChatDataset(Dataset):

def __init__(self):

self.n_samples = len(X_train)

40
self.x_data = X_train

self.y_data = y_train

# support indexing such that dataset[i] can be used to get i-th sample

def __getitem__(self, index):

return self.x_data[index], self.y_data[index]

# we can call len(dataset) to return the size

def __len__(self):

return self.n_samples

dataset = ChatDataset()

train_loader = DataLoader(dataset=dataset,

batch_size=batch_size,

shuffle=True,

num_workers=0)

device = [Link]('cuda' if [Link].is_available() else 'cpu')

model = NeuralNet(input_size, hidden_size, output_size).to(device)

# Loss and optimizer

criterion = [Link]()

optimizer = [Link]([Link](), lr=learning_rate)

# Train the model

for epoch in range(num_epochs):

41
for (words, labels) in train_loader:

words = [Link](device)

labels = [Link](dtype=[Link]).to(device)

# Forward pass

outputs = model(words)

# if y would be one-hot, we must apply

# labels = [Link](labels, 1)[1]

loss = criterion(outputs, labels)

# Backward and optimize

optimizer.zero_grad()

[Link]()

[Link]()

if (epoch+1) % 100 == 0:

print (f'Epoch [{epoch+1}/{num_epochs}], Loss: {[Link]():.4f}')

print(f'final loss: {[Link]():.4f}')

data = {

"model_state": model.state_dict(),

"input_size": input_size,

"hidden_size": hidden_size,

"output_size": output_size,

42
"all_words": all_words,

"tags": tags

FILE = "[Link]"

[Link](data, FILE)

print(f'training complete. file saved to {FILE}')

43
APPENDIX 3

SAMPLE CODE: GUI APP

from tkinter import *

from chat import get_response, bot_name

BG_GRAY = "#ABB2B9"

BG_COLOR = "#17202A"

TEXT_COLOR = "#EAECEE"

FONT = "Helvetica 14"

FONT_BOLD = "Helvetica 13 bold"

class ChatApplication:

def __init__(self):

[Link] = Tk()

self._setup_main_window()

def run(self):

[Link]()

def _setup_main_window(self):

[Link]("Chat")

[Link](width=False, height=False)

[Link](width=550, height=550, bg=BG_COLOR)

44
# head label

head_label = Label([Link], bg=BG_COLOR, fg=TEXT_COLOR,

text="Welcome", font=FONT_BOLD, pady=10)

head_label.place(relwidth=1)

# tiny divider

line = Label([Link], width=450, bg=BG_GRAY)

[Link](relwidth=1, rely=0.07, relheight=0.012)

# text widget

self.text_widget = Text([Link], width=20, height=2,


bg=BG_COLOR, fg=TEXT_COLOR,

font=FONT, padx=5, pady=5)

self.text_widget.place(relheight=0.745, relwidth=1, rely=0.08)

self.text_widget.configure(cursor="arrow", state=DISABLED)

# scroll bar

scrollbar = Scrollbar(self.text_widget)

[Link](relheight=1, relx=0.974)

[Link](command=self.text_widget.yview)

45
# bottom label

bottom_label = Label([Link], bg=BG_GRAY, height=80)

bottom_label.place(relwidth=1, rely=0.825)

# message entry box

self.msg_entry = Entry(bottom_label, bg="#2C3E50", fg=TEXT_COLOR,


font=FONT)

self.msg_entry.place(relwidth=0.74, relheight=0.06, rely=0.008,


relx=0.011)

self.msg_entry.focus()

self.msg_entry.bind("<Return>", self._on_enter_pressed)

# send button

send_button = Button(bottom_label, text="Send", font=FONT_BOLD,


width=20, bg=BG_GRAY,

command=lambda: self._on_enter_pressed(None))

send_button.place(relx=0.77, rely=0.008, relheight=0.06, relwidth=0.22)

def _on_enter_pressed(self, event):

msg = self.msg_entry.get()

self._insert_message(msg, "You")

46
def _insert_message(self, msg, sender):

if not msg:

return

self.msg_entry.delete(0, END)

msg1 = f"{sender}: {msg}\n\n"

self.text_widget.configure(state=NORMAL)

self.text_widget.insert(END, msg1)

self.text_widget.configure(state=DISABLED)

msg2 = f"{bot_name}: {get_response(msg)}\n\n"

self.text_widget.configure(state=NORMAL)

self.text_widget.insert(END, msg2)

self.text_widget.configure(state=DISABLED)

self.text_widget.see(END)

if __name__ == "__main__":

app = ChatApplication()

[Link]()

47

Common questions

Powered by AI

Conversational AI applications, although classified as weak AI due to their narrow task focus, significantly contribute to enterprise profitability by reducing costs associated with staffing customer service departments, providing 24-hour customer support, and enhancing user experiences through personalization. This liberates resources that can be redirected to other profit-generating activities and improves customer satisfaction, fostering business growth .

Potential ethical and legal concerns surrounding AI-based conversation systems include the privacy of user data, the potential for biased decision-making processes, and the accountability for AI-led decisions. Other issues involve ensuring fairness in AI interactions and the balance of compliance with existing laws while advancing technological capabilities .

Python serves as a 'glue language' in scientific applications by allowing integration of different system components. It connects performance-critical numerical algorithms written in C/C++ with flexible script-based input mechanisms. Python's role enables scientists to interact with complex systems without delving into low-level code, thus streamlining collaborative scientific development .

The specific challenges associated with developing and implementing AI-based chatbots in customer service include accurately interpreting user intent and the complexity of multi-part queries. Chatbots often struggle with providing solutions for complex inquiries, leading to gaps in user satisfaction. Additionally, ensuring robust data privacy and overcoming biases in the algorithms are significant hurdles .

Python technology has enhanced program development productivity by offering fast edit-test-debug cycles, high-level data structures, dynamic typing, and effective error handling. It allows for rapid prototype development and integration of performance-critical components using Python extension modules, which streamline development and reduce time to product delivery .

AI and NLP transform customer interactions in the banking sector by enabling institutions to analyze consumer data to identify behavioral patterns, which improve customer engagement strategies. AI-based conversations through chatbots and voice assistants facilitate easier and more intuitive customer interactions, allowing tasks like fraud detection, risk assessment, and compliance monitoring to be conducted effectively .

The major drivers for the adoption of AI in the banking sector include improved customer experiences, cost savings, enhanced risk management, increased revenue, and competitive advantages as noted by the study's analysis of AI expert interviews . On the other hand, the barriers include data quality issues, privacy concerns, potential biases, and moral and legal considerations. These challenges hinder the full realization of AI's potential in the sector .

The backend architecture of AI chatbots integrates machine learning and NLP to provide human-like responses by utilizing components like intent classification, entity extraction, and response fetching. The architecture processes user inputs to classify intents, extract necessary entities, and utilize databases or APIs to generate appropriate responses, thereby emulating natural human-dialogue flow .

Advancements facilitating AI's integration into commercial applications include technological innovations in data processing speed and accessibility. Major internet companies like Google and Amazon have invested heavily in AI capabilities, thereby embedding AI into services that underpin their business models. These advancements enable businesses to leverage AI for personalized user experiences, efficient data management, and predictive analytics .

Staffing cost reductions through conversational AI solutions allow enterprises to decrease expenditures related to salaries, training, and service outside regular hours. This reduction transforms economic models within enterprises by reallocating resources to new business opportunities and improving operational efficiency. It creates possibilities for competitive repositioning through enhanced focus on customer-centric innovation .

You might also like