What's the point of form{"name": "null"}?

Hi all,

I was trying out form actions and I have this in my stories.md:

  • request_ticket_status
    • ticket_status_form
    • form{“name”: “ticket_status_form”}
    • form{“name”: “null”}
    • utter_ticket_status_confirm
  • confirm

So if the user asks about the status of a ticket, it should start the form “ticket_status_form”.

This works, but it also works if I remove:

  • form{“name”: “null”}

What’s the point of it?

Also - ticket_status_form already points to the form, so why do I have to add - form{“name”: “ticket_status_form”} beneath it?

Tijs

form{“name”: “null”} is set when the form has filled all of its required slots.

1 Like

Ok that’s the current situation, but why? It would make a lot more sense to me if you have to write stories like this:

  • request_ticket_status
    • ticket_status_form
    • utter_ticket_status_confirm
  • confirm

instead of:

  • request_ticket_status
    • ticket_status_form
    • form{“name”: “ticket_status_form”}
    • form{“name”: “null”}
    • utter_ticket_status_confirm
  • confirm

if utter_ticket_status_confirm is part of the form utterance, it shouldn’t be present in stories

It isn’t…

To generalize:

  • request_that_requires_form
    • example_form

Should be enough… Because you already define “example_form” as being a form in your domain.yml

  • request_that_requires_form
    • example_form
    • form{“name”: “example_form”}

adds unnecessary lines to your stories file in my opinion

form{“name”: “example_form”} is issued by from action to notify the tracker that it has been activated. Having separate event makes it more explicit and makes featurization easier

So it sounds to me like activating the form and deactivating the form are two explicit events saved in the tracker.

So for the memoization policy in particular,

  • However it works, the policy expects those two events to be in the history to correctly predict the next action (although I’m not exactly sure about the specifics of how the prediction works.)

  • If I don’t specify those two events in the story, then the memoization policy will look at the history as it tries to predict the next action, see that there are two events I didn’t list in my story, and possibly give the story I wanted to execute a lower probability.

Does that sound correct?

memoization policy either predicts an action with probability 1, or predicts action_listen with probability 0