Creating a Chatbot That Gets Smarter Over Time with a Business Case Study

Creating a Chatbot That Gets Smarter Over Time with a Business Case Study


Introduction : Chatbots have completely changed the way customer service requests are handled nowadays. It’s almost impossible to run a successful business and keep your customers satisfied without using these powerful tools.

Chatbots are intelligent agents and thus “agency” is their most important feature. This refers to an agent’s ability to determine its goal and to proceed towards it autonomously – on its own, without any specific instructions. That is achieved through the so-called “sense-think-act” cycles.

The first step is basically sensing the environment to acquire information that is needed for executing a specific task, where a chatbot “listens” to the sentences that a user types in. The next step is thinking, which is the basis of Artificial Intelligence.

The thinking process includes converting the acquired information into something a bot can comprehend with the help of natural language processing technology, storing them into the knowledge base and updating the agent’s state based on both previous and newly acquired knowledge, and then finally making an appropriate decision based on it. After achieving all of this, an agent will be able to convert its decision into an action.

This kind of a learning process enables chatbots to find patterns in the information received and respond to them accordingly.

Another essential part of making a chatbot intelligent is its knowledge base – how the gained information is stored. This is an extremely important component, since it determines the quality of the learning process, as well as the level of the bot’s intelligence.

Chatbot Architectural :

A. Dialogic Agent: must understand the user, i.e. provide the function of comprehension. Bots are provided with a textual (or oral, see Section 2.1) input, which are analyzed with natural language processing tools, and used to generate appropriate responses.

B. Rational Agent: must have access to an external base of knowledge and common sense (e.g. via corpora of data) such that it can provide the function of competence, answering user questions. Should store context-specific information (e.g. user’s name, etc.).

C. Embodied Agent: should “provide the function of presence…once regarded as very optional…this function proves to be crucial in the case of ordinary users.” Even the earliest bots were given names (ELIZA, ALICE, CHARLIE, etc.) in order to satisfy this condition. Today, developers are focused on the use of language tricks to create personas for chatbots in order to build trust with users and give the impression of an embodied agent.

Chatbots are usually categorized based on the conversation capability and response mechanism as described in below.:

Providing the answer is also divided in to two categories: Retrieving the answers (e.g. from database) and creating answers based on the provided text. In both options artificial intelligence can be utilized.

Retrieving answers for open domain is not possible, even for the giants of IT industry as there is no data warehouse that contains correct answer for any questions.

Rulebased chatbots have already achieved commercial success stories such as (i.e. KLM’s chatbot in the Facebook messenger). Rule based chatbots do not create grammatical mistakes, but the disadvange is that they cannot answer new questions that are not identified in the data warehouse.

Explained in this Architecture : 


Chatbots categorized as smart machines analyze the provided data in detail utilizing deep learning methods. In nutshel deep learning means processing the provided data in sequences utilizing algorithms such as logistic or linear regression and teaching the bot with the algorithms after which the bot can intelligently provide an answer to the question. However, this kind of bots have not yet provided commercial success stories in the same manner as rule based bots, due to irrational sentences. If the topic interest you, it is worthwhile reading this research about the topic https://arxiv.org/abs/1409.3215

General AI is a term utilized in the artificial intelligence field to describe the ultimate goal. In short this means a bot that does not have a specific domain for which to provide answer. Instead you could discuss anything with the bot. For example you could first ask about the windows 10 security vulnerabilities and after that ask who the bot thinks will be the next president of France

1 – Messaging Client Platform (Alexa, Google Assistant, Facebook, Twitter etc.)

The first layer on the diagram represents any popular messaging framework such as Facebook, Twitter, Slack etc. The same can also be used for Amazon Alexa or Google Assistant.

Layer 2 – The NLP Platform (DialogFlow, IBM Watson, Microsoft LUIS etc.)

This is where the real work happens (The brains of the system). This layer is usually responsible for understanding the user message and process accordingly by either giving a correct reply internally or by hooking up to a external Webhook/Service.

Layer 3 – The Webhook

Okay, Webhooks are nothing but simple REST api’s. In this case the NLP system above will use the Webhook to call this API and get answer suiting the business requirements. Since it is a normal web project, we can use any cloud services (aws, gcp, azure etc.) to host it.

Business Use Case:

They are many way in business we can use chatbot for airlines ticket to logistic and banking system :

Chatbot  for Airlines Tickets with Microsoft Luis ;

Designed to identify valuable information in conversations, LUIS interprets user goals (intents) and distills valuable information from sentences (entities), for a high quality, nuanced language model. LUIS integrates seamlessly with the Azure Bot Service, making it easy to create a sophisticated bot.

Intents scripts : 

var restify = require('restify');var builder = require('botbuilder');// Lets setup the Restify Servervar server = restify.createServer();server.listen(process.env.port || process.env.PORT || 3978,              function () {    console.log('%s listening to %s', server.name, server.url);});// Create chat connector for communicating with the Bot FrameworkServicevar connector = new builder.ChatConnector({    appId: process.env.MICROSOFT_APP_ID,    appPassword: process.env.MICROSOFT_APP_PASSWORD});// Listen for messages from usersserver.post('/foodiebot', connector.listen());// Echo their message back.. just parrotting!var bot = new builder.UniversalBot(connector, function (session) {    session.send("You said: %s", session.message.text);});



要查看或添加评论,请登录

Steven Murhula的更多文章

社区洞察