This is a list of MUST KNOW Dialogflow features.
Without learning about them, it is possible that you might be wasting a lot of time as you are building out your Dialogflow bot.
1 Dialogflow Bulk Operations
I have noticed an interesting thing in Dialogflow's user interface.
They try quite hard to remove extrinsic stuff in order to make it more appealing for people who are new to Dialogflow to focus on the task at hand.
There is, of course, a tradeoff when they do this. Sometimes features which should be somewhat obvious are hard to find unless people know where to look. A good example of this is doing bulk operations like batch delete on intents.
Here are three things that you might miss in Dialogflow:
- you might not realize that there is a checkbox to the left of the intent which prepares you for bulk operations
- or, you might not realize, until you click on the checkbox, that a hidden menu appears at the top of the intent list
- maybe you might not realize you can click a checkbox to select all the intents on the page
So that's three things you wouldn't know about without discovering the left checkbox.
The GIF animation below shows an example.
2 Bulk Upload Entities
I remember the day when a coaching call client asked me: "But how am I supposed to fill out so many entities by hand? There are thousands of them?"
I was a little surprised and told him about bulk upload of entities via CSV format.
And then I thought about the UI. Here is what it says (even today):
How is a non-programmer supposed to understand that you can use the "Switch to raw mode" to get an interface for bulk upload?
Anyway, here is how you can do it.
3 Composite Entities
And this one is a somewhat complex feature, and it is possible you might never need it.
For the programmers out there, the idea behind composite entities is somewhat similar to how you can have multiple fields in a class.
If you are not a programmer, then think about composite entities as a way to join entities to create a more complex and richer entity type.
You can use composite entities to do some nifty things. For example, you can implement some sophisticated boolean logic inside your training phrases.
In this post, I am talking about Dialogflow Events. They serve many purposes. At the outset, Dialogflow Events provide a programmatic way to trigger intents without users uttering any words.
For example, you can use them to have Dialogflow initiate the conversation if you use a custom API integration.
You can use them to send data about logged in users to your agent.
But remember that you don't have the concept of push notifications in Dialogflow, so Events don't really provide a mechanism to do that (its a common misconception).
5 Collaborating with others on your agent
At this point, this is probably quite a well known feature, although for a while after the feature was released people still didn't know about it.
The idea is that you can use the Share tab in your Dialogflow console to invite developers and other team members to collaborate on your agent.
6 Prebuilt Smalltalk Agent
Dialogflow provides some prebuilt agents in its console. You can generally use these for understanding the kinds of training phrases which can be used.
The most useful of them is probably the SmallTalk agent.
The smalltalk agent has a whole bunch of prebuilt training phrases to handle common chit-chat and it can answer a lot of common questions that users ask when they know they are talking to a bot.
Using the prebuilt smalltalk agent gives you a head start in making your agent smarter by making it more capable of handling chit-chat.
7 ML Threshold
The ML Threshold is a decimal value ranging from 0 to 1 that you can use to tune the accuracy of your Dialogflow chatbot.
To set this value, go to Settings > ML Settings.
The key is:
- the higher the value of the ML threshold you use, the more closely the user's words have to match your training phrases
- the lower the value of the ML threshold, the more leeway you have in how close the user's words have to be to match one of your training phrases
I have written a somewhat advanced article on how you can choose your ML Threshold.
8 Wildcard Entity
Let us now take a look at the wildcard entity.
We will use the wildcard entity in template mode, and we declare training phrases which include the wildcard.
The wildcard entity allows us to match anything the user types and store it into an entity value.
Some uses of the wildcard entity:
- when you need to handle entities not supported by Dialogflow (e.g. ISBN numbers), you can collect the entire input using the wildcard entity and extract the number using regex in your webhook
- I have written an article explaining how you can use the wildcard entity to handle cuss words (advanced article)
Important: don't use the wildcard entity alone (in other words the training phrase contains only the wildcard entity and no other words) in a training phrase unless the intent has an input context set. Otherwise it will match all inputs (advanced article) and do so in unpredictable ways.
This isn't strictly a "feature" of Dialogflow, but it falls under the list of things you should know about so you can avoid wasting time. 🙂
Dialogflow Templates are prebuilt Dialogflow agents which also come with the associated plumbing code (i.e. webhooks) and help you start with fully functional chatbots which concentrate on specific tasks. Unlike the prebuilt agents you already see inside the console, these also have webhooks which have been programmed (using Cloud Functions for Firebase). This means they already contain the necessary business logic.
Here are some sample chatbots on Dialogflow's website.
All the bots which have the "Add to Dialogflow" button on the right can be imported into Dialogflow automatically by clicking on that button.
Note: when importing you may need to create a new Google Cloud project.
Here is what the Temperature Converter project (first one) looks like inside my Dialogflow simulator after I completed the "Add to Dialogflow":
10 Disable ML
The next feature you should learn about is the Disable ML feature.
To access this feature, inside your Intent view, go to the ellipsis at the top right and you will see it as one of the options in the menu.
The Disable ML feature allows you to tell Dialogflow to only match an intent if the exact phrase inside the training phrase is provided.
This feature can be quite handy, for example, when building quiz bots using Dialogflow.
11 Contextual Fallback Intents
You probably already know how the Default Fallback intent works.
Did you know you can add a different type of fallback intent called the contextual fallback intent?
In the Intents view, click on the ellipsis menu at the top right, and you will see an option to add a new fallback intent.
You can now create additional fallback intents to your agent, but the important thing to remember that you can have only one fallback intent per unique input context.
So, since you already have the Default Fallback intent (context = empty), you cannot create a second fallback intent without adding an input context to it.
This is the error I get when I try to save the new fallback intent without defining an input context.
12 Extending Dialogflow's system entities to add your own values
If you have used Dialogflow's system entities for name recognition, you know that they are not very good yet when it comes to non-English names.
I saw a post related to this recently.
It looks like some people are not aware of an important feature of Dialogflow. You can actually extend a system entity - so you can use all the values it already has, plus the new values you wish it could handle (a very good example is first names).
Here is how you can do it:
Update Oct 2019
Dialogflow has recently added a feature which allows you to extend system entities.
However, the approach suggested here can still help for those system entities which cannot yet be extended, such as @sys.person.
Do you think there is any feature which should be added to this list? Let me know in the comments.
- How to learn Dialogflow in a week
- Reader Question: Do I need a contextual fallback intent for every single context?
- Reader Question: Can I use a single agent for Facebook, WhatsApp and website bot?
- Five ways to integrate a Dialogflow chatbot into your website
- BotFlo vs Dialogflow CSV Importer
- Build Better Dialogflow Bots
- Deploy NodeJS Webhook to Google Cloud
- Dialogflow Firebase Tutorial
- Reader Question: Is there a feedback mechanism to like and dislike a Dialogflow response?
- How to debug your Dialogflow bot