3 ways Dialogflow CX is better than ES for building a cognitive training bot

(Autogenerated transcript)

 Alright, so in this video I am going to tell you about three ways that Dialogflow CX is a better choice for building the cognitive training chatbot compared to Dialogflow ES. The first reason is that when you look at the all the intents in the cognitive training bot in Dialogflow ES, well first of all it is not very complicated because you just have a sequence of questions, it is like a questionnaire and we are not trying to do any NLU, that is natural language understanding on the response from the user, okay. So you just have a list of intents and if you were to go into one of these intents, let us consider, let us see, you go for the provides.here and this is the first question which it asks and when the user provides here you can see that it is just going to be like whatever the user says I am annotating it with the sys.any wildcard entity which means that it is just going to take any response from the user and then it comes back with

 the question what month is it and if you were to go to the provides.month intent, you will find that it has the same pattern, it has await month as the input context, await date as the output context and as soon as the user provides an answer it is going to ask them what date is it. So here what we have is we are using the same pattern of annotating it with the sys.any wildcard entity for every intent like we just have a single training phrase and we annotate the whole phrase with the wildcard entity, okay. So the first thing that you have in the case of the Dialogflow CX is that naturally you can see the flow diagram right in your Dialogflow CX console itself, it is not possible to do that within the, so let me delete this to see the full list of intents.

 So it is not possible to see the flow of the bot in your Dialogflow ES console, right. So the first thing, the first benefit you get from Dialogflow CX is obviously the ability to see the flow diagram in one shot and you have to remember that this is one of the biggest advantages of having Dialogflow CX or using Dialogflow CX in the first place. So the first benefit you have with Dialogflow CX is that it shows you the flow diagram of the entire conversation and because this is a questionnaire you can as you might expect it is just going to be like a long line and if you were to enable this mini map you will in fact see that all you have is just one column like this is just one question after the other after the other each of these represents a question and you can see that it is a fairly straightforward flow diagram, okay.

 But the second advantage of using Dialogflow CX is quite a bit substantial and that one is when the user provides the taxonomy the question is it asks the user to identify some kind of an object and it actually, so let me check to see the question that it is asking in the previous question. So when the user provides a response it is going to say this is the one which is it is the question it asks is how are rows and a two lips similar they are both what and of course the answer it expects is flowers and this is the question it is asking to see if the person can answer can note that they are both items of the same type in this case it is they are both flowers, right. And as soon as that question is being asked by the bot the next question you notice that

 it is going to this choose random question page and this page actually has no intent routes it only has condition routes and what are these conditions it checks to see if the session dot parents dot random number is less than or equal to 0.33 and the random number is some value between 0 and 1. First of all before I go there let me show you in the user provides taxonomy in the user provides response what it does here it creates this random number parameter and it is just the value of that is just the sys dot run and this is a system function and you can go and learn about system functions from the learn dialog for CX course. So let me close the mini map and now you know that this step has already created this random number generated the random number and the next step which is the choose random question

 page is the one which is going to redirect the flow of the conversation based on the random number which was generated. So if it was less than 0.33 the question it is going to ask is how many quarters are there in dollar 6.75 and if the number the random number which is generated is between 0.33 and 0.66 then it is going to ask how many quarters are there in dollar 7.75 and if it is over 0.66 that is the random number it is going to ask how many quarters are there in dollar 8.75. So just to give you an idea of how this would work I will go to this test agent and you can see that in Dialogflow what you can do in CX you can choose the flow and you can also choose the specific page from where you want to start testing. So here I am starting the testing from await identify taxonomy which is what which is the page we are at and I am going to say the something user response.

 Now notice that it is asking how many quarters are there in 6.75 but it also shows you the random number is 0.27 which is less than 0.33 of course right. Now on the other hand let me try again something else. Now you notice that it has changed the number because the random number it generated is 0.48 which is between 0.33 and 0.66 which is why the question has now become 7.75. Now I do not expect it to come with 8.75 the next time but let me try it just in case no it does not. So you can see that because it is a random number so there is no control in over we have no control over how this number is getting generated and it went back to 6.75 either way you can try a few times and you will notice that eventually 8.75 will also show up which proves that the question which is being asked to the user is getting randomized.

 Now the important difference between CX and ES for this particular feature and the feature I am talking about is randomizing the question that we are asking the user. The important difference is that you cannot do this in Dialogflow ES without using webhooks that is without writing code which resides on the webhook which has to do the same thing it has to generate a random number and probably you know based on the number it might call a different follow up event which will trigger different intents or something like that. Either way the main point I am making is that it is not really possible to implement this randomization of question feature using Dialogflow ES. So now we have done this other thing we have checked that you cannot we have checked that you cannot do that in Dialogflow ES. The other thing that I want to tell you is the other feature of Dialogflow CX which

 makes it which you cannot do in fact in Dialogflow ES is you can use generative features to quite literally get Dialogflow CX to generate questions by itself based on whatever the user typed the last time like based on the last user response you can ask Dialogflow CX to construct a question. Now I am going to explain how to do that over the next set of videos but what I want you to remember is that we start with Dialogflow ES and create a very simple questionnaire bot and you can do a lot of you know it is basic right you cannot implement anything complicated with that although I think that it is a nice way to get started and Dialogflow ES is more or less free because it has a very generous free tier which means that you can do a lot of testing and checking to see if the person that is you the user of the chat bot is comfortable with using this system right.

 But then when you want to do a few more things with the bot make it a bit more advanced you probably want to move to Dialogflow CX at the point and more importantly I hope you notice that you can do all this within the Dialogflow CX console itself that is you see a visualization of the flow diagram you will see the that is you can see the randomization of the question that is you can construct the randomization of the question and finally you can also generate questions which is asking the chat bot to generate a question so you do not have to do it manually yourself and in fact it does it in a very interesting but random way and I will show you how it works in the next set of videos as I mentioned but what you will find is that it is a very interesting concept when you are dealing with use case like the one that we are looking at right now so that is the stuff that I will

 be covering in the next set of videos.

About this website

BotFlo1 was created by Aravind Mohanoor as a website which provided training and tools for non-programmers who were2 building Dialogflow chatbots.

This website has now expanded into other topics in Natural Language Processing, including the recent Large Language Models (GPT etc.) with a special focus on helping non-programmers identify and use the right tool for their specific NLP task. 

For example, when not to use GPT

1 BotFlo was previously called MiningBusinessData. That is why you see that name in many videos

2 And still are building Dialogflow chatbots. Dialogflow ES first evolved into Dialogflow CX, and Dialogflow CX itself evolved to add Generative AI features in mid-2023