Version: 2.0.x

Model Configuration

The configuration file defines the components and policies that your model will use to make predictions based on user input.

The language and pipeline keys specify the components used by the model to make NLU predictions. The policies key defines the policies used by the model to predict the next action.

If you don't know which components or policies to choose, you can use the the Suggested Config feature, which will recommend sensible defaults.

Suggested Config

You can leave the pipeline and/or policies key out of your configuration file. When you run rasa train, the Suggested Config feature will select a default configuration for the missing key(s) to train the model.

Make sure to specify the language key in your config.yml file with the 2-letter ISO language code.

Example config.yml file:

language: en
pipeline:
# will be selected by the Suggested Config feature
policies:
- name: MemoizationPolicy
- name: TEDPolicy
max_history: 5
epochs: 10

The selected configuration will also be written as comments into the config.yml file, so you can see which configuration was used. For the example above, the resulting file might look e.g. like this:

language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
# - name: WhitespaceTokenizer
# - name: RegexFeaturizer
# - name: LexicalSyntacticFeaturizer
# - name: CountVectorsFeaturizer
# - name: CountVectorsFeaturizer
# analyzer: char_wb
# min_ngram: 1
# max_ngram: 4
# - name: DIETClassifier
# epochs: 100
# - name: EntitySynonymMapper
# - name: ResponseSelector
# epochs: 100
# - name: FallbackClassifier
# threshold: 0.3
# ambiguity_threshold: 0.1
policies:
- name: MemoizationPolicy
- name: TEDPolicy
max_history: 5
epochs: 10

If you like, you can then un-comment the suggested configuration for one or both of the keys and make modifications. Note that this will disable automatic suggestions for this key when training again. As long as you leave the configuration commented out and don't specify any configuration for a key yourself, a default configuration will be suggested whenever you train a new model.

nlu- or dialogue- only models

Only the default configuration for pipeline will be automatically selected if you run rasa train nlu, and only the default configuration for policies will be selected if you run rasa train core.