Two slots from different forms with same name are colliding

Two separate forms that have entities with the same name (let’s say ‘var_x’ ) are colliding. When I m having a conversation (related to form1) with the bot, I had to enter ‘var_x’ as input for a specific entity to continue the conversation. When I do so, this ‘var_x’ is triggering another form (form2). How to solve this.

I think I know what you mean but I’m not sure - can you provide a concrete example and the definitions of your forms & stories?

Consider bot for Bank Customer Care.

A customer is initiating the conversation for registering a complaint. (intent- complaint)

user :hi

bot : how can help you

user : register a complaint

bot : what is your issue - 1. loan 2.transaction

user : transaction



So when I enter ‘transaction’ as input, it should consider it as slot value for an entity (“issue”:“transaction”) and the conversation should be continued. Instead this input word is triggering another intent where word’ transaction is mentioned frequently in nlu under that intent.

Summarizing the problem : I am entering a word which is supposed to be a slot value, but as it was a word which helps in identifying a specific intent, whenever I enter such word that intent is getting triggered.

Have you annotated this word as an entity, and defined the slot and entity in your domain?

Yes, In domain I have defined the slot and entity ‘Issue’.

And in stories I have included a story for such a case (when I enter ‘transaction’, it will consider it as value for ‘Issue’ and proceed with the conversation).

And also in nlu there are samples similar to: Screenshot from 2020-08-13 23-33-41

Is the entity getting extracted when it’s just transaction? If no, you need to add more training data for the entity. If the slot is getting set, the intent still matters. You need to write your with both the expected intent & entity and the slot. If you could post the relevant stories & training examples, that would make it easier to troubleshoot.

Stories seems fine (I think so). I forgot to mention one thing, when I use buttons it works fine. - Screenshot from 2020-08-14 13-31-27

clicking on ‘transaction’ , which sends payload ‘/inform{“issue”:“transaction”}’ works fine without any colliding. But using text as input without using any buttons: Screenshot from 2020-08-14 13-34-31 this problem arrives.

Ok, then it looks like we can narrow it down to definitely an entity extraction issue. There is no guarantee that transaction is extracted as an entity; you need to check if it is. Try running rasa shell nlu and looking at the output for that word. Is it extracted as an entity?

To clarify, your button payload is specifying the entity value in a guaranteed way. So we can see that if the entity is extracted (specified, in this case), the slot is filled and the dialogue works.

Yes, using the buttons there is no confusion. Without them there is an ambiguity between an entity extraction and intent classification.

Using rasa shell nlu, the word ‘transaction’ is classified into the intent where there are samples with ‘transaction’ word as a part of the sentence with 47% confidence, and to the intent where ‘transaction’ is annotated as an entity with confidence 7%.

Right, then you need to add more training data.

I just switched to the DIET classifier to check whether it solves the issue. But it turned out that using DIET, intent classification doesnt seem good. I am trying to add much more data for training.

Can you suggest a nlp pipeline for a domain specific data (Language I have used is ‘te’, embeddings loaded with spacy).

@ManiNuthi along with annotations also create an intent “inform or enter_data” and add all the terms like

transaction, loan, etc

i that intent and also add a check in the validation function of the form action

if intent == “inform”: fill the slot

so now when you enter “transaction” instead of triggering another intent bot will fill the slot. Hope this will help you

Thank you for the response. Yes, I have the intent ‘inform’ where I mentioned all the slots.

(Just reminding the issue)

In the middle of the conversation, instead of considering input as entity value, input is classified as an intent (another intent).

Input will always be given an intent; entity is optional. What do your form slot mappings look like? You can use multiple.

def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:

return {
    "Issue": [self.from_entity(entity="issue"),self.from_entity(entity="Option")],
    "Seating": self.from_entity(entity="Seating")}

This is how my slot_mapping func looks like.

I am actually facing this problem, because the whatsapp doesnt support buttons and I have to type my input.