- Better Dialogflow Bots Part 1: A puzzle
- Better Dialogflow Bots Part 2: Puzzle explanation
- Better Dialogflow Bots Part 3: An alternative approach
- Better Dialogflow Bots Part 4: Session variables
- Better Dialogflow Bots Part 5: Reading from session variables
- Better Dialogflow Bots Part 6: Fallbacks for Followup Intents
- Better Dialogflow Bots Part 7: Candidate Intents
- Better Dialogflow Bots Part 8: Target Intents
- Better Dialogflow Bots Part 9: Fallback Intents
- Better Dialogflow Bots Part 10: Surplus Intents
- Better Dialogflow Bots Part 11 (of 11): Summary
Now that you are familiar with the concepts of candidate (C), target (T), fallback (F) and surplus (S) intents, you can use these for building better Dialogflow chatbots.
Here is a formula which roughly summarizes what we have learnt till now:
C = T + F + S
# of candidate intents = # of target intents + # of fallback intents + # of surplus intents 
System design goals
Given this equation, what is our goal in designing our chatbot?
We should try and minimize the total number of candidate intents at any (and every) step in the conversation. This helps Dialogflow with its pattern matching - if there is only a small group of candidates, Dialogflow is less likely to make errors in its intent mapping.
Make S = 0
If possible, you should never have surplus intents. Every surplus intent is a potential mapping error, as we saw with the intent which captures the first name (in the follow up intent tree example from part 1).
This follows from the first goal, we would also like to minimize the number of target intents at a given step in the conversation.
As you build out your chatbot, do the following exercise.
This will help you narrow down the options at each step in the conversation, and help produce much more predictable intent mapping in your Dialogflow chatbot. In turn, this will lead to easier debugging and faster development iterations.
Need some help with this analysis?
Would you like some help using these rules of thumb to design your chatbot? Get in touch.
Conversation Design course
In my conversation design course, I provide many ideas which are based on this series. You can use them to design better chatbots. See a preview. Don't get too hung up on deciding if a particular intent is a target intent or not at a specific point in the conversation. In certain types of bots (e.g. question answering bots), it can be quite hard to figure this out precisely. Use this equation as a rule of thumb.