List Type

(Autogenerated transcript)

 Alright, so now let's take a look at the list response type. What I'm going to do is go to my agent and say show list type, show me list. And in the response I'm going to delete this, add responses, custom payload, back to this page and copy the whole thing and paste it over here. Let's save it. I want you to take a look at what's inside this rich response. The first is it has a title and a subtitle and then it has a type, these are expected. But notice that it actually has an event associated with it. Now unlike the, let's say the suggestion chip, if you don't have an event associated with the list type, it will not work properly.

 So what I'm going to do is I'm going to add the two events that we do have in our bot which is the welcome event and the parallel event and I'll just leave the other things as they are. So let's do that. Now it's saved. I'm going to go back to the editor, open the web chat widget and say show me list. Now I want you to notice something. So it has the list one title, list one subtitle and same way list two and list two subtitle but these two do not give you any hint about what would happen if you were to click on it. So you don't have a, there's no indication here that it's going to trigger the welcome intent for this item or the parallel intent for this item. So I'm going to click on this.

 So it says, sorry I didn't get that, can you rephrase? I'm wondering if I made some mistake. Oh yeah, so this is wrong. So this has to be parallel and the language code has to be en and okay, that's actually weird. It's actually having the same things but you can see that the order is different. Here is language code name and parameters and here is name parameters and language code for some reason. So let's change that and save it. Close it. Go back to the editor and open this again, click on it, show me list. It comes with these two items and if I click on it, it says hello from the parallel universe. Now I did point out last time that you can still click, that is this list item, this

 list of items is still active even at this conversation step. That's not something that I really like but you can see that it's still active. So I'm going to go ahead and click on it and you can see that it comes back with the message which is in the welcome message, welcome to the new and improved dialogue from messenger. I can show you different types of dialogue from messenger responses. In fact I can click on it one more time and it comes with hello from the parallel universe. So this is why I wasn't a big fan of this, the list, the other rich responses. Not that I don't want to have these responses but I just think that it would be nice if as soon as we have an interaction with these response types, they somehow get disabled so that if I were to click on them again, it will not do anything if it's passed that step in the conversation. But it's a design choice that the dialogue team has made and this is what we have to live with and you know that this is the behavior so you can design your bot accordingly.

 So in any case, what you saw here is this is when do you use this list response versus let's say just using suggestion chips to show a bunch of choices which the user can click. So the difference between the suggestion chip and the list of items is there are two important differences. The first is no matter what text you have on the list item which actually gets displayed, that text item is not going to be seen after that inside the chat widget as you know. If you click on it, it just triggers an event, right? And the second thing is that which is the same point really. In this case, the interaction works differently because it has to have an event which is backing every item in the list. So if we have 10 items in the list, you can use the same event again but you still need

 to have one event corresponding to each item as you specify it in the JSON object which means that of course every list item should actually be triggering some event in your agent like as I said it could be the same event but you do need to have something backing it, right? Now this has some implications. First is that the good is if you want to hide the choice from the user as to when they click on something, what is actually getting clicked? Like let's say that you have some kind of a user ID or something. Like let's say you have a list of I don't know like some identifying numbers or you know information about list of people or some list of objects or something and you don't want the user who is interacting with your agent to be able to see the underlying unique

 ID that you are using which is sort of a secret to your system, right? Then the list option makes a lot of sense because you can actually when they click on it it's going to go and trigger that particular event, right? Now on the other hand because it's not displaying any text as a consequence of clicking on this item it just triggers something and then it comes back with a response. That means that you don't have the information about this in your agent if you go and look at the history. Now you do have the history where it shows that somebody clicked on this like let's go to the history of this particular agent right now and you can see that you know this event parallel event was clicked and then the welcome event was clicked and then the parallel event was clicked again but that's still different from having a conversation transcript of what

 the user typed which is something that you might want in certain other situations. So my point is the list is a good choice if you want to actually hide the information about the underlying or even if you just think that you may not want to hide it but it just may look like ugly because it's a combination of you know special characters and underscores and hyphens and things like that which you know you may not the end user may not like to see that kind of like geeky stuff and they may want to have more nicer looking English words and stuff. In that case you would want to use the list and on the other hand if you're just presenting a set of options the user can click on them transparently and you will have that buttons text just show up in the chat widget if that's what you want to do. In that case the suggestion chip might be a better option. So these are the you know sort of two options for selecting between a list of items and

 as I'm pointing out for the most part the suggestion chips are better options but there will also be some situations where you will find that the list item is better. One good example is if you just want to show a lot of information in each list item let's say just say that this is like a paragraph of text which has to explain what the user is choosing. Yes then you don't even have any option other than using the list because in that case you can't put so much text into a single suggestion chip it just it will overflow the screen and you'll not be even able to see the whole button.

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