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:
- 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
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
- 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
“domain.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']
Reply