To detect multiple user utterances. Intent Node or Entity Node or Script Node

We are developing a bot, where the user may respond in differently. So i’m bit confused which is the best practise to follow.

Example scenerio.

  1. Has your family memeber been in contact with any covid persons in your community?

For this if user responds with “Yes” and “No”. It’s fine to use Confirmation node.

Apart from “Yes” and “No”, If they respond like this “She had such contact”, “He was infected”, “Infected with covid”, “Diagnosed with covid recently”.

How to handle those scenerios in my bot. whether i can use intent node for this, so that i can train more samples that increases accuracy of my bot.

Or Should i follow some other best practices for this. If so let me know the best practice for this.

Kindly help me out.

I would use a confirmation node because that handles all the yes/no possibilities and will save a lot of training effort.

But then I would attach a sub intent node (purple) to it and use training to detect those other scenarios. You could even use several sub intent nodes for different situations.

I’ve seen many people use a List of Items entity for this kind of thing, but that will suffer from maintenance issues. In a case like this where the additional options beyond yes/no are fairly open then intent training is going to be more efficient. Such an entity is more suited to a small closed set of options.

I would definitely not use a script node - if you ever contemplate using script to parse and understand input text then you are doing it wrong!

The other alternative is to use traits. Every utterance is tested against the traits training and because it is multi-classification you can use them to detect many different things. The identified traits are stored in context and hence can be tested in the connections.

1 Like


Hi Andy,
Thanks for your response.

As you suggest, I have attached two intent nodes followed by a confirmation node.
Here the confirmation node handles “Yes” and “No”. In the confirmation node I have used only “Yes” and “No” connections and removed “If exists” & “else” connections.

Intent nodes will detect and handles scenarios other than “Yes” and “No”. I have trained the intent node to detect the following scenario “I have Cough”, “I have a fever”.

Question 1: Do you have a cough, cold or fever?
Answer 1: "Yes, I have Cough. It works fine, and it passes the confirmation node followed by the intent node.

Answer 2: "I have Cough. It’s not able to pass the confirmation, I know here i have to respond with “Yes” and “No”. But the end-user may not use these sometimes.

So, how to handle the “Answer 2” scenario. Kindly help me out. It will help me a lot in the project as I have more sets of questions that need to design based on this logic.

I’m attaching a snap of my “Question 1” flow and Intent node samples.


Confirmation node connection without synonyms.


Intent node trained samples.


So the key here is that “yes” and “I have a cough” are two different things and are detected independently. A confirmation node handles the “yes” and an intent can handle the symptom.

Because the user could say either or both (or neither) at the prompt then the confirmation node needs to have transitions that support that. When you only have yes and no connections then you are saying that only those responses are valid. But if other utterances are possible besides the yes/no then you will need to have else or if-else transitions. Those additional connections are the equivalent of an optional entity.

In your flow, the user utterances of “yes” and “yes I have a cough” will both go down the same affirmative connection and you won’t know if the answer was the simple version or a more complicated one with symptoms.

Also note that user intent nodes do not have to be connected to anything, the identification will still happen and any match is stored in context.FollowupIntents. If the flow goes through the intent node then that match is removed from that FollowupIntents array.