Answer doesn't match with entity values - Rasa Open Source - Rasa Community Forum

Answer doesn’t match with entity values

post by taysh on Nov 8, 2021

Hi All,

i have entity called size that accept values (small, medium, large).

suppose once bot ask user: what size do you want user response from one of above values.

but i want if user ask anything else of above sizes: bot response this size is not exist

i already used Form Action and create slot and using have a story in rules.yml

regards,


post by nik202 on Nov 8, 2021

@taysh you means like this scenario:

bot: what size you required for pizza?
user: Medium
bot: Ok, Thanks

Or

bot: what size you required for pizza?
user: extra small
bot: Sorry, we have only small, medium and larger size pizza?
bot: what size you required for pizza?

Is this your requirement? or I misunderstood your question.


post by taysh on Nov 8, 2021

Hi @nik202
Yes that exactly what i mean


post by nik202 on Nov 8, 2021

@taysh you slots are categorical?


post by taysh on Nov 8, 2021

@nik202
No its text
I used forms and custom action and made the story in rules.yml
I tried to make some if else statements in actions but it was not helpful


post by nik202 on Nov 8, 2021

@taysh you need to check the slot type in doc: Domain check the categorical slots. Then, you need to check the form validation : Forms

OR

for more examples of form custom actions please check this repo: https://github.com/RasaHQ/rasa-2.x-form-examples

Even see this video: How to Validate Form Input in Rasa  Rasa Tutorials - YouTube and you can mention the slots with if and else. Keep your use case in mind while seeing the video.

OR

If you want to fetch the values based on entities please again check the forms in doc.

OR

you can even check this blog and see how in this stress is mention as low, medium and high. How to Build Your First Rasa Form  The Rasa Blog  Rasa


post by InnoOmnia on Nov 9, 2021

Why you don’t make this with pre-set choises i.e. buttons?


post by rsonkar on Jun 28, 2022

I am having the same issue. Have we found any solution ? As per my understanding When Form is active it should expect and accept user Input as a slot value, but instead it takes it as another intent. I have one usecase where I want to take server name as an user input while Form is active and get the response via backend python APIs. There could be thousands of servers and all can’t be defined or added in NLU.yaml as ‘server name’. I don’t want to implement button based bot. I am trying to resolve this via Regex.

Any solution please suggest.