Skip to content

Commit

Permalink
Merge 1318e67 into 3a3b290
Browse files Browse the repository at this point in the history
  • Loading branch information
amn41 committed Jul 18, 2018
2 parents 3a3b290 + 1318e67 commit d81c51b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -40,7 +40,7 @@ jobs:
install:
- pip install sphinx==1.7.5 sphinx-autobuild==0.7.1 sphinxcontrib-programoutput==0.11 nbsphinx==0.3.2 sphinxcontrib-httpdomain==1.5.0
- pip install git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com/RasaHQ/sphinxcontrib-versioning.git@version_list
- pip install git+https://${GITHUB_TOKEN}:x-oauth-basic@github.com/RasaHQ/rasabaster.git#egg=rasabaster
- pip install https://storage.googleapis.com/docs-theme/rasabaster-0.7.10.tar.gz
- pip install -e git://github.com/RasaHQ/sphinx_rtd_theme.git#egg=sphinx_rtd_theme
- pip install -e .
- pip list
Expand Down
1 change: 1 addition & 0 deletions alt_requirements/requirements_dev.txt
Expand Up @@ -20,4 +20,5 @@ sphinx-autobuild==0.7.1
sphinxcontrib-versioning==2.2.1
sphinxcontrib-programoutput==0.11
nbsphinx==0.2.18
https://storage.googleapis.com/docs-theme/rasabaster-0.7.10.tar.gz
-e git://github.com/RasaHQ/sphinx_rtd_theme.git#egg=sphinx_rtd_theme
2 changes: 1 addition & 1 deletion docs/entities.rst
Expand Up @@ -60,7 +60,7 @@ Regular Expressions (regex)
^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can use regular expressions to help the CRF model learn to recognize entities.
In the :ref:`dataformat` you can provide a list of regular expressions, each of which provides
In the :ref:`section_dataformat` you can provide a list of regular expressions, each of which provides
the ``ner_crf`` with an extra binary feature, which says if the regex was found (1) or not (0).

For example, the names of German streets often end in ``strasse``. By adding this as a regex,
Expand Down
27 changes: 27 additions & 0 deletions docs/fallback.rst
Expand Up @@ -3,3 +3,30 @@
Confidence and Fallback Intents
===============================


Each of the pipelines will report a ``confidence`` score along with the predicted intent,
and the ``ner_crf`` component will do the same for the extracted entities.

You can use the confidence score to choose when to ignore Rasa NLU's prediction and trigger
fallback behaviour, for example asking the user to rephrase. If you are using Rasa Core,
you can do this using a `Fallback Policy </core/fallbacks/>`_.

Choosing a Confidence Cutoff
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A good way to choose a confidence cutoff is to calculate the model's confidence on a test set,
and compare the confidence values on the correctly and incorrectly predicted examples.

A Note about Confidence Scores
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Always keep in mind that the confidence score is not a true probability that the prediction
is correct, it's just a metric defined by the model that approximately describes how similar
your input was to the training data.

The intent classifier in the ``spacy_sklearn`` pipeline, for example, usually reports very low
confidence numbers, whereas the ``tensorflow_embedding`` pipeline usually provides very high confidences.
One common misconception is that if your model reports high confidence on your training examples,
it is a "better" model. In fact, this usually means that your model is overfitting.


5 changes: 3 additions & 2 deletions docs/pipeline.rst
Expand Up @@ -6,9 +6,10 @@ Pipeline and Component Configuration
.. contents::


The process of incoming messages is split into different components. These components are executed one after another
Incoming messages are processed by a sequence of components. These components are executed one after another
in a so called processing pipeline. There are components for entity extraction, for intent classification,
pre-processing and there will be many more in the future.
pre-processing, and others. If you want to add your own component, for example to run a spell-check or to
do sentiment analysis, check out :ref:`section_customcomponents`.

Each component processes the input and creates an output. The ouput can be used by any component that comes after
this component in the pipeline. There are components which only produce information that is used by other components
Expand Down

0 comments on commit d81c51b

Please sign in to comment.