You could create a custom component and append it to your NLU pipeline as the last component. Then you can retrieve the intent and extracted entities and do some processing, such as clearing all entities if the intent is greet etc.
Hey thanks for replying Alex but I remember seeing this functionality in Rasa somewhere.
You just specify an in parameter and list the entities that you want to pick up. I am not able to recollect where that is documented and google search isn’t giving me the appropriate response.
From personal experience, I did not notice the entities being detected unless there was a sample phrase in my nlu.md specifying that particular entity. If the same entity value had samples in an another intent, it was detecting properly for those intents, but not in the intent in which there were no examples of it. Have you tried adding training phrases where entities c and d are part of the phrase but aren’t tagged as an entity? If your NLU model is complex, I would recommend you restructure its JSON response and deploy your own custom REST service. They have libraries that allow you to load a trained model and use it to predict phrases rather than deploying their defaulted REST service.
Hi, I have the same problem as @nikhilcss97 and tried to write a Custom Component like suggested in this post. It checks if the extracted entities are required for the classified intent. If they are not, then those entities are dismissed. But after training and runnig my Bot, suddenly some of my Forms aren’t working anymore. It seems like my Custom Component is incomplete. Maybe someone wants to take a look and tell me what I’m missing.
I started the conversation and the Bot detected intent_a with entity_c, which was extracted (even through there should be no entity extracted). After that I entered Input_b, and it was followed by the form_d as an action. The form should perform an utter_ask_entity_c (because entity_c is listed as required slot for form_d), but instead it used the in intent_a extracted entity_c. Maybe “use_entities” was the wrong approve for me or am I missing something else? Can somebody help me on this please?
(Rasa version 1.2.2 and Rasa SDK version 1.1.1)
Yeah @nikhilcss97 is right, the default if you don’t define anything is that intent a will featurize all entities, so you’ll want to tell it to use none
Thank you @nikhilcss97 for your suggestion, but it’s still not working the way it should. intent_a extracts entities, even through I wrote “- intent_a: use_entities: []”. Does someone have another idea?
Hm it’s likely that it still extracts the entities, but doesn’t featurize them, I think that is actually what this is for. Because the domain doesn’t have any influence over the entity extractors and what they output, just whether or that that influences the conversation flow or not.
is there any way i restrict particular intent from being extracted for entities? For example i dont want entities extracted for faq intent. My slot is getting affected because of that. can you please help me with that?