Fallback problem - Rasa

Hi everyone, I’m working on building a chatbot with Rasa. I set up a fallback, and it worked fine initially. However, after adding more data and stories, I’ve noticed that when I launch Rasa Shell and test with random or incorrect questions, the chatbot gives random responses instead of falling back to the default action.

Here’s my policy configuration: policies:

  • name: MemoizationPolicy
  • name: TEDPolicy max_history: 5 epochs: 200 constrain_similarities: True
  • name: RulePolicy core_fallback_threshold: 0.7 core_fallback_action_name: “action_default_fallback” enable_fallback_prediction: True

And my fallback rule: rules:

  • rule: Fallback when the intent is unclear steps:
    • intent: nlu_fallback
    • action: action_default_fallback

I’d like to understand why my chatbot is giving random responses instead of using the fallback when it doesn’t understand the input.Thanks in advance!

1 Like

did you try “rasa shell -debug”? It can give some answers

ok, I found myself having similar problem, but I thing I found solution for myself: How to create default response? - Rasa Open Source - Rasa Community Forum

imporant for me whas to have specific config.yml, maybie you hanged something in there after first creation? try to create different project and try to make this fallback again than compere test project to you project

ok this is my config.yml

pipeline:

  • name: SpacyNLP model: “fr_core_news_md”
  • name: SpacyTokenizer
  • name: RegexFeaturizer
  • name: LexicalSyntacticFeaturizer
  • name: CountVectorsFeaturizer
  • name: CountVectorsFeaturizer
    min_ngram: 1 max_ngram: 4
  • name: SpacyFeaturizer
    use_lemmatization: true
  • name: DIETClassifier epochs: 200 tensorboard_log_directory: “.tensorboard”
  • name: EntitySynonymMapper
  • name: RegexEntityExtractor
  • name: ResponseSelector
    epochs: 200 tensorboard_log_directory: “.tensorboard”

policies:

  • name: MemoizationPolicy
  • name: TEDPolicy max_history: 5 epochs: 200 constrain_similarities: True
  • name: RulePolicy core_fallback_threshold: 0.4 core_fallback_action_name: “action_custom_fallback” enable_fallback_prediction: True

did it worked with no “FallbackClassifier” from the begining? Fallback and Human Handoff (rasa.com)

documentations says that there must be this thing :confused:

tbh I found myself having similar problem, I created one project where fallback is up and running even now, I added only lookup tables to second one and wanted to add fallback, I thing problem is inside cofing.yml but I do not know what should be used in order to make everything run

1 Like

I managed to fix the issue by adding these lines of code to the pipeline:

- name: FallbackClassifier
  threshold: 0.7

Thank you sm for your help!

1 Like

no problem, can you please mark my answer as a solution? :smiley: