# Multiple intents

**URL:** <https://forum.rasa.com/t/multiple-intents/422>\
**Category:** Rasa Open Source\
**Created:** [August 13, 2018, 5:31pm UTC](https://forum.rasa.com/t/multiple-intents/422 "2018-08-13T17:31:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![datistiquo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/datistiquo/32/124_2.png) [@datistiquo](https://forum.rasa.com/u/datistiquo)\
**Post date:** [August 13, 2018, 5:31pm UTC](https://forum.rasa.com/t/multiple-intents/422/1 "2018-08-13T17:31:42Z")

</div>

I also read this: [https://medium.com/rasa-blog/how-to-handle-multiple-intents-per-input-using-rasa-nlu-tensorflow-pipeline-75698b49c383](https://medium.com/rasa-blog/how-to-handle-multiple-intents-per-input-using-rasa-nlu-tensorflow-pipeline-75698b49c383)

But I don’t see the point of using multiple intents flag? What is special about that? Where is the difference if I define an intent `affirm_booktaxi` just with the intent classifier classicaly?

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [August 15, 2018, 3:24pm UTC](https://forum.rasa.com/t/multiple-intents/422/2 "2018-08-15T15:24:00Z")

</div>

multi intent helps classification performance if intent labels are named consistently: they are composed of smaller tokens that have consist meaning bound to parts of the phrases.

---

<div class="post-metadata">

**Author:** ![ctrado18](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ctrado18/32/229_2.png) [@ctrado18](https://forum.rasa.com/u/ctrado18)\
**Post date:** [August 15, 2018, 7:11pm UTC](https://forum.rasa.com/t/multiple-intents/422/3 "2018-08-15T19:11:20Z")

</div>

I struggle too to understand this concept.

> [@Ghostvv](#):
>
> they are composed of smaller tokens that have consist meaning bound to parts of the phrases.

I don’t understand this.

Is there now any difference but performance when you use multiple intents? When I have multiple senteneces like greet and booking in one message, I could train this as `greet_booking` together with just the subintents greet and booking. Will there be any differences in intent classfication then (with and without the flag)?

Because you introduced this concept as something new when users say different things in one message. Such that you get the feeling there is some splitting internally for different classification…

please clarify all my statements please.

---

<div class="post-metadata">

**Author:** ![Maosandian](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Maosandian](https://forum.rasa.com/u/Maosandian)\
**Post date:** [August 16, 2018, 6:37am UTC](https://forum.rasa.com/t/multiple-intents/422/4 "2018-08-16T06:37:14Z")

</div>

hi,i have read the source code of the solution of tensorflow pipeline,here are some of my thought.

1.we can also use spacy\_sklearn pipeline if we see the multiple intent as a new intent label just like single intent

2.it has better performance if we use tensorflow pipeline which solve the multiple intent case by partitioning.tensorflow pipeline can distinguish similar intent label (such as intent:a+b and intent:a+b+c) better

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [August 16, 2018, 8:17am UTC](https://forum.rasa.com/t/multiple-intents/422/5 "2018-08-16T08:17:50Z")

</div>

👍 @Maosandian your observations are correct

---

<div class="post-metadata">

**Author:** ![datistiquo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/datistiquo/32/124_2.png) [@datistiquo](https://forum.rasa.com/u/datistiquo)\
**Post date:** [August 16, 2018, 2:19pm UTC](https://forum.rasa.com/t/multiple-intents/422/6 "2018-08-16T14:19:26Z")

</div>

> [@Maosandian](#):
>
> 1.we can also use spacy\_sklearn pipeline if we see the multiple intent as a new intent label just like single intent

The question is not if we use spacy\_sklearn. The question is whats the change for tensoflow embedding while using the flage as true or false.

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [August 16, 2018, 2:33pm UTC](https://forum.rasa.com/t/multiple-intents/422/7 "2018-08-16T14:33:39Z")

</div>

@datistiquo what do you mean by change? Improved performance. For `rasa_core`, there is no difference

---

<div class="post-metadata">

**Author:** ![datistiquo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/datistiquo/32/124_2.png) [@datistiquo](https://forum.rasa.com/u/datistiquo)\
**Post date:** [August 16, 2018, 7:09pm UTC](https://forum.rasa.com/t/multiple-intents/422/8 "2018-08-16T19:09:17Z")

</div>

Ok, the only thing chnaged is improved performance? 👍

---

<div class="post-metadata">

**Author:** ![Maosandian](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Maosandian](https://forum.rasa.com/u/Maosandian)\
**Post date:** [August 17, 2018, 1:44am UTC](https://forum.rasa.com/t/multiple-intents/422/9 "2018-08-17T01:44:32Z")

</div>

here are my thought 1.tensorflow pipeline will chunk the intent label (such as a+b) into single label by the specified separator if we use the flag as true.

1. tensorflow can also solve single intent case,as long as we set the flag as false

---

<div class="post-metadata">

**Author:** ![Maosandian](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Maosandian](https://forum.rasa.com/u/Maosandian)\
**Post date:** [August 17, 2018, 1:45am UTC](https://forum.rasa.com/t/multiple-intents/422/10 "2018-08-17T01:45:46Z")

</div>

here are my thought

1.tensorflow pipeline will chunk the intent label (such as a+b) into single label by the specified separator if we use the flag as true.

2.tensorflow can also solve single intent case,as long as we set the flag as false

---

<div class="post-metadata">

**Author:** ![Maosandian](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@Maosandian](https://forum.rasa.com/u/Maosandian)\
**Post date:** [August 17, 2018, 2:06am UTC](https://forum.rasa.com/t/multiple-intents/422/11 "2018-08-17T02:06:24Z")

</div>

the second point means tensorflow will not see the intent label a+b as a multiple intent if we set the flag as false.

the function \_create\_encoded\_intents in embedding\_intent\_classifier has said the difference between true and false

---

<div class="post-metadata">

**Author:** ![prakashdale](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/prakashdale/32/2995_2.png) [@prakashdale](https://forum.rasa.com/u/prakashdale)\
**Post date:** [July 21, 2019, 9:15am UTC](https://forum.rasa.com/t/multiple-intents/422/12 "2019-07-21T09:15:29Z")

</div>

Any idea how to handle multiple intents in FormAction.

Consider the case below

```
User: I want to book a table for two?
Bot: When do you want to book table?
User: Today
Bot: What time?
User: 7 PM. Are you open on Sunday?

```

Here user answered the one of FormAction questions but asked additional question which is supposed to be handled by different Action after current FormAction completes

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [July 22, 2019, 8:51pm UTC](https://forum.rasa.com/t/multiple-intents/422/13 "2019-07-22T20:51:43Z")

</div>

you can handle this case by detecting composite intent in validation and running followup action
