This method of handling of multi intents https://blog.rasa.com/how-to-handle-multiple-intents-per-input-using-rasa-nlu-tensorflow-pipeline/ does not look feasible as we have to name the multi intent first though we have already defined single intents in the training data and then we also have to add data for the newly created multi-intent and train it. This way we have to create every combination of the intents, which is not good, and we need to create these combinations because user can ask for any combination for the multi intents. Am i right? if, yes then do we have any better approach to handle multi-intents in RASA?
@Ghostvv and @erohmensing i think i need your help here as well. Thanks. looking forward
this is by design - there would be too many possible multi intents to consider them all. The only multi intents that matter are the ones that users will actually say, which is a far smaller number than all possible ones. Hence you can define a couple for the things you see your users saying and don’t need to cover every possible combination
@amn41 Are you planning to handle my concerns in future versions of the rasa or it would remain the same, the way multi intents are being functioning? Thanks
@noman as I said, the way this works is intentional. If you have n intents, there are ~n^2 possible multi intents if you consider two as the max, ~n^3 combinations of three intents, etc. So considering all of them is not scalable. The vast majority of these will never actually be said by real users, so the Rasa feature is designed for handling the messages you do actually see.
ok great, can’t we find multi-intents using intent rankings?
Yes @amn41, wouldn’t it be a good option to say that if two intents are recognized with confidence higher than a threshold then the utterance is classified with two intents?
Im also interested in dynamically classifying multiple intents using confidence rankings…
Might not be good way to do this, training is important on the data for multi intent @tatianaf
I am trying to use multi-intents as well. At the moment it really feels like completely separate intents instead of being a combination of my previously defined intents. Is there any advantage in using multi-intents instead of just creating a new basic intent? As in, does training use nlu data from both the single intents as well as from the multi-intents to predict these? Otherwise, I don’t really see the benifit…
@Taufred No i dont think so, you need to create a multi intent first then need to add training data explicitly for the newly created multi intent.
So what is the difference to a normal intent? It feels very similar, as I do need to take exactly the same steps: Create the intent, add nlu data, make up stories. Maybe the Tokenizer might work a bit differently, but apart from that?
Yes you are right even i didn’t see any difference
@amn41 iamn41 i will agree with your point, if we flow certain strategy of building bots. , i think we could overcome this.
Things to do before bot development
- Preparing Test cases.
- Validating the Test cases with the Team,
During Developement
- Define all domain specific terms as Entities
- Increase the number of entities and decrease the number of Intents.
- write the story with intent and entities, and try to cover all possible occurance of entities under intent.
example_text: I am immediately looking for NLP job in Bangalore
* intent_enter_data{'location':'Bangalore','job_type':'NLP','availability':'Immediate'}
- actions_send_information
- cover all the testcases.
**Things to do after bot developed **
- test the bot effectively
- Bulid a model with real data (test data)
Yes @amn41, wouldn’t it be a good option to say that if two intents are recognized with confidence higher than a threshold then the utterance is classified with two intents?
I tried to experiment this idea by looking at the intent rankings. I wanted to see if I can come up with a confidence threshold above which I can identity multiple intents appearing in the same utterance. But most of the time, rasa nlu gives very high score ( > 0.9) for one intent and very less scores for the rest of the intents.
Yeah I also tried it, got the same result
Hello every one,
I’m looking for a solution regarding an issue linked with this topic.
My bot has a retrievial intent faq which is declined in more than 50 intents.
I would like to manage multi intent for the case where the user says “Yes, …” with the faq intention in the wake of the affirm or deny ones.
In this case i would like my bot to manage the faq first and then treat the affirm or deny intention.
Is that possible to manage several multi-intent without writing all of them up by dealing with a retrievial intent as a part of the multi-intent ?
Will the bot be able to understand all the intents which are behind the “affirm+faq” and hox to treat the faq and then the affirm or do i have to implement each “affirm+faq/*” intents and linked response ?
Thanks for helping
Hello,
Is there any resolution on this topic? Is there no difference between combining intents with a multi intent vs. simply creating a new separate intent which handles the new phrases?
Best, Steinn
Rasa by default uses Softmax in the last layer which makes relative confidence and increases confidence of most probable class and decreases others. I think using Sigmoid instead my help to use confidence as a measure to check for multi-intent. Also using a sentence-tokenizer and giving intent for each sentence may help resolving multi-intent problem.
@amn41 I tried digging in the Rasa source to see how multi-intents are treated but I thought it would be quicker to follow up here. My initial assumption was that in the default case we are dealing with a multi-class classification problem (ie, samples or utterances can belong to one of many intents), whereas the multi-intent case (presumably toggled by setting intent_tokenization_flag
and intent_split_symbol
) treats it as a multi-label classification problem (ie, utterances can belong to one OR MORE of many intents). Judging by the commentary above it would seem that my assumption is incorrect, and that multi-intents are treated simply as additional classes for the multi-class problem. This then begs the question of why they should be used at all, and why we shouldn’t just name a new single intent. Perhaps I’m misunderstanding how the DIETClassifier works. Confirmation would be appreciated. Thanks!