Can we store multiple values in a single Entity Slot? - Rasa Open Source - Rasa Community Forum

Can we store multiple values in a single Entity Slot?

post by NikhilBansal21 on Aug 29, 2018

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.

post by souvikg10 on Aug 29, 2018

Check the slot type list

post by NikhilBansal21 on Aug 29, 2018

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

post by souvikg10 on Aug 29, 2018

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.

post by NikhilBansal21 on Aug 30, 2018

thanks i will try it out

post by Maosandian on Sep 9, 2018

hi @NikhilBansal21 i have the same question,have you solved your problem

post by NikhilBansal21 on Sep 10, 2018

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

post by weilingfeng1996 on Dec 13, 2018

how to train th data for the ListSlot?

post by Sandy on Mar 11, 2019

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 domain.yml, i have-

entities:

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

post by Sandy on Mar 11, 2019

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

post by er.aks31 on Jun 7, 2019

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

post by er.aks31 on Jun 7, 2019

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

post by Paras on Jun 2, 2020

“nlu.md”

intent: inform_cuisine


“domain.yml”
intents:

entities:

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']

Reply

Related topics

Topic Replies Views Activity
Why do slots of type list not return singleton lists?
Rasa Open Source
8 1.1k Apr 2021
Appending data to slots of list type
Rasa Open Source
11 1.4k Jan 2022
How to extract multiple values for one slot in same intent?
Rasa Open Source
32 3.5k Apr 2021
Multiple entities values to single slot in rasa form
Rasa Open Source
7 1.3k Oct 2022
Slot type List and Text
Rasa Open Source
7 5.2k May 2021