Conversation Design | DialogFlow

When NOT to use follow up intents in DialogFlow

There are some situations where you shouldn’t use followup intents, because it will not work. The while loop There was a chatbot called the Florist bot that was originally used as an example bot in the Dialogflow documentation (when it was still called API.AI). This is what the flowchart of the Florist bot looked like. In the figure below, the area marked in red is actually a while loop. In theory, the user can just keep indefinitely adding red roses into the bouquet and never say “No, thanks” and exit the loop. This is the “while loop” in software terminology. It is not possible to use followup intents for this conversation flow, since you wouldn’t know how many levels deep…

Conversation Design | DialogFlow

How to debug your Dialogflow bot

I recently got feedback from a reader. He was answering a question about a tool which Dialogflow should have but doesn’t. Debugging of dialog flow , which is very important tool that should be there Now, I don’t think you can “debug” Dialogflow by setting breakpoints the same way you would when writing code, at least not yet. But there are a few things you should learn about when you try to debug your Dialogflow bot. Learn the basics The first step is to learn Dialogflow itself systematically. It is a very good example of investing some additional time up front, and saving yourself hours/days/weeks in the future. In my view, the best way to learn Dialogflow systematically is to go…

Conversation Design | DialogFlow

A MUST read article on Dialogflow training phrase quality

Recently, Google published a very interesting article on how you can assess the quality of the training phrases inside your Dialogflow agent. In my view, if you are at all interested in building a Dialogflow agent, it is a MUST READ. Note: You do need a fairly good programming background, plus some basic understanding of concepts such as “word vectors” to understand that article. So maybe the person who will read it is the programmer on your team. But here is the gist of it: you should maximize cohesion as well as separation in your intents. In this context, what is cohesion and what is separation? Instead of repeating what is already mentioned in that article, I will just highlight…

Conversation Design | DialogFlow

Can you solve the CIA puzzle?

No, not the Central Intelligence Agency. I mean Candidate Intent Ambiguity 🙂 A puzzle A while back, a coaching student of mine was facing an interesting problem. Agent ZIP file Can you figure out what the problem is? Download the agent ZIP file here and try and see if you can figure out the issue. The solution Want to understand what is going on here? Check out the Candidate Intent Ambiguity chapter in my Dialogflow Conversation Design course. Summary The Candidate Intent Ambiguity is one of the main reasons why your user’s phrases get mapped to an intent which is different from what you expected. (In contrast, it doesn’t have anything to do with the problem of the user’s phrase…

Conversation Design | DialogFlow

Why chatbots fail

In this article, I am going to talk about the 3 reasons that I believe chatbots fail. But before we go there, let us distinguish technical failure and commercial failure. Technical vs commercial failure A good example of a technical success but commercial failure is the Segway. It was launched with a LOT of hype, and it actually lived up to the hype! That is, it was a compact, motor powered vehicle which could actually balance and autocorrect itself, and it did travel to the speeds which were announced. But it was not a commercial success for a lot of reasons which have already been discussed many times. So just because your chatbot doesn’t have a positive ROI doesn’t mean…

Conversation Design | DialogFlow

Managing session-vars

When you are collecting a set of inputs from the user, you should use a context with a very large lifespan as a sort of a “session variable”. I refer to this as session-vars in many of my videos. There are three things you should remember when using session variables. 1 You should not add the session-vars to all intents For example, suppose you collect a set of inputs. You will add the session-vars as output context to the first intent which collects a single input value. And once you are done collecting the relevant information, you will send the data across to a webhook to process the collected data. 2 You should add a session-vars to all intents which…

Conversation Design | DialogFlow

Entry vs Non-entry intents

In a previous series, I talked about the C = T + F + S formula for analyzing your Dialogflow chatbot. As a quick reminder: C = Candidate intents T = Target intents F = Fallback intents S = Surplus Intents An intent without an input context is always a candidate If you remember from previous discussions, an intent which doesn’t have an input context set is always a candidate intent at every step in the conversation. Let us call these entry intents. (E) An intent which does have an input context set is only a candidate if that context is active at that point in the conversation. Let us call these non-entry intents. (N) Breaking down surplus intents into…

Conversation Design | DialogFlow

The explicative approach to Dialogflow development

I was trying to explain to a coaching student that my approach to Dialogflow development was somewhat opinionated, and when they asked me to elaborate, I realized it would be good to have some term which will capture my opinions. I am going to be calling it the Explicative Approach to Dialogflow development [1]. Here is what the word means: And here is how Wikipedia defines explication So the word explicative has multiple benefits: it is a single (although somewhat complex) word it captures the essence of the various opinions it is a positive expression – meaning, why wouldn’t you want to “unfold” and “make clear” the meaning of things? plus, it sounds kind of cool 🙂 Here are some…

Conversation Design | DialogFlow

How to create a Chatfuel style decision tree chatbot in Dialogflow

One of the nice things about tools like Chatfuel and ManyChat is their visual interface for creating decision tree chatbots. Dialogflow Messenger I have created a more recent tutorial (July 2020) which explains how you can build a decision tree chatbot using Dialogflow Messenger. You can interact with the live bot here. What are decision tree chatbots? These go by many names – conditional logic chatbots, click-bots, scripted bots (which I like the best). The important thing is that the entire conversation is pre-scripted, there isn’t any Natural Language Understanding or AI of any sort, and people chat with your bot by simply choosing (clicking on) one of the options presented as buttons. You can create similar chatbots using Dialogflow,…

Conversation Design | DialogFlow

Handling unexpected user input in Dialogflow

As you might know, I don’t recommend using slot filling. This leads us to a question: one of the benefits of slot filling is that you can re-prompt if user provides the input in an unexpected format. (However, that is a small(ish) benefit for the much bigger problem of being unable to predict your chatbot’s behavior when using slot filling) How can we replicate that behavior? So we would like to do something which will “mimic” slot filling while not running into the slot filling loop issue. Getting a phone number as input from the user Let us say we want to get a phone number from the user. 1 We will prompt for the phone number 2 If user…

Conversation Design | DialogFlow | Uncategorized

Simplex: Creating a simple Google Duplex clone using Dialogflow

Looking for a Google Duplex SDK or maybe a Google Duplex API? I don’t know of any, but in this article, I explain how the haircut scheduling call demoed for Google Duplex can be built using Dialogflow. We will be building Simplex, which is a very simple Google Duplex clone and will present some ideas on how a Google Duplex like agent could be created. What is Google Duplex? During I/O 2018, Google showed a glimpse of a technology called Google Duplex. If you haven’t seen the video, here it is: Can we use Dialogflow to do something similar? Yes, but we first need to look at a few disclaimers. Disclaimers First, since Google Duplex is supposed to help out…

Conversation Design | DialogFlow

Create a yes/no branching bot using Dialogflow

This is a chapter summary from my Intro to Dialogflow course. In this chapter, I explain how to build a yes/no branching bot. The webhook diagnostics bot is an example of a yes/no branching bot. Here the chatbot guides the user through a series of yes or no questions and then provides an answer at the final step. In the example covered, I walk you through creating a chatbot which asks some yes/no questions to determine if the bot user has the prerequisites set up to install a custom chatbot on their PHP based site. In the first lesson, I explain what we will be building: Then we define the chatbot by using follow up intents first: In the next…