How to build your Dialogflow bot in a week

If it takes you more than a week to build the first version of your Dialogflow bot, then you are probably not following a good process.

Here I describe some ideas on how you can speed up your bot development. This will be especially useful for you if you are not a programmer.

This article focuses on Dialogflow ES bots.

I will be writing the CX version of this in the coming weeks.

Read my beginner’s guide

It goes without saying that if you learn the basics well, you will be able to build your bot much more quickly.

The Dialogflow online documentation provided by Google has two limitations.

First, it is mostly geared towards programmers. You can see this by how quickly the material jumps into writing code.

Second, it is mostly created based around Google Cloud products. Now Google Cloud is an amazingly diverse set of products and it is a very rich ecosystem, but for building quick Dialogflow prototypes, you probably don’t need to use the Google cloud. It makes things a lot more complex than necessary. If and when your bot gets really popular and you need to scale its performance, it will be a good idea to consider migrating the code to Google cloud.

In contrast, most of the Dialogflow material on my website is geared towards non-programmers. In fact, I got this review for my REST API course, which is actually fairly code heavy.

"As a non programmer who works with programmers this course is perfect"

The course is targeting programmers, but as a non programmer who works with programmers this course is perfect... it provides an overview, well explained concepts and frameworks, and not too technical to follow. As with all other courses on BotFlo, I find it easy to follow and understand.

CAROLINE V

Review for Dialogflow REST API v2

My Dialogflow ES Beginner Tutorial is free and will get you up and running very quickly.

Autogenerate FAQ Bots

If you are building an FAQ bot which has a lot of intents as well as a lot of training phrases within those intents, usually it will not have complex and lengthy conversation flows. (You can call these one-and-done bots). And you can speed up the process of building these bots quite a bit by first typing out all the training phrases in a spreadsheet and then using my bulk upload tool to convert it into a Dialogflow agent.

Here is what a user said:

"I cannot believe how much time this upload tool saves me"

I got a huge reduction in time, Botflo allows me to send a CSV to our clients and import all these intents and responses in one go. (I liked) the simplicity, I pick a csv, upload this, then all intents are automatically created. I cannot believe how much time this upload tool saves me.

Sebastian C | Customer Success Manager, Talkative

Use a flowchart

On the other hand, if your bot does have back-and-forth conversation flow, you will not be able to use a bulk upload tool.

However, you will be able to substantially speed up the process by using Mindomo or a similar mind mapping tool.

One of the students in my Flowcharts course mentioned this:

"Using Aravind’s flowcharting approach you’ll be amazed at how quickly a functional prototype can be put together"

Take the time to learn the workflow/concepts he presents in his flowcharting tutorial. (This workflow is far superior to the approach suggested in the official DialogFlow documentation.) Using Aravind’s flowcharting approach you’ll be amazed at how quickly a functional prototype can be put together.

Steven L

Review for Dialogflow Flowcharts

I explain how to build a flowchart first and quickly translate it into a Dialogflow ES bot in my Dialogflow Flowcharts course.

Use Airtable for your prototype

Airtable is a very unique software tool which gives you the best of a spreadsheet and a database. It is well suited for building prototype chatbots, and certainly much better than using Google Sheets as the database for your bot. I explain why here.

It is especially handy if you are not a programmer, since you can do a lot of administrative tasks around data entry and data management without relying on a programmer.

Avoid unmaintainable features

In my view, there are two features in Dialogflow ES which lead to unmaintainable bots – slot filling and using the default context lifespan of 5

Slot filling can sometimes get into a loop, and can be very annoying to users. Many of the jokes you see about chatbots online are usually some version of the slot filling loop.

Using a large context lifespan like 5 can lead to too many candidate intents at every step of the conversation.

And what are candidate intents?

Learn how to debug your bot

If your Dialogflow ES bot maps the wrong intent, it is possible that the wrong intent is a “candidate” which is a “surplus” intent.

In my Better Dialogflow Bots series, I explain the CTFS framework which explains the concepts of candidate intents and surplus intents.

You want to design your bot in such a way that you minimize the candidate intents at each step.

While this alone will not guarantee that you will map the correct intent, understanding the CTFS framework will make it much easier to debug your chatbot.

An interesting aside: neither of these problems occur in Dialogflow CX. So if you are building a fairly complex conversation flow and notice that your bot frequently selects the wrong intent, consider migrating it to Dialogflow CX. 

Use versioning if you care about bot accuracy

While it is possible to build your Dialogflow bot much more quickly if you are not concerned about accuracy at all, usually you start with the expectation that you will also be able to build a fairly accurate bot. So you will probably want some kind of systematic process for measuring and improving your bot’s accuracy.

Tip

Understanding the CTFS framework I mentioned earlier will actually also give you a lot of insight into designing your bot in such a way that it already starts with a high level of accuracy.

But how do you actually measure the accuracy of your bot?

I realized the importance of bot versioning when people asked me how to measure the accuracy of their bots.

Here is the main takeaway – the accuracy only makes sense with respect to a given bot version.

If you care about measuring and improving your bot’s accuracy, you must be systematic about versioning your bot. (Don’t do anything complex. Just download the agent ZIP file, add a suffix indicating version number, and save it somewhere or add it to your source control).