If you are building a Dialogflow prototype, there is a tool which can provide a tremendous boost to the speed at which you can create and manage your bot.
The tool is called Airtable - which is like a combination of a spreadsheet and a database, and is easy to use for technical non-programmers. In this article, I am going to talk about how Airtable can speed up your Dialogflow prototype development workflow.
Video table of contents with timestamps
1:02 | Airtable as database
2:30 | An example where I use Airtable as the database
3:08 | Airtable as CMS
4:00 | Example of using Airtable as a CMS
5:25 | Airtable is a better CMS for rich responses
6:30 | Airtable for conversation logs
7:20 | Conversation transcripts
8:12 | Filter by intent which fired
8:49 | Use confidence score to inspect anomalous mapping
9:35 | Measure accuracy of your Dialogflow bot
10:28 | Putting data into Airtable is more flexible than e.g. Chatbase
11:07 | Airtable is also better than building custom admin for conversation analytics
11:45 | You don't have to write conversation log directly to Airtable
13:10 | Migrating out of Airtable (lock in isn't a big issue)
1 Use Airtable as the database
Most non-programmers hit a stumbling block when they try to use Dialogflow.
To do anything useful, you need to write some code.
And usually, but not always, that code need to access some data.
And that data usually lives in a database.
This means you need to have a database (usually) to create a reasonably useful bot prototype. The problem is, databases are a lot of work to get up and running, even for programmers.
Here is where Airtable helps. Since it is designed to act like a database for the most part, except for complex scenarios (which you shouldn't have in a prototype) you can actually use Airtable like a database. And best of all, even though Airtable has the functionality of a database, it has the ease of data entry of a spreadsheet.
For example, I use Airtable as the database for my step-by-step Dialogflow tutorial which uses a PlanetsBot to answer questions about planets.
Why not Excel or Google Sheets?
Some folks might be wondering why we cannot use Excel and Google Sheets which also expose APIs to do the same thing. The main reason is speed of setting everything up. To get your Excel and Google Sheets set up as a database is just a lot more work.
If you want me to write about this in more detail, please leave a comment below this article.
2 Use Airtable as a Content Management System
Recently, a client asked me if there is something like a CMS for Dialogflow.
First of all, I am glad that people have started asking this question, because it is something which is likely to be an important problem for future Dialogflow bot creators, especially those who are creating FAQ style bots.
As it turns out, I am already using Airtable as a Dialogflow CMS.
For example, in my free YouTube course about creating a lesson finder bot for my course website (which is a form of FAQ bot), I explain how Airtable is used to inspect the intermediate CSV format.
And not only that, my Dialogflow CSV Importer tool which lets you convert a CSV file into a Dialogflow agent by clicking a button, also has sample templates which I have created using Airtable.
Notice the templates I have marked in red in the image below. People can simply click on Download CSV button and get the actual CSV file for the tool right from inside the Airtable base. This is an excellent example of using Airtable as a content management system for your Dialogflow bot.
Needless to say, it is far quicker for you to take this CSV file and turn it into an agent ZIP file (and then import into Dialogflow). So using Airtable as a CMS is a very good way to speed up your Dialogflow prototype development.
In fact, Airtable is a better choice than regular spreadsheet software for this use case since you can link records in Airtable very easily (thus creating more complex rich responses), and you can also enforce data types for individual columns. I will write a more detailed post about this on a future date.
3 Use Airtable to analyze conversation logs
Another way to speed up your bot development workflow is to use it for analyzing conversation logs.
First of all, this means you actually need to log your Dialogflow conversations to a database. For example this is how I logged conversations from my Drift chatbot (which I have now removed from my website for various reasons) directly into an Airtable base.
Here is the raw data in Airtable.
I can group conversations by session ID with a single click, effectively creating a "conversation transcript" by simply reading the UserMessage along with the bot's response (which you can see inside the ResponseText JSON) in sequence. Within the group, the records are also sorted in the order of increasing row ID which in turn corresponds to order of increasing date-time, so it reads like an actual conversation transcript.
I can see which user queries triggered the Default Fallback Intent by filtering on the IntentName field so I can see if I should create some new intents to handle them.
Here are the results of applying the filter:
I can also see the confidence score for each query to see if anything should be adjusted.
In this case, all the scores are a perfect 1 because of the nature of the bot (button-based quiz bot). A more FAQ-style bot would have a range of confidence scores associated with the queries.
I can also see all the queries which got mapped to a specific intent so I can measure the accuracy of my Dialogflow bot. In fact, you can go a step further, and actually also label the query as Correct or Incorrect. And then Airtable will make it easy to evaluate your overall accuracy.
You have to analyze your conversation logs
Here's the important thing: you will have to analyze your conversation logs so that you can improve your bot. You can either use a third party tool like Dashbot, and (generally speaking) be severely limited in how you can slice and dice the data. Or you can spend the time to build out your own admin dashboard so you can do all this analysis. But this option costs quite a bit of time and money. Or you can find a way to move your conversation logs into Airtable in the format I specified above. This way, you have all this functionality available for you just out of the box and save yourself a ton of time.
There are quite a few related questions that I haven't really covered in this article. I will answer them one by one in the future:
- How to log conversations in the first place?
- Can I log conversations into Airtable directly?
- If I used an actual database instead of Airtable, how to take my conversation logs and dump it into Airtable?
- Do I need to develop my own custom integration to be able to do all this?
- What are the columns (fields) I should use in the Airtable table?
- When is Airtable not a good choice?
Have any questions?
Let me know in the comments if you have any questions about using Airtable for your Dialogflow bot.
- Dialogflow vs RASA NLU
- Dialogflow vs Lex vs LUIS vs Watson vs Chatfuel
- Machine Learning vs non-Machine Learning algorithm
- BotFlo update
- Learn Dialogflow basics for free (till May 31)
- 10+ practical projects to learn spaCy in depth
- An Epidemiology Glossary for Programmers
- All my mini-courses are free this week
- Reader Question: What if a specific system entity isn’t available in all languages in a multi-lingual bot?
- How much can Machine Learning ACTUALLY help with answering free-form questions?