# Can we store multiple values in a single Entity Slot?

**URL:** <https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750>\
**Category:** Rasa Open Source\
**Created:** [August 29, 2018, 12:07pm UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750 "2018-08-29T12:07:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![NikhilBansal21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbansal21/32/418_2.png) [@NikhilBansal21](https://forum.rasa.com/u/NikhilBansal21)\
**Post date:** [August 29, 2018, 12:07pm UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/1 "2018-08-29T12:07:08Z")

</div>

Hi, Can i extract multiple slot values from a single user phrase for e.g -

> U- i want to view ticket details for ticket id’s TS78945612 & TS98745612

Here if possible how can i set these ticket id’s on my slot so that i can extract these id’s and fetch to my API for response. If yes how can i achieve it.

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [August 29, 2018, 12:08pm UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/2 "2018-08-29T12:08:01Z")

</div>

> **[Domain](https://rasa.com/docs/rasa/domain/#slots)**

Check the slot type list

---

<div class="post-metadata">

**Author:** ![NikhilBansal21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbansal21/32/418_2.png) [@NikhilBansal21](https://forum.rasa.com/u/NikhilBansal21)\
**Post date:** [August 29, 2018, 1:06pm UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/3 "2018-08-29T13:06:12Z")

</div>

but how multiple entity values will be picked from a single phrase ???

---

<div class="post-metadata">

**Author:** ![souvikg10](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/souvikg10/32/93_2.png) [@souvikg10](https://forum.rasa.com/u/souvikg10)\
**Post date:** [August 29, 2018, 8:21pm UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/4 "2018-08-29T20:21:11Z")

</div>

It uses the same entity names, if you put slot type as list, for the same entity name and slot name - values will be filled your NLU replies with multiple pairs of key: entity\_name, value:XYZ, and for a list slot type, it will look through the entity name and store all it’s value in the list. I never need to have list slots though i suppose this is how it should be given the code

Check it out.

---

<div class="post-metadata">

**Author:** ![NikhilBansal21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbansal21/32/418_2.png) [@NikhilBansal21](https://forum.rasa.com/u/NikhilBansal21)\
**Post date:** [August 30, 2018, 6:00am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/5 "2018-08-30T06:00:25Z")

</div>

thanks i will try it out 🙂

---

<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:** [September 10, 2018, 12:29am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/6 "2018-09-10T00:29:40Z")

</div>

hi @NikhilBansal21i have the same question,have you solved your problem

---

<div class="post-metadata">

**Author:** ![NikhilBansal21](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nikhilbansal21/32/418_2.png) [@NikhilBansal21](https://forum.rasa.com/u/NikhilBansal21)\
**Post date:** [September 10, 2018, 5:22am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/7 "2018-09-10T05:22:31Z")

</div>

@Maosandian yes i followed the steps told by souvik and it works

---

<div class="post-metadata">

**Author:** ![weilingfeng1996](https://avatars.discourse-cdn.com/v4/letter/w/eb9ed0/32.png) [@weilingfeng1996](https://forum.rasa.com/u/weilingfeng1996)\
**Post date:** [December 13, 2018, 7:23am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/8 "2018-12-13T07:23:15Z")

</div>

how to train th data for the ListSlot?

---

<div class="post-metadata">

**Author:** ![Sandy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Sandy](https://forum.rasa.com/u/Sandy)\
**Post date:** [March 11, 2019, 6:26am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/9 "2019-03-11T06:26:39Z")

</div>

Hi Nikhil,

Could you please share a sample of nlu.md where you use this list type slot? I am trying to implement the same. Here is what I have in nlu.md-

##intent: allocation what is the allocation to planning, development and implementation

then in my domail.yml, i have-

entities:

- allocation\_bucket

slots: allocation\_bucket: type: list

then I trained my nlu and core model. But it is not able to extract the allocation\_bucket slot values for the above example in nlu.md

Any thoughts or suggestions?

Thank you, Shruti

---

<div class="post-metadata">

**Author:** ![Sandy](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@Sandy](https://forum.rasa.com/u/Sandy)\
**Post date:** [March 11, 2019, 6:33am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/10 "2019-03-11T06:33:12Z")

</div>

Sorry, my bad. I had typo in the code. Else the above stuff works. ~Shruti

---

<div class="post-metadata">

**Author:** ![er.aks31](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@er.aks31](https://forum.rasa.com/u/er.aks31)\
**Post date:** [June 7, 2019, 10:13am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/11 "2019-06-07T10:13:56Z")

</div>

Hey, How to write slot in list format? Can you Show me how to write slot in list ?

---

<div class="post-metadata">

**Author:** ![er.aks31](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@er.aks31](https://forum.rasa.com/u/er.aks31)\
**Post date:** [June 7, 2019, 10:14am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/12 "2019-06-07T10:14:35Z")

</div>

Hey Nikhil , How to write slot in list format? Can you Show me how to write slot in list ? Can you Show example here ? Thanks Buddy

---

<div class="post-metadata">

**Author:** ![Paras](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@Paras](https://forum.rasa.com/u/Paras)\
**Post date:** [June 2, 2020, 8:40am UTC](https://forum.rasa.com/t/can-we-store-multiple-values-in-a-single-entity-slot/750/13 "2020-06-02T08:40:22Z")

</div>

“nlu.md”

## intent:inform\_cuisine

- i would prefer to eat mexican and italian
- i would love to eat italian and chinese food
- i would love to eat mexican and chinese food
- i will eat north indian and north indian food
- i would love to eat south indian food
- i will prefer south indian and north indian food
- thai and chinese
- punjabi and street food
- get me some biryani and coffee
- get me some raw meats and coffee
- get me some ice cream and coffee

* * *

“domail.yml”

intents:

- inform\_cuisine

entities:

- cuisine

slots: cuisine: type: list

* * *

Bot: What cuisine you would like to have? User: get me some ice cream and coffee

and in slots you get cuisine: [‘ice cream’, ‘coffee’]
