Introduction:
Theoretical Background:
JP Morgan is a multinational Bank and financial services holding company. Being a bank JP Morgan works with petabytes of data which is transacted from one application to another on a regular basis. In JP Morgan I am working with a team who helped in managing the data and distributing it among other applications. Within this team we had a service desk for people who wanted to use our application but were facing some problems. They could go to the service desk and can raise their questions over there. But with the increase in use of application, the number of queries in service desk was also increased. And we noticed a pattern where a lot of users were asking the same repeated questions which was ultimately lowering down the productivity of our team members because of their over involvement in the service desk work. To overcome this problem our team came up with an innovative solution to automate the service desk using a interactive AI chatbot which can understand users intent and can answer query according to the trained model which was fed into the Chatbot. A lot of research was done on the different type of queries that were asked by the users and different conversational flows were identified using those queries. To connect the users from chatbot we needed to use messaging service, we looked into different messaging services like slack and mattermost. And we chose mattermost because of its easy integration with our chatbot and lot of other services that is provided by mattermost in form of adapters.
A chatbot is a smart application that simulates intelligent conversations with human beings using artificial intelligence or some defined rules. Usually a user can conversate with the chatbot using a conversational interface like slack, mattermost or facebook messenger. Chatbot can serve many purposes from answering direct questions to helping a user in troubleshooting there applications. The artificial intelligence will help the bots in conversing with the user as if they are conversing with a human being. Conversing with dynamic responses will not just make it a trendy bot but will also make the users feel like they are talking to a human. The chatbot must be able to handle user requests, answer their queries, provide relevant information, do some work on behalf of them. All these works must be integrated within a single application and that will be a smart and intelligent bot.
Lot of AI chatbots are implemented by different companies like Google(API.ai), Microsoft (Microsoft bot framework), facebook (wit.ai). Most of the companies also provided these applications as API ‘s that can be used by different applications as per their needs.
Building a chatbot:
The process of building a Chatbot can be very challenging, but with a keen eye for details, you can build a chatbot that offers great value. Before building a bot we must be very clear on why are we building it and what problem is it going to solve. Chatbots can be built based on two different approaches- rule based approach and machine learning approach. In the first one the bot will follow a structured path and will answer the queries according to the flow only. In second approach the bot will generate dynamic responses which will give the user feeling of human interaction. Most people are enthusiastic about conversing with a bot that can understand natural language which is motivating companies to make bots rich in AI and NLP. AI helps in making the engine for a bot but to talk to a user we need an interface or platform which can help in connecting our bot to users. Before choosing a platform we must check how easy it will be for us to integrate with our bot and what our the features it will be providing for our bot. Some of the examples of platform are: facebook messenger, slack, mattermost, telegram, etc. A lot of companies have build a framework that makes it really easy for anyone to build there bot using that frameworks like Microsoft bot frameworks, Wit.ai, Api.ai, IBM’s Watson.
Design elements for a bot:
Design elements of a chatbot depend on the messaging platform you choose to deploy the bot. There are top design elements that can be considered to build a bot.
Buttons – It is the bot that makes a user take decisions. Buttons prompt action when the user clicks it. Interactive buttons can be added to help the user take decisions faster.
Get Started Button – This is an intuitive feature prompting the user to set the bot into action. A chatbot built for Facebook Messenger cannot do without this feature.
Cards – These are primarily used to serve information like links, text, images and buttons as blocked containers. Blocks fall in columns when the phone is turned on its side. A user can select the card that is relevant to him.
Smart Reply – Smart Reply is a feature included to help a user respond fast to the chatbot’s query without the user attempting to type anything. This feature is useful when the chatbot is context-aware and also has user information.
Quick Reply – A user can make use of this feature as a response button. Tapping quick reply, a user can send his response message to the bot.
Persistent Menu – A user can make use of this feature to steer his way to another portion of the bot that is not readily available.
These are some of the popular elements that can pave the way for an enriching bot experience. It is ideal to pick the best feature to suit the purpose, moment and above all user needs.
Defining a chatbot’s intelligence:
Sensing part in a Chabot is really easy as it just listens to whatever we type in. Sensing part in a Chatbot involves Natural language processing. NLP takes a text in, breaks it into pieces and then tries to find the intent of the text by the user.
Thinking part of a bot contains Artificial intelligence. It consists of several parts i.e first converting the received information into a language that machine can understand, second storing the information in the knowledge base of the user, third updating the state of the bot according to the new information in the knowledge base and finally making a decision based on the information.
Act part involves the interaction of bot with the user. After the bot finally makes a decision it has to send the response back to user by using any messaging platform like mattemost, facebook messenger or slack.
The Framework used for building Chatbot:
1) The Bot Scope
Bot scope is the analysis of the need of chatbot. It explains why people need this Chatbot and what kind of expectation do users have with this chatbot. The analysis part also involves looking at the use case of the bot, if a use case is not that big then developing a Chatbot won’t be the most efficient solution to the problem.
2) The Chatbot Personality:
The personality of a Chatbot is decided after the analysis of bot is done. The users expectation builds the base for bot’s personality. The way of responses in a particular situation, actions taken by the bot, greetings and dynamic responses all these things constitute the personality of a bot.
3) A Prioritized List of Must-Have Features
What information any user would need from our chatbot to find it useful? For example, in the e-commerce chatbot, we researched among different retailers and users to come out with the next list: Updated product database, pictures, comments, specifications and prices from different vendors.
4) The Chatbot Flow:
Motivation:
When you develop an application for a wide range of users, there are lot of microservices that are integrated with that application. With increased number of microservices the complexity of the service is also increased which can be a problem for the users. Now to answer user queries to make them better understand all the uses of our service we formed a service desk where they can ask their queries. But the increase in number of queries resulted in taking up lot of time in our team’s bandwidth which was lowering our productivity. To fight this problem our team searched for an innovative solution and came up with AI chatbot that will be smart and intelligent enough to provide dynamic responses to user so that they will feel like they are interacting with humans.
Before building the chatbot we identified the opportunity and need of the bot and we came up with some models.
Effectiveness Model:
• Support Seamless integration and collaboration
• Wide range of interconnected activities
• Highly reliant on coordination and communication
• Example solutions: Virtual agents for consumers or for enterprise customer service, collaboration or workflow management
Innovation Model:
• Original, innovative work
• Highly reliant on deep expertise, experimentation, exploration and creativity
• Example solutions: Support for biomedical research, fashion design and music writing
• Effectiveness model:
• Routine work with little discretion
• Higly reliant on well defined well understood criteria, rules and procedures.
• Example solution: Automated credit decisions, packaged delivery via drones
Expert model:
• Judgement oriented work
• Highly reliant on expertise and experience
• Example solutions: Expert system for medical diagnosis, lega or financial research.
Most of the companies first decide what type of work activity they want their bot to do. There are two types of criteria based on which this is decided.
• Work Complexity
• Data Complexity
Other than this it is very important to know the needs of the client. What customers want their chatbot to do, which type of wueries they want them to answer. Looking on previous history of questions we need to make a conversational flow which will be aimed to meet certain goals.
Aim of proposed work:
To design a smart and intelligent chatbot which can provide the user with the relevant information and should be able to give dynamic responses to the users which should make them feel like they are interacting with a human. Cahtbot conversations can be of two different types i.e structured and unstructured. In the structured there is a logical flow involved which drives the conversation for example, menus, options or choices. While in the unstructured flow contains freestyle conversation, where user can ask random questions and bot doesn’t have to keep any context of the conversation. Developing scripts for both of these methods involves different type of conversational flow, in the first one bot has to keep the context of every message while in the second method every message will be treated as a single message without any link to preivous message. For our project we will be using both the methods, in the beginning when user starts the conversation the bot will follow the unstructured flow and it will try to find a intent in the user’s question where he can turn the unconversational flow into conversational flow. And finally bot will provide the users with different options so that it will be easier for the bot to save the context of the conversation.
Objectives:
To design a smart and intelligent chatbot which can provide the user with the relevant information and should be able to give dynamic responses to the users which should make them feel like they are interacting with a human.
To design a conversational flow or the set of rules that will be embedded in the bot and will help the bot in keeping the context of the conversation.
To integrate the chatbot with different messaging services like mattermost or slack which will help in collaboration of different teams altogether.
To integrate the chatbot with third party applications like JIRA, bitbucket, etc.