Skip to content

Commit

Permalink
Merge fc7139f into 33911a0
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshvar22 committed Sep 19, 2019
2 parents 33911a0 + fc7139f commit c41d72f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/core/retrieval-actions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ You can cover all of these with a single story where the above intents are group
A retrieval action uses the output of a :ref:`response-selector` component from NLU which learns a
retrieval model to predict the correct response from a list of candidate responses given a user message text.


.. _retrieval-training-data:

Training Data
^^^^^^^^^^^^^

Expand Down Expand Up @@ -95,6 +98,10 @@ This is a key difference to the response templates in your domain file.
to the training process. The contents of it cannot be a part of the file which contains training data for other
components of NLU.

.. note::
``/`` symbol is reserved as a delimiter to separate retrieval intents from a response identifier. Make sure not to
use it as part of the name of your intents.

Config File
^^^^^^^^^^^

Expand Down
6 changes: 6 additions & 0 deletions docs/core/stories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ to predict the next action based on a *combination* of both the intent and
entities (you can, however, change this behavior using the
:ref:`use_entities <use_entities>` attribute).

.. warning::
``/`` symbol is reserved as a delimiter to separate retrieval intents from a response identifier.
Refer to ``Training Data Format`` section of :ref:`retrieval-actions` for more details on this format.
If any of the intent names contain the delimiter, the file containing these stories will be considered as a training
file for :ref:`response-selector` model.

Actions
~~~~~~~
While writing stories, you will encounter two types of actions: utterances
Expand Down
4 changes: 4 additions & 0 deletions docs/nlu/training-data-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ Lookup tables may be specified either directly as lists or as txt files containi
.. note::
The common theme here is that common examples, regex features and lookup tables merely act as cues to the final NLU model by providing additional features to the machine learning algorithm during training. Therefore, it must not be assumed that having a single example would be enough for the model to robustly identify intents and/or entities across all variants of that example.

.. note::
``/`` symbol is reserved as a delimiter to separate retrieval intents from a response identifier. Make sure not to
use it as part of the name of your intents.

JSON Format
-----------

Expand Down
3 changes: 2 additions & 1 deletion rasa/nlu/training_data/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def _load(filename: Text, language: Optional[Text] = "en") -> Optional["Training
if fformat == UNK:
raise ValueError("Unknown data format for file '{}'.".format(filename))

logger.debug("Training data format of '{}' is '{}'.".format(filename, fformat))
reader = _reader_factory(fformat)

if reader:
Expand Down Expand Up @@ -174,6 +173,8 @@ def guess_format(filename: Text) -> Text:
guess = fformat
break

logger.debug("Training data format of '{}' is '{}'.".format(filename, guess))

return guess


Expand Down

0 comments on commit c41d72f

Please sign in to comment.