This is documentation for Rasa & Rasa Pro Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
UnexpecTEDIntentPolicy has the same model architecture as
The difference is at a task level. Instead of predicting the next probable action, this policy predicts whether the last predicted intent is a likely intent according to the training stories and conversation context.
Declares instance variables with default values.
Gets the class of the model architecture to be used by the policy.
Computes quantile scores for prediction of
Multiple quantiles are computed for each label
so that an appropriate threshold can be picked at
inference time according to the
tolerance value specified.
model_data- Data used for training the model.
label_ids- Numerical IDs of labels for each data point used during training.
Feeds the featurized training data to the model.
model_data- Featurized training data.
label_ids- Label ids corresponding to the data points in
label_ids is None as it's needed for
running post training procedures.
Predicts the next action the bot should take after seeing the tracker.
tracker- Tracker containing past conversation events.
domain- Domain of the assistant.
interpreter- Interpreter which may be used by the policies to create additional features.
The policy's prediction (e.g. the probabilities for the actions).
Persists model's utility attributes like model weights, etc.
model_path- Path where model is to be persisted
Follows TED's model architecture from https://arxiv.org/abs/1910.00486.
However, it has been re-purposed to predict multiple labels (intents) instead of a single label (action).
Returns the dot-product loss layer to use.
Multiple intents can be valid simultaneously, so
IntentTED uses the
The loss layer that is used by
Computes model's predictions for input data.
model_data- Data to be passed as input
Predictions for the input data.