I am using a form to get user queries which can be of various types.
I cant define intent examples for such a query. I want to directly pick what the user types in and I want the bot to not detect the intent while the form is active. How do I accomplish this?
I have 15 - 16 intents in my nlu.yaml file. I want my form to not detect any of those intents and directly fill the required slot. I tried defining slot with mapping from_text.
But it still goes into intent detection, and if the intent does not match, it goes into fallback. And since I have created a rule for the form it fills the slot with the text entered by the user.
But sometimes the user entered text is similar to some intents so the slot doesn’t get filled and the next story flow is executed for the detected intent. How do I solve this problem.
Is there a way to stop intent detection when the form is active?
Yes…you have to give conditions for a particular slot for which you need free text in a form.
for example -
slots:
name:
type: text
mappings:
- type: from_text
conditions:
- active_loop: enquiry_form
requested_slot: name
And do this while defining a form-
forms:
enquiry_form:
required_slots:
- name
Also, I was using ignored_intents field while creating a form which created complications. So keep the form creation in the domain file clean as given above and you would be good to go.
Additionally, you can use multiple conditions on a single slot.
ex-
slots:
free_text:
type: text
mappings:
- type: from_text
conditions:
- active_loop: first_form
requested_slot: free_text
- active_loop: second_form
requested_slot: free_text