Force user message to a specific intent for slot filling

When you have multiple intents and want to do slotfilling like for the restaurant bot or for weather like here: http://rasa.com/docs/core/0.10.4/slotfilling/ you often ask the user for a specific information like location or cusine type. That is mostly just one word. So for a safe story preditcion I would like to have after asking for location the intent location with proper entity Also, maybe you dont know how this one word is classified as which intent (which might alson change!) So for safe story telling you need somehow force this user message to the proper intent with a custom action right? But how would you do that since you can use a custom action only after the user message is already parsed. So you have to write a story with a slot (indiicating a slotfilling) but with an unknown intent?

Is there a better way?

Mostly you have for specific intents specific custom actions. Then you need to request for the entity if not given for all intents which share those entities. So you have same entities across all intents. This type of slotfilling in the docs and with Formaction is only suitable if you just have one intent because you even don’t know as what intent this one word like loaction is classified and for safe story preditcion you need to write a story which matches ypur scenario.

I hope this is understandable?

Mybe this example illustrates my issue more suitable: From the doc example:

* inform{"number": 3}
     - action_restaurant_form
     - slot{"people": 3}
     - slot{"requested_slot": "cuisine"}
* inform{"cuisine": "chinese"}
     - action_restaurant_form
     - slot{"cuisine": "chinese"}
     - slot{"requested_slot": "vegetarian"}

When you have (not in my case but in this example) two intents where cuisine and people play a role you would need somehow more likely this here:

- slot{"requested_slot": "cuisine", "requested_intent": "inform"} and next user message is cast to this intent such that you have a safe story.

3 Likes

I imagine right now that you write a custom component where you look at previous action and intents to decide if you force intent to a needed intent?

i want to signup a page

these are my intents

-user name

-password

-email id

but the thing is we cannot give the entity to the user name and password intent. plzzz solve it

1 Like

now, you can use FormAction to solve this type of problem.