# Two slots of same entity type

**URL:** <https://forum.rasa.com/t/two-slots-of-same-entity-type/6042>\
**Category:** Rasa Open Source\
**Created:** [March 14, 2019, 2:40pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042 "2019-03-14T14:40:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nexemics](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nexemics/32/1927_2.png) [@Nexemics](https://forum.rasa.com/u/Nexemics)\
**Post date:** [March 14, 2019, 2:40pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/1 "2019-03-14T14:40:00Z")

</div>

I am facing a problem regarding slot filling. For example: I am building a travel bot and I have two intents: inform\_source\_city and inform\_destination\_city. During training I am required to input 2 different cities for each intents. This also means I have two slots to fill source\_city and destination\_city which will require similar types of input. When I input London for inform\_source\_city, the entity recognition fails to detect London as a source\_city and it rather displays [London] (destination\_city). The intent recognition is correct but however I am forced to change the slot to [London] (source\_city). What is the procedure to differentiate two slots with same type of input as different inputs. My prefered order is to input source and then destination.

---

<div class="post-metadata">

**Author:** ![Nexemics](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nexemics/32/1927_2.png) [@Nexemics](https://forum.rasa.com/u/Nexemics)\
**Post date:** [March 18, 2019, 9:38pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/2 "2019-03-18T21:38:33Z")

</div>

@akelad A little help?

---

<div class="post-metadata">

**Author:** ![tomp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tomp/32/21142_2.png) [@tomp](https://forum.rasa.com/u/tomp)\
**Post date:** [July 11, 2019, 8:19pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/3 "2019-07-11T20:19:32Z")

</div>

I would also like to know if I can request two terms of the same slot type in the same user utterance.

---

<div class="post-metadata">

**Author:** ![cheloveco](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@cheloveco](https://forum.rasa.com/u/cheloveco)\
**Post date:** [July 11, 2019, 9:43pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/4 "2019-07-11T21:43:56Z")

</div>

Hi, I faced a very similar problem as yours, my solution was to get only one entity and several slots, in your case it could be city, and the solts source\_city and destinaiton\_city. Then, in a custom action you could fill them and decide which one is which by means of analyzing the previous user intention, or bot utterance.

---

<div class="post-metadata">

**Author:** ![m.khalilishoja](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@m.khalilishoja](https://forum.rasa.com/u/m.khalilishoja)\
**Post date:** [October 29, 2019, 6:02am UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/5 "2019-10-29T06:02:49Z")

</div>

Hi, How can Iu define custom action here?

Thanks

---

<div class="post-metadata">

**Author:** ![npattarone](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/npattarone/32/12924_2.png) [@npattarone](https://forum.rasa.com/u/npattarone)\
**Post date:** [February 16, 2021, 5:52pm UTC](https://forum.rasa.com/t/two-slots-of-same-entity-type/6042/6 "2021-02-16T17:52:48Z")

</div>

Hi! I know is a bit far in time from where you posted your question. Now you can try to use something like this [NLU Training Data](https://rasa.com/docs/rasa/nlu-training-data#entities-roles-and-groups) to detect same entities by having different roles, and so you wont have to work around similar intents 🙂 I hope it helps!
