notice
This is documentation for Rasa Open Source Documentation v2.0.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.3.x).
rasa.nlu.selectors.response_selector
ResponseSelector Objects
Response selector using supervised embeddings.
The response selector embeds user inputs and candidate response into the same space. Supervised embeddings are trained by maximizing similarity between them. It also provides rankings of the response that did not "win".
The supervised response selector needs to be preceded by
a featurizer in the pipeline.
This featurizer creates the features used for the embeddings.
It is recommended to use CountVectorsFeaturizer
that
can be optionally preceded by SpacyNLP
and SpacyTokenizer
.
Based on the starspace idea from: https://arxiv.org/abs/1709.03856.
However, in this implementation the mu
parameter is treated differently
and additional hidden layers are added together with dropout.
preprocess_train_data
Prepares data for training.
Performs sanity checks on training data, extracts encodings for labels.
Arguments:
training_data
- training data to preprocessed.
process
Return the most likely response, the associated intent_response_key and its similarity to the input.
persist
Persist this model into the passed directory.
Return the metadata necessary to load the model again.
load
Loads the trained model from the provided directory.