- 1 1. INTRODUCTION
- 2 2. FUNCTIONALITIES
- 3 3. GENERAL DESIGN CONSIDERATIONS
- 4 4. COMMERCIAL SYSTEMS
- 5 5. ADVANCED SYSTEMS
- 6 6. OUR BOT
- 7 7. CONCLUSIONS
The development of artificial intelligence models, more specifically of natural language recognition and processing (NLU and NLP), has meant that for some time now, it has begun to deal with the use of the chatbots or conversational bots.
What exactly are they and what are chatbots being used for?
A bot is an application capable of performing tasks autonomously, interacting with humans through a communication channel. You can carry out a search, a reservation, or launch an automatic process at the request of a user and usually communicate with him in natural language.
Chatbots are automated “talkers” designed to use a chat interface between the bot and the human user.
For a chatbot to be a useful tool, it is essential that both the recognition of the user’s will and the configured response are correct.
Microsoft, Slack and IBM mainly, are aiming numerous efforts to develop this technology.
Many companies already integrate automated chats for different purposes. For example, in Slack, the messaging service for internal communication in companies, chatbots help to manage work-related tasks, such as expenses or pending tasks.
For its part, the Kik Mssenger platform, which has 275 million users, has just launched a bot store with various functionalities.
Virtual assistants framed within this technology are already a classic in companies such as Ikea, or Renfe at the state level.
What perspectives do they open?
We have heard lately about paradigm shifts in mobile applications, directly related to user interfaces. What need is there to keep in memory heavy banking, insurance, health … applications that are usually complex and rarely used? It would be reasonable in this case to replace this application model with a much lighter software, which allows access to specific functionalities and which also does not require updates to complete new demands should they appear.
The bots open a new path in application development here. Complex and heavy interfaces can be replaced by “virtual managers” insofar as they are capable of acting as a channel for searching, processing and accessing information.
Virtual helpers in the case of web applications also allow guided or direct access to content without having to search for it through various menus. If these applications are able to successfully process more complex actions, such as orders, searches or support, the ground is ripe for the development of chatbots instead of (or as a complement to) graphical interfaces.
What risks do they suffer?
Bots also embody a series of fairly obvious risks related to user experience, and that is that deep down, nobody likes to talk to a machine unless it reacts in a reasonably intelligent way. This is where it seems that AI related to natural language processing has advanced enough to start offering commercial proposals, although a detailed assessment of the risks caused by interaction with these tools is still required.
Who is involved in the technology?
The multinational Microsoft and the Slack platform are two of the companies that are betting the most on the creation of these models. Google also stands out, one of the companies that has the most services to exercise artificial intelligence. IBM is betting decisively on cognitive applications through its Watson platform.
At decide we have worked primarily with Watson both on prototypes and commercial applications, as we have the simplest model of conversation design added to the NLU engine included in the platform.
Chatbots have a wide range of possibilities in all sectors. A number of generic usage patterns have been identified, including:
Chatbots have been tested on various trading platforms with success in the field of aid operations. In the case of corporate applications, they can considerably reduce the learning time of complex systems. These bots can be completed with context information about the transaction that is being carried out on the parent page to specify the specific information that the user needs. Many web applications have help and query systems deployed.
Using a flat model of question-answer conversation in which the conversations have little depth, the understanding of natural language is taken advantage of, minimizing the risk of context problems or subject changes by the user. This case would apply to a page search wizard, or in a more extreme case the demonstration that IBM performed with Watson in the American Jeopardy contest An application that includes a general knowledge repository can use an NLU system to refine searches or even learn of users’ needs
Bots capable of performing background actions based on user demands allow complex transactions to be executed on demand. We could put here the example of certain assistants that allow you to buy products from the chat itself. This model allows practically to do without certain graphical interfaces.
3. GENERAL DESIGN CONSIDERATIONS
The base technology of chatbots usually consists of an application that acts as an orchestrator for conversations, and an NLP system used as a service (IBM Watson, Microsoft Luis, API.AI …)
The orchestrator is in charge of managing the communication channel, as well as intervening in the conversation and processing the relevant actions at all times, depending on the functionalities implemented. The most frequent channels are Slack, FacebookMesenger, Skype or direct web clients.
User messages are analyzed in the part that enforces the NLP.
These models mainly separate two fundamental concepts in language analysis; the “intention”, which is the phrase related to the action or more generically with the general concept of a phrase and entities, which are the objects or specificities that are automatically detected.
The NLPs return a response based on the analysis of the previous elements that can be organized by the service itself (Case of Watson Conversation), or they directly return the analyzed elements so that our orchestrator system is in charge of responding based on this previous analysis. that has been done. (This case would be the one that would apply if we decide on technologies that do not have dialogue managers such as Microsoft Luis).
The cycle of a conversation would therefore follow the following path:
1. The user sends a message to the channel.
2. The orchestrator application receives the message, and can handle it, invoke an external service with it (for example, a Sentiment api to detect before proceeding if the user is extremely pissed off) or directly deliver it to the NLP to which it is connected.
3. The NLP detects the user message and interprets it. It indicates what the intention of the message is, what entities it contains and returns the analysis or response.
4. The orchestrator application can intercept the return message for reprocessing, or generate it directly with the NLP information.
4. COMMERCIAL SYSTEMS
There is a wide range of public APIs on the market that allow us to provide our chatbot with technical and analytical characteristics and can turn a helper almost as unskilled as the Word clip into a useful assistant. Here are two generic API models that we have used in our projects and prototypes on a regular basis.
How to decide what to teach the bot based on the user experience (Text Clustering)
Suppose we have a large, relatively complex corporate application, used by hundreds of managers. The knowledge regarding the use and management of the application is available to users through a chatbot. Like humans, this system does not have absolutely all the answers. How could we find your weak points to complete them? Using the orchestrator application, we have designed a system that allows users to add their questions (to which they have not found an answer) and that the bot stores them in a database. Serving ourselves after analytical intelligence, we can dump all the questions about a text clustering process, which will group the doubts by topics, keywords, relevance, etc.
In this way and quickly, we can store all the doubts that arise from the use of the bot, and later discover what are the weak points of its knowledge to be able to complete it.
How to make different decisions based on the user’s mood (Sentiment Analysis)
Within corporate applications, analyzing the tone of the message may be a minor matter, but with a view to establishing a channel of communication with customers, this tool acquires a crucial importance. Talking to an AI can be nerve-racking, and this is on the minds of anyone who has tried.
If we place a previous filter of sentiment analysis of user messages, we will be able to realize the need of a specific user in a specific situation to speak directly with a manager, thus avoiding the problems derived from a negative user experience.
5. ADVANCED SYSTEMS
Working on the intelligence of cognitive systems in conversations we have asked ourselves a question: “How can we add more advanced features of artificial intelligence and new learning models?”
Private NLU models have some restrictions in our opinion. In the first place, they are “black box” models in the sense that they do not allow to operate on the comprehension strategies of phrases or entities. Second, the ability to understand an intention from a sentence depends on the level of completeness.
On the first restriction, it is not possible to advance to the extent that it is required to use these systems. However, for the problem that arises from the need for the technical manager of the application to be able to correct the less satisfactory answers, we have found an interesting design.
Supervised-corrective learning on the knowledge of the bot. If we have a chatbot that manages user service, or access to a knowledge repository, it is usual for it to be managed by an expert in the field, maintaining effective communication with users, or directly making use of the chat bot, these managers they can detect that incorrect answers appear depending on the formulation of the question. When this is the case, we will enable a “supervisor” mode in which the bot returns the standard answers, but asks if the answer is correct, allowing in turn to indicate another answer as more precise and maintaining this learning in the future.
Direct learning from the interface. In the same way, a bot can be configured in a “master” mode to directly learn new knowledge. The manager asks to add a question, can formulate it in one or more ways to improve understanding, and adds an answer that will form part of the chatbot’s learning from that moment. One more point of intelligence can be added to this mechanism so that the user can add a single question instead of several formulations, as we will see in the next point.
6. OUR BOT
In decide we have implemented all the functionalities and options that we have discussed in this article. Some of them are included in the helper on this page.
This chatbot offers information about the company such as, what we do, our values and objectives, what technologies we use, etc. It also offers a series of general data on projects and displays information on solutions we offer in each of the different sectors in which we have worked when it detects that we are asking about any of them. It also allows you to request information to work with us, send questions to offer a personal response from HR or request contact information. It also has the ability to clarify specific concepts by asking you to search for it (“search optimization” for example).
In each message he receives, he establishes a sentiment analysis on the text, and answers in a different way if he finds a very negative state in the user’s sentence (regardless of whether he had another response ready)
It saves all the questions that it does not understand to be able to make a subsequent analysis of the interactions, and in turn allows direct questions to be sent, which are registered with the user’s email to be able to answer personally.
On the other hand, in line with the previous point, this chatbot has the ability to directly learn new knowledge from the interface itself. We have added a “master” mode in which a user can add a new question and have it learned almost immediately by the bot *. (The load is immediate, but it is necessary to have the training time of the NLU, in this case Watson invests a little less than a minute in training).
Distinguishing a specific question that is only spoken once is a complicated job, so we have added another layer of neural processing of the question to be entered into the system, thus allowing parsing to add more elements to the input of Watson, who will then be the ones to classify the intention.
Suppose the user wants to add the question “How to distinguish a bike from a car”
The layer that we have introduced as a service, would send a new intention to Watson that will have the following inputs:
How to distinguish a bike from a car
In this way, the user (in master mode) will also enter an answer, which will be the one delivered by the bot to the question, “How to distinguish a bike from a car” although he will also know how to answer in the same way if he asks “I want to know what way I can distinguish a bicycle from a car ”
* To enter the master mode and teach knowledge to the bot, type “master”, to exit “stop-master”. For security reasons, each user can only see the answers that he himself teaches him during a period of two days.
The field of natural processing and technologies related to language understanding is starting to take off. Numerous companies are involved with a multitude of resources in its development, and the field of study is wide and complex. It is likely that in the near future we will find great technical advances, and this in turn allows new functionalities and implementation possibilities.
For our part, we have already embarked on the task of discovering the ins and outs of this technology, and it has been as beneficial as it is entertaining.