Warning: This document is for an old version of Rasa Core. The latest version is 0.14.5.


A Policy decides what action to take at every step in a dialogue

class rasa_core.policies.Policy(featurizer: Optional[rasa_core.featurizers.TrackerFeaturizer] = None, priority: Optional[int] = 1)[source]
featurize_for_training(training_trackers: List[rasa_core.trackers.DialogueStateTracker], domain: rasa_core.domain.Domain, **kwargs) → rasa_core.training.data.DialogueTrainingData[source]

Transform training trackers into a vector representation. The trackers, consisting of multiple turns, will be transformed into a float vector which can be used by a ML model.

train(training_trackers: List[rasa_core.trackers.DialogueStateTracker], domain: rasa_core.domain.Domain, **kwargs) → None[source]

Trains the policy on given training trackers.

predict_action_probabilities(tracker: rasa_core.trackers.DialogueStateTracker, domain: rasa_core.domain.Domain) → List[float][source]

Predicts the next action the bot should take after seeing the tracker.

Returns the list of probabilities for the next actions