Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
Merge d8c23e9 into 70c6bfe
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinaPetr committed Jan 11, 2019
2 parents 70c6bfe + d8c23e9 commit ce69240
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
22 changes: 17 additions & 5 deletions docs/fallbacks.rst
Expand Up @@ -52,12 +52,24 @@ You can take a look at the source of the action below:

.. autoclass:: rasa_core.actions.action.ActionDefaultFallback

.. note::

You can also create your own custom action to use as a fallback. Be aware
that if this action does not return a ``UserUtteranceReverted`` event, the
next predictions of your bot may become inaccurate, as it very likely that the
fallback action is not present in your stories
You can also create your own custom action to use as a fallback. If you do, then
make sure to pass the custom fallback action to ``FallbackPolicy`` inside your
policy configuration file. For example:

.. code-block:: yaml
policies:
- name: "FallbackPolicy"
nlu_threshold: 0.4
core_threshold: 0.3
fallback_action_name: "my_fallback_action"
.. note::
If your custom fallback action does not return a ``UserUtteranceReverted`` event,
the next predictions of your bot may become inaccurate, as it is very likely that
the fallback action is not present in your stories.

If you have a specific intent that will trigger this, let's say it's
called ``out_of_scope``, then you should add this as a story:
Expand Down
31 changes: 31 additions & 0 deletions docs/slotfilling.rst
Expand Up @@ -257,6 +257,26 @@ you could add a story like this:
- utter_chitchat
- restaurant_form
- form{"name": null}
In some situations, users may change their mind in the middle of form action
and decide not to go forward with their initial request. In cases like this, the
assistant should stop asking for the requested slots. You can handle such situations
gracefully using a default action ``action_deactivate_form`` which will deactivate
the form and reset the requested slot. An example story of such conversation could
look as follows:

.. code-block:: story
## chitchat
* request_restaurant
- restaurant_form
- form{"name": "restaurant_form"}
* stop
- utter_ask_continue
* deny
- action_deactivate_form
- form{"name": null}
It is **strongly** recommended that you build these stories using interactive learning.
If you write these stories by hand you will likely miss important things.
Expand Down Expand Up @@ -333,6 +353,17 @@ for example:
This mechanism is quite general and you can use it to build many different
kinds of logic into your forms.

Configuration
-------------
To use forms, make sure to include the ``FormPolicy`` in your policy
configuration file. For exmple:

.. code-block:: yaml
policies:
- name: "FormPolicy"
Debugging
---------

Expand Down

0 comments on commit ce69240

Please sign in to comment.