DialogFlow

How to make sure a Dialogflow intent is ignored

I recently got this question on my YouTube channel: Without knowing the full details of the question, I suppose this person has set a lifespan which is more than 1 (the default option in Dialogflow is 5). Ideally, you always set a context lifespan of 1 for all your contexts to avoid these kinds of issues. Also, if you would like an intent to be ignored, you need to set an input context for that intent. In theory, an intent is always a selection candidate if you have not added an input context. So an important step in creating intents which can be “ignored” is to add an input context to that intent.

DialogFlow

Why you should regression test your Dialogflow (API.AI) chatbot

If you are building a commercial grade Dialogflow chatbot, you should definitely consider adding some regression testing to your chatbot. What is regression testing? The idea behind regression testing is that you will run a series of tests and verify if the performance of your chatbot is consistent over time. How to do regression testing in Dialogflow? You will make use of the /query endpoint in the REST API exposed by Dialogflow. By writing scripts which will send specific, pre-determined user phrases to the /query endpoint, you can verify if the phrases are getting mapped to the same intent (by using the intentID). Why do regression testing This brings us to the next question: why should you do regression testing…

DialogFlow | REST API

Dialogflow REST API v2 announced

Last week, Dialogflow announced the availability of v2 of their API. It is still in beta, and there are some fairly significant changes coming up. [Also, a quick comment that I am very glad they changed their name from API.AI before this announcement. Otherwise people will be referring to API.AI API v2 vs API.AI API v1 etc. I am guessing even Google would have been so confused by this that it wouldn’t have even been possible to search for stuff. 🙂 ] Here are the changes that I could notice straight away Access via RPC You can also use RPC and not only REST for accessing the v2 API. The documentation for RPC based access can be found here. You…

DialogFlow

Dialogflow Enterprise edition has been announced

A few people have asked me if Dialogflow (then API.AI) had a paid tier with better support. Last week, they announced that an Enterprise version was now available. It still seems to be in BETA. Significant changes: A promise for much better support A paid tier with higher usage quota As I learn more, I will keep adding updates to this post.

DialogFlow

An idea for handling fallbacks in mixed mode Dialogflow (API.AI) chatbots

You might be familiar with the concept of the fallback intent in Dialogflow. It can be tricky to handle. All the more so when you are getting user input. However, you can try the following idea if you are creating a mixed mode chatbot. Asking user for input So in the regular intent, you ask the user for input. At this point, they can just type or speak their choice. E.g. User:”I want to book a flight” Bot: “Which class of ticket would you like?” User:”Economy” Bot:”OK, where from?” …. Here is what a simple fallback might look like: User:”I want to book a flight” Bot: “Which class of ticket would you like?” User:”The best one” Bot:”I am sorry, I…

DialogFlow

Talk, type and tap: The three modes of conversation in Dialogflow bots

As I have been working with Dialogflow, I can see that there are three primary mechanisms (modes) using which the user can converse with the chatbot Type The most basic mode, and the one which you can see in all the chatbots I have built with the 1-click web demo integration. Here the user just types into a box and gets a result back. Talk I don’t have a demo handy but the web demo integration also has a way to input your message by talking (it works in Google Chrome). Also, you can only interact with your Google Home using voice. Tap When your chatbot allows you to click on a button (Tap), you are using the third mode…

DialogFlow

Chatbase alternative

If you are working with Dialogflow, you have probably heard of Chatbase. When it was first introduced, people were thinking “Oh wow! It is like Google Analytics for chatbot conversations”. Now it is starting to look like the Zune. Now, the title is clearly a little click-baity. But please read the article completely because there are a few points you must consider if you are a Dialogflow programmer trying to build out solutions for your end user, whether that is a client, or your place of employment. When I wrote this article, I intended it to be a sort of tongue-in-cheek article which highlights the benefits of using a proxy “middleman” app that I describe here. If you want a…

DialogFlow

Dialogflow tutorial: How to move to the next intent?

Sometimes I see questions like these in the Dialogflow forum. So, I got one intent working. How can I now “move” the conversation to the next intent? Answer In Intent1, declare an output context called contextA. In the next intent you want to fire, use contextA as the input context. You have now chained Intent1 and Intent2 using contextA. Is that all? There is quite a bit more. But that’s the basic idea for every intent you are trying to chain into the conversation. A practical example I need to get three values from the user – their given name, their last name and their zip code. I will be using the naming convention I mentioned in my previous post….

DialogFlow

Dialogflow Tip: Naming conventions for an intent which gets user input

Do you capture user input in your chatbot? For example, do you ask them to provide their name, or email, or other information? I have recently started using the following convention in the bots I am building (as well as advising on). The intent Suppose you have an intent which should get user’s email address. You can, of course, name it “EmailAddress”, but that isn’t very obvious. Obvious to whom, you might ask. Where you use it The key, of course, is where you use the intent name. One use for the intent name, for example, is in the test console. Looking at the intent name, you can tell what intent was just mapped. When you receive user input, you…

DialogFlow

Exposing the Dialogflow (API.AI) Client Access Token on your client side script

I have recently seen quite a few solutions trying to embed a Dialogflow based chatbot into a website using pure client side JavaScript. Naturally, this can only be done by exposing the Client Access Token to every visitor of your website. Is this a good idea? Dialogflow rate throttling So we know that there are definitely some limits in terms of how many REST API calls you can make per minute and per day. It does look like Dialogflow doesn’t make those figures public, but it has been mentioned in the forum before. When you expose the Client Access Token to the public, you are creating the possibility that some malicious attacker can just read your client access token and…

DialogFlow

Dialogflow (API.AI) Skype integration

As you might know, Skype is one of the 1-click integrations available for Dialogflow. But the real work begins after you add the 1-click integration from the console. This article is focused on two main topics: How to render rich controls (such as a card) on the Skype bot How to get user’s responses to those rich controls (such as their button clicks) back into your Dialogflow context Prerequisite: I expect that you have already created a Skype bot and you have gotten the basic conversation flow working inside the Skype bot. Rendering a rich control on the Skype bot This is based on the following thread: https://discuss.api.ai/t/custom-payload-generated-programatically/10184 There is an important thing to consider: do you need just a…

DialogFlow

The four types of DialogFlow users

One of my clients had recently mentioned why she chose DialogFlow. “It just seemed to be at the right level of abstraction” That was a good way to put it, but actually I think there are four types of abstraction within DialogFlow with four corresponding types of users. For anyone who wants to work in Dialogflow, it is very good to know which type you are as you choose team members to work with. Type 1 The non-technical user This might be, for example, a business owner or a marketing person who just wants things to work. They are not interested in getting into the weeds of how Dialogflow works. For example, I got this very nice review on Amazon…