Flexible Forms


I had been implementing an utterance that requires a free text as input, without an intent/entity recognition, and has to be caught as a slot. However, in the same utterance, if the user requires an example, I would like to direct the conversation by first providing an example which can be reached by clicking a button.

Is there a way I could strategise this? I am not using forms as Forms as an action will be persisting and I would as well want the flexibility of going to the example if needed and coming back to the free text response.

Thanks in advance.

Hi @labeebee, what you can do is use the from_text slot mapping to capture any free text into a slot value. If you create an intent that captures when the user is asking for an example, e.g. ask_example, you can use the not_intent parameter to have it handoff to a rule.

# domain.yml
    - type: from_text
      not_intent: ask_example
# rules.yml
- rule: give an example
  - intent: ask_example
  - action: utter_example

1 Like

Thank you Ben. Let me see if this works. What I did was to implement a custom action instead and make not a form at all. But this sounds the best approach.

Regards, Labeeb

Hey Ben, when I tried this, I am getting a action_execution_rejected, which I believe is a default action. Why would that be?

If the intent triggered is defined as a not_intent, then that would correspond to expected behavior. Is the associated rule with that intent getting triggered properly here?