Bot Talks: Intent-Based vs. Flow-Base Conversations

The evolution of bot technologies has helped to drive a revolution in natural language processing (NLP) and natural language understanding(NLU) technologies . Just a few years ago, NLP-NLU technologies were confided to the academic circles. Today, NLP-NLU stacks have become one of the pillars of artificial intelligence(AI) platforms.

While there are many NLP-NLU innovations and that have been related in recent years, the market attention continues focused on the platforms released by incumbents such as Microsoft, Face book, IBM, Google or Amazon/ From that perspective, platforms such as Face Book’s Wit. Ai, Watson’s Conversation Service, Microsoft’s Language Understanding and Intelligence Service or Google NLP API have drive a lot of attention from developers and customers. Part of that attention is based on the fact that many of those stacks are integrated with bot Platforms such as Face Book Messenger, Microsoft Bot Framework or Google’s Allo.

Despite the excitement about bots and NLP-NLU stacks, it is important to recognize that the majority of those technologies are in very early stages when comes to replicate the sophistication of human conversations. With a couple of exceptions, most NLP-NLU technologies are focused on determining the intent and object of isolated sentences in a conversation. However, analyzing natural language sentences in the context of broader conversations is still a work-in-progress are for most NLP-NLU technologies. Using AI terminology, the current generation of NLP-NLU stacks are enabling intent-based analysis capabilities but they should gravitate towards powering flow-based analysis models.

Intent-Based Analysis

Intent-based analysis’ goal is to determine the entities and Intent of natural language sentences. For instance, if we analyze the following sentence: “I would like to book a Dr’s appointment”, An intent-based NLP algorithm will determine the intent of the sentence as “booking an appointment” while the main The entity remains “the Doctor”.

Intent-based analysis is the foundation of most NLP-NLU technologies but is hardly sufficient to simulate intelligent conversations. Using the previous example, the response of an intelligent bot could be different depending of the state of the conversation, location and many other aspects. The bot could provide a more detailed answer if it knows the information of the user’s regular physical or the fact that the user is currently traveling in The UK. Those contextual elements could change the dynamics of conversations driven by NLP-NLU stacks.

State and Context

Intent-based analysis techniques should be performed factoring in the specific context and state of a conversation. State can be identified as data points from previous statements in the conversation. For instance, if I mention that I have been experiencing blurry vision in recent days, After I requested a Dr’s appointment the bot will refer me to an ophthalmologist. Context refers to environmental conditions surrounding a dialog. For example, if the NLP stack understanding that I am traveling in London, is going to attempt to find me an ophthalmologist in that city.

Flow-Based Conversations: A State Machine NLP

Flow-based analysis is the next logical evolution of NLP techniques. Flow-based models while extend intent-based algorithms by combining multiple utterances in a state machine model that imitates a conversation flow factoring in the appropriate state and context. Each state of a flow-based NLP model will leverage intent-based analysis techniques and will determine the next stage based on the outputs. Using flow-based analysis, we can model a conversation using a state machine model which can enrich the nature of conversations between users and bots.

Flow-based analysis is far from being a theoretical excursive. Platforms such as Wit.ai are already doing some very impressive work in this area.