Model Configuration

You are viewing documentation for our open source project which is maintained by the community. If you want to get started building assistants with Rasa please check out our latest documentation here.

The recipe key allows for different types of config and model architecture. Currently, "default.v1" and the experimental "graph.v1" recipes are supported.

New in 3.5

The config file now includes a new mandatory key assistant_id which represents the unique assistant identifier.

The assistant_id key must specify a unique value to distinguish multiple assistants in deployment. The assistant identifier will be propagated to each event's metadata, alongside the model id. Note that if the config file does not include this required key or the placeholder default value is not replaced, a random assistant name will be generated and added to the configuration everytime when running rasa train.

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 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:

recipe: default.v1

assistant_id: example_bot

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:

recipe: default.v1

assistant_id: example_bot

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.