DF Chooser Bot Demo

(Autogenerated transcript)

 Alright, so in this chapter I am going to talk about exception handling and this is something which is a topic which was sort of raised by someone who has gone through the course and they are going through the course rather and asked me about exception handling in Dialogflow CX. Now I want to distinguish two different concepts before we get started. When I think of exception handling I am thinking of a user who wants to continue in the topic in the same topic but they provide a response which is not something that your bot is able to actually understand which is why it is sort of like an exception or an error and you want to have a way to handle it. The other way to think about this is what if the user changes the topic and they are intentionally changing the topic and that is not something that would come under the title of exception handling that would be an entirely different chapter all by itself.

 So here we are going to look only at exception handling. I have this CX based bot I have built which allows the user to choose between the three editions ES, CX and Actions Builder and it is a very simple bot. You can go to this article on my site and test it out. So you just start by typing the word help and the bot is going to ask do you need some help choosing this and you say yes and it is going to ask what channel are you using for your bot. Notice that it does not have these suggestion chip prompts so it is just going to take the free form input in the step. I am going to say website bot and then it asks do you have the budget to hire a programmer and let us say I say no and it says if you prefer not to hire a programmer the best choice is ES because it is the most non-programmer friendly edition of dialogue form. Now let us start over and I am going to say the same thing website bot. Let us say I say yes this time.

 Then it asks do you need to use slot filling in your bot. So I do not know what slot filling is. So I say what is slot filling. Notice that it is coming back with sorry I did not get that please use yes or no. So this is an example of an exception that is the user said something which the bot did not expect and what the bot is doing is it is just simply re-prompting them to provide an answer. So because it is going to say yes or no I am going to just assume that I am not using slot filling and I am just saying no. Then it asks will your bot answer follow up questions. And once again I do not know what is that. So what is that and it is again prompting sorry I did not quite get that please answer with yes or no I am going to say no again. Then it asks how many intents will you have in your bot. Let us just say I say a lot and notice that it is now re-prompting but this time it is

 a bit of a different type of re-prompt because it is asking hey please enter an integer because what you typed in before was not an integer. So this time I am going to say some number like let us say 20. So it then asks do you anticipate that your bot conversation will become more complex over time and the user says possibly. Then again it says sorry I did not quite get that please answer with just yes or no and I am going to say yes and it says I suggest using dialogue for CX in that case. So this is an example of a bot which is actually able to handle some exceptions. Now it is not going to be perfect in the sense that it is probably not going to handle every possible exception that you can throw at it. That is not how I built it. But you will still get the idea of what is going on here. In fact I would say that this is one of the nicest features in dialogue for CX which is that when the user goes off track and that is what I mean here the exception handling

 is what I am referring to. Because Dialogflow CX has this concept of a state machine it remains in that same state and it is not going to go off to a new intent and things like that which it used to be the case with Dialogflow ES where managing the state of the bot was a lot trickier and it ES allowed you to have fewer options when it comes to exception handling while CX is a lot more robust when it comes to this particular feature or this particular use case. And the other thing I will point out is that I have a you can actually download a copy of this bot in this chapter and I would actually encourage you to download it. You know it is a blob object that is the format in which they allow you to download the agent in Dialogflow CX and I would like you to take a look at that blob as we go forward

 with the next few lessons where I will actually show you how I built it inside of the CX console. So I just want to make sure that you have that ready because we have already covered most of the stuff that I will be explaining in the next few lessons. That is I am not going to go into a lot of detail about how these things actually work. I am just going to go fairly quickly and expect that you will be able to catch on with all the lessons. In case you came to this chapter first instead of watching the previous chapters I would recommend that you go back and rewatch those chapters or watch them for the first time because I am going to move fairly quickly over 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