Recently, Google published a very interesting article on how you can assess the quality of the training phrases inside your Dialogflow agent.
In my view, if you are at all interested in building a Dialogflow agent, it is a MUST READ. Note: You do need a fairly good programming background, plus some basic understanding of concepts such as "word vectors" to understand that article. So maybe the person who will read it is the programmer on your team.
But here is the gist of it: you should maximize cohesion as well as separation in your intents.
In this context, what is cohesion and what is separation? Instead of repeating what is already mentioned in that article, I will just highlight the definition in the screenshot image.
In early 2018, I released my Dialogflow Conversation Design course. People who bought the course might remember these suggestions I had in the course for designing intent training phrases.
Minimize Intra-intent variation
Maximize Inter-intent variation
If you follow the definitions of cohesion and separation, it is quite clear that the terminology I used overlaps with their definitions.
However, I didn't know that there was a more succinct and mathematical way to define these concepts. Plus, the Google article actually quantifies what I could only "qualitatively" observe at that time.
Agent Validation feature
Have you seen Dialogflow's new agent validation feature?
In fact, when you look at the agent validation for the prebuilt Smalltalk agent, you see this suggestion:
My guess is that the approach explained in the article is what is being used for this feature.
You can learn more about the agent validation feature in my course.
Three things you can infer from the article
There are three things you can infer from that article:
- the cosine similarity between sentence vectors, which is explained in the Google article, is a good "model" to think about Dialogflow training phrases (even if Dialogflow isn't really open source and so we don't really have a way to know the machine learning algorithm that Dialogflow uses)
- you can use this model as a starting point if you would like to automatically classify a list of sentences into the relevant intents
- using an explicative approach can help you build better chatbots
But the real point I am making - other than the blatant plug for my courses 😉 - is that this is an acknowledgment from Google that you need to also help Dialogflow if you want Dialogflow to help you.
- How to debug your Dialogflow bot
- Client Question: Can I use GPT2 for my Dialogflow bot?
- Weekly Free Mini Courses
- 15 things all Dialogflow bot makers should know
- Autogenerating FAQ bot from training text
- A MUST read article on Dialogflow training phrase quality
- Using Collect.chat for preNLU bots
- Reader Question: How to get some sample training data for Dialogflow?
- Getting the top 3 (or top N) intents in Dialogflow: An experiment
- Dialogflow Regexp (regular expression) entity