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
Policies
The rasa.core.policies.Policy class decides which action to take at every step in the conversation.
Configuring Policies
- Max History: This controls how much dialogue history the model looks at to decide which action to take next.
- Action Selection: At every turn, each policy in your configuration will predict a next action with confidence. The bot’s next action is decided by the policy that predicts with the highest confidence.
Keras Policy
The KerasPolicy uses a neural network implemented in Keras to select the next action.
def model_architecture(...):
...
Fallback Policy
The FallbackPolicy invokes a fallback action if the intent recognition has a confidence below nlu_threshold.
| Parameter | Description |
|---|---|
nlu_threshold |
Min confidence needed to accept an NLU prediction. |
core_threshold |
Min confidence needed to accept an action prediction from Rasa Core. |
fallback_action_name |
Name of the fallback action to be called. |
Form Policy
The FormPolicy is an extension that 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.