Advise on dialog task flow when bot needs to show possible queries


We wanted to show a menu with possible queries when the user just typed in some keywords. For example for account offers, if the user types “products”, we wanted the bot to show a list of buttons with the following choices:

“What do you want to know about the product”
“What are the products available for savings account”
“What are the products available for current account”

Screen Shot 2021-06-07 at 6.06.15 PM

But when the user types “products available for savings account”, the bot should proceed with the flow without showing these buttons.

Currently, we are using traits to decide whether to show these menu-like buttons. Will this be fine or is there a better way to do this?

Thank you.

I think the best way to model this is using entities.

You can create an entity node called “product” and use it as a list entity. Then the values would be “Savings”, “Current” and “Other”. Upon detecting an entity you can direct the conversation flow as you wish.

To skip this menu when user types “products available for savings account” can be be achieved by detecting the above mentioned entity “product” in the user utterance.

Please refer the entities in the documentation.


Using traits in this way as a second tier to the intent identification is a pretty good approach - I know of bots that do this.
And using a List of Items entity is also a common technique.

Neither are wrong, and with training they can both achieve what you want to do.
In fact, I typically would use both.

There are some traits that can be used to quickly identify the obvious scenarios. The pros are that there can be multiple traits identified and so the logic for determining what to do next can be comprehensive. The cons are that they are statically trained, and that no words are marked as used up.

The List of Items entity can be used as a fallback when traits have not found anything applicable. An entity has the advantage that the list of choices can be dynamic and so incorporate recent user context, or be derived from ambiguous trait identification.