Policies
These docs are for version 1.x of Rasa Open Source.
User Guide
- Installation
- Tutorial: Rasa Basics
- Tutorial: Building Assistants
- Command Line Interface
- Architecture
- Messaging and Voice Channels
- Testing Your Assistant
- Setting up CI/CD
- Validate Data
- Configuring the HTTP API
- Deploying Your Rasa Assistant
- Cloud Storage
NLU
- About
- Using NLU Only
- Training Data Format
- Language Support
- Choosing a Pipeline
- Components
- Entity Extraction
Core
- About
- Stories
- Domains
- Responses
- Actions
- Reminders and External Events
- Policies
- Slots
- Forms
- Retrieval Actions
- Interactive Learning
- Fallback Actions
- Knowledge Base Actions
Conversation Design
API Reference
- Action Server
- HTTP API
- Jupyter Notebooks
- Agent
- Custom NLU Components
- Rasa SDK
- Events
- Tracker
- Tracker Stores
- Event Brokers
- Lock Stores
- Training Data Importers
- Featurization of Conversations
- TensorFlow Configuration
- Migration Guide
- Rasa Open Source Change Log
Migration from (beta)
Reference
Versions
viewing: 1.10.1
Policies
- Configuring Policies
- Action Selection
- Keras Policy
- Embedding Policy
- TED Policy
- Mapping Policy
- Memoization Policy
- Augmented Memoization Policy
- Fallback Policy
- Two-Stage Fallback Policy
- Form Policy
Configuring Policies
The rasa.core.policies.Policy class decides which action to take at every step in the conversation.
There are different policies to choose from, and you can include multiple policies in a single rasa.core.agent.Agent.
Max History
One important hyperparameter for Rasa Core policies is the max_history.
This controls how much dialogue history the model looks at to decide which action to take next.
Data Augmentation
When you train a model, by default Rasa Core will create longer stories by randomly gluing together the ones in your stories files.
Action Selection
At every turn, each policy defined in your configuration will predict a next action with a certain confidence level. For more information about how each policy makes its decision, read into the policy’s description below.
Keras Policy
The KerasPolicy uses a neural network implemented in Keras to select the next action.
Embedding Policy
Warning
EmbeddingPolicywas renamed toTEDPolicy. Please use TED Policy instead ofEmbeddingPolicyin your policy configuration. The functionality of the policy stayed the same.
TED Policy
The Transformer Embedding Dialogue (TED) Policy is described in our paper.
Mapping Policy
The MappingPolicy can be used to directly map intents to actions.
Memoization Policy
The MemoizationPolicy just memorizes the conversations in your training data.
Augmented Memoization Policy
The AugmentedMemoizationPolicy remembers examples from training stories for up to max_history turns.
Fallback Policy
The FallbackPolicy invokes a fallback action if at least one of the following occurs:
- The intent recognition has a confidence below
nlu_threshold. - The highest ranked intent differs in confidence with the second highest ranked intent by less than
ambiguity_threshold. - None of the dialogue policies predict an action with confidence higher than
core_threshold.
Two-Stage Fallback Policy
The TwoStageFallbackPolicy handles low NLU confidence in multiple stages by trying to disambiguate the user input.
Form Policy
The FormPolicy is an extension of the MemoizationPolicy which handles the filling of forms. Once a FormAction is called, the FormPolicy will continually predict the FormAction until all required slots in the form are filled.