Dialogflow Conversation Analytics Tips
First published: Dec 2020 | Last Updated: June 2022
I recently added a chatbot to this website as a case study for my Improving Dialogflow ES Accuracy course.
It was a reasonably complex bot with multiple conversation turns, and it provided tips on speeding up the development of the user’s Dialogflow bot based on their responses.
Here are my takeaways from deploying this bot.
Minimize candidate intents
I recommend people use a context lifespan of 1 for their intents. This reduces the number of candidate intents at each step, and in turn makes it much easier to analyze your conversation analytics (because there are fewer unexpected intents in your Chatbase funnels).
Follow good conversation design principles
Generally speaking, you should try to make all training phrases within an intent as similar as possible (minimize intra-intent variation) while also trying to make training phrases from two different intents as unique as possible (maximize inter-intent variation). This is another way to help Dialogflow do better intent mapping.
As I mentioned in a previous article, you really cannot do conversational analytics without measuring bot accuracy first (well, you can, but it will be meaningless). And you cannot measure bot accuracy without maintaining bot versions.
Design a Flowchart
I used Mindomo to design the bot flowchart and maintain versions. It made it much easier for me to both design the bot and to translate it into a Dialogflow ES agent.
Use Airtable for calculating accuracy
Airtable is like a swiss-army knife for Dialogflow ES bot developers. It can be used as a
Use a conversation-friendly integration channel if possible
At some point in the conversation, the bot asks the user what tool they use to design a flowchart for their ES bot. It was a reasonably complex bot with multiple conversation turns, and it provided tips on speeding up the development of the user’s Dialogflow bot based on their responses. Most people don’t use Mindomo, so it usually recommends the tool and also links to another article on this website.
Continue Reading Use a conversation-friendly integration channel if possible
Don’t use the Training feature (blindly)
It is very tempting to map a user utterance using the Training feature. In fact, you can use it in two ways. You can take a correctly mapped user utterance and add it as an additional training phrase into that intent.
Set up automated tests
I have created a tool to automatically generate a test script from your Dialogflow ES agent ZIP file. You can use it in conjunction with the pytest unit testing framework inside PyCharm and set up automated testing for your ES bot
Follow a systematic process
As you can see, Airtable is also a good place to summarize the results and share them with other stakeholders. 🙂
You cannot do analytics if you cannot calculate accuracy
The ability to do conversation analytics in Dialogflow is directly tied to the accuracy of your bot’s intent mapping.
Continue Reading You cannot do analytics if you cannot calculate accuracy
Don’t use slot filling (required parameters)
Another reason to avoid slot filling (why I usually avoid slot filling) is the trouble you will have with your conversation analytics if you use Chatbase. They aren’t handled particularly intelligently in Chatbase (it uses sub-intents). This is to be expected when you realize that slot filling allows the user to send unlimited number of undetected messages before they exit the slot filling loop.
Continue Reading Don’t use slot filling (required parameters)