Decoding Dialogflow: Introduction to Building Intelligent BotsDecoding Dialogflow: Introduction to Building Intelligent Bots
In the first of a multi-article series focusing on building intelligent bots using Google Dialogflow and Contact Center AI, we explain how Dialogflow bots work.
May 12, 2019
Conversational AI is how artificial intelligence will impact the communications industry most. Conversational AI refers to the use of messaging applications, speech-enabled assistants, intelligent virtual agents, and chatbots that automate communications interactions and provide individual customer experiences at scale.
Although AI is being blended into unified communications applications primarily in the form of meeting enhancements -- facial recognition, relationship intelligence, and virtual assistants -- its use in these areas pales in significance when compared with the revolution that is occurring because of AI in the customer experience arena. Conversational AI offers a set of capabilities that organizations will pay large sums for because it significantly impacts the business of the organization, whereas most AI in UC solutions comes for free as a product enhancement.
Fully understanding conversational AI’s impact requires a shift in how we think about “customer experience.” Typically, customer experience is thought of as the customer support an organization gives external customers who use, buy, contribute to, or rely on a particular product or service. However, a broader view of customer experience incorporates serving internal customers who may need HR information, medical plan coverage data, internal help desk support, and a host of other kinds of assistance. Wherever there is a customer, conversational AI likely has a role to play.
Why the Focus on Dialogflow
In this series, we’ve chosen to focus on how to develop conversational AI solutions using Google Dialogflow. We made this choice because many contact center providers have announced partnerships with Google Contact Center AI (CCAI) so that their customers can seamlessly use Google’s AI and natural language processing capabilities to add conversational AI (a.k.a., intelligent bots or intelligent virtual agents) to their multichannel contact center interfaces. Dialogflow is at the heart of CCAI. CCAI also offers agent assist and conversation modeling capabilities. Agent assist surfaces relevant contextual information to live agents in real time while conversation topic modeler analyzes audio and chat logs to uncover insights about topics and trends in customer interactions.
Introducing a Multi-Article Series
The interest at Enterprise Connect 2019 in AI and conversational AI was astonishing -- every session associated with these two topics was heavily attended. Given this relevance of conversational AI and the partnerships between Google and the contact center providers, KelCor conceived a series of articles on building bots using Dialogflow, then secured Google’s agreement to provide technical information and accuracy reviews on the content.
The series will comprise 12 articles focused on how to create conversational AI applications with a focus toward implementing them in Dialogflow. When appropriate, content relevant to the contact center partners will appear, particularly when discussing what these partners add, how they differentiate themselves, and the mechanics of interfacing with Dialogflow. Some articles will be completely germane to creating bots using any platform with an eye toward educating No Jitter readers on what to expect as they embark on this journey of intelligent bot creation.
The editorial calendar for the series is shown above; note that we may make minor adjustments to exact dates and topics as the series progresses throughout the year.
Click below to continue to Page 2: How Dialogflow Works
How Dialogflow Works
Dialogflow, known as API.ai prior to its acquisition by Google in September 2016, is Google’s cloud-based natural language understanding (NLU) solution. It uses machine learning techniques to enable computers to “understand” the structure and meaning of human language.
Dialogflow is available as a standalone solution at www.dialogflow.com or as part of CCAI under the name of Virtual Agent. Virtual Agent is essentially Dialogflow with some special APIs developed for contact center-based call flows and interactions.
CCAI and/or Dialogflow include the following capabilities:
Dialogflow as a standalone product is generally available and supported in two product editions: standard and enterprise. The enterprise edition has a higher SLA and comes with more robust tech support than the standard version. As announced at Google Cloud Next last month, CCAI is in beta release. Although the general release date has not been announced, industry watchers expect CCAI to be generally available in the second half of 2019. As the table above shows, several parts of CCAI, including Agent Assist and Conversational Topic Modeler are currently in alpha release. Beta customers of CCAI partners currently have access to the special contact center-specific APIs, which remain subject to modification and tweaking until CCAI becomes generally available.
The figure above diagrams how Dialogflow works.
1. Inputs to Dialogflow can be text-based or human voice in 20 different languages, including some with local vernaculars such as English (U.S. and Great Britain) or Chinese (simplified and traditional). Text input comes from messaging channels, including SMS, Webchat, and email. Google has built Dialogflow integrations with Slack, Facebook Messenger, Google Assistant, Twitter, Microsoft Skype and Skype for Business, Cisco Webex Teams, Twilio, Viber, Line, Telegram, and Kik. SMS, email, and voice assistants from Amazon and Microsoft require additional coding or message massaging for input into Dialogflow.
2. Text-based messages can pass through an optional spell checker. When people type or use SMS, misspelling is common. Correcting misspellings will improve the accuracy of the natural language understanding engine.
3. Voice calls to Dialogflow pass through Google’s speech-to-text processor, converting the user’s voice input to a stream of text.
4. Once voice has been converted to text or the input text has been corrected, the resulting text stream is passed to the natural language understanding engine within Dialogflow. This is really the core element that enables intelligent bot creation.
Dialogflow first examines the text stream and tries to figure out the user’s intent. The intent is what the user wants -- why he or she is interfacing with the bot in the first place. Getting the intent right is critical. (We’ll discuss how to create Dialogflow intents in a subsequent article.)
Examples of intents can be things like “I want to know the weather forecast,” “what’s my bank balance,” and “I want to make a reservation.”
Intents will typically have entities, such as name, date, and location, associated with them. If you want to know the weather, you need to tell the bot the location. If you want to know your bank balance, then the bot will need to get the name on the account. Some
like date, time, location, and currency are available out of the box and are enabled by as part of Google’s technology stack.
Dialogflow supports the notion of contexts to manage conversation state, flow, and branching. Contexts are used to keep track of a conversation’s state, and they influence what intents are matched while directing the conversation based on a user’s previous responses. Contexts help make an interaction feel natural and real.
Slots are parameters associated with the entity. In the bank balance intent example, the entity is the person’s name. A slot might be the specific account number under the person’s name for which the balance is being sought. If you’re reserving an airline ticket, your seat preferences (window or aisle) are slot values.
Creating intelligent bots using Dialogflow requires the developers to consider all the intents the bot is expected to handle and all the different ways users will articulate this intent. Then, for each intent, developers must identify the entities associated with that intent, and any slots related to each entity. If an entity and/or slot of an entity is missing from a query, the bot needs to figure out how to ask the user for it.
5. Once Dialogflow has identified the intent, entities, and slot values, it hands off this information to software code that will fulfill the intent. Fulfilling the intent might include doing a database retrieval to find the information the user is looking for or invoking some kind of API to a backend or cloud-based system. For example, if the user asks for banking information, this code will interface to a banking application. If the intent is for HR policy information, the code triggers a database search to retrieve the requested information.
6. Once it is retrieved, the necessary information is passed back through Dialogflow and returned to the user. If the interaction was text-based, a text response is sent back to the user in the same channel that was invoked to send the message. If it was a voice request, the text is converted to speech and a voice responds to the user with the requested information.
When Dialogflow is integrated as part of CCAI through one of the contact center partners, the flows become a bit more complex but even more powerful.
CCAI adds several notable enhancements:
Escalation of a query to a contact center agent
Real-time sentiment analysis -- positive, negative, neutral -- of the text stream that can be surfaced in the agent’s desktop
Agent Assist, surfacing FAQs, PDFs, Web pages, and other documents to a live agent
Conversation topic modeling, so that the quality of interactions can be enhanced (meaning that more inquiries are handled by the intelligent bot), and this modeling can detect if intents are changing over time so that additional work can be done on keeping the bot current.
Click below to continue to Page 3: Proof Point
Proof Point
In launching this series of articles, we invited Google’s CCAI partners to provide input and proof points. Although Avaya was one of the last contact center providers to announce a partnership with Google, it was the first to respond and provided details on the work it is doing with Google and CCAI.
Google was already part of Avaya’s A.I.Connect initiative, and since CCAI’s beta release, Avaya has reported receiving many inquiries worldwide from customers wanting to use CCAI with its contact center platforms. Many of these inquiries have focused on creating intelligent bots using Dialogflow. Avaya has several large CCAI proof-of-concept (PoC) projects under development. Among these is a large enterprise customer that is focused on providing better customer care; it is currently working on internal testing of intelligent bot solutions created using Avaya Experience Portal and CCAI. This company identified the necessary Dialogflow intents, entities, and slots using its existing call recordings and agent records. It is now experimenting with some of the unique APIs CCAI provides that control queuing and pauses at transition points, which are places in a conversation where critical decisions need to be made. Some of these flow variables impact how the bot responds and is perceived by end users.
When CCAI becomes generally available, Avaya's contact center interface to CCAI will soon follow. Using learnings from this large enterprise customer, along with other companies that are moving forward with Avaya+CCIA -- including a media conglomerate, a national retail chain, and a mobile carrier -- Avaya will likely be one of the first contact center partners to be able to sell Dialogflow/CCAI integration with an existing contact center deployment.
What’s Next
The next article in this series will appear in early June, addressing the questions:
What makes for a good bot?
What kind of business processes and metrics should govern the process of intelligent bot creation?