Nlu_fallback not working in rasa2.1.2 in my sample application

Hi Team, I try to implement fallback policy as per rasa documentation.I have created rasa sample project in rasa 2.1.2 and added extra intent in nlu file.

  • intent: out_of_scope

    examples: |

    • I want to order food

    • What is your age?

    • How to buy a phone?

in rule.yml file:

  • rule: out-of-scope

    steps:

    • intent: nlu_fallback

    • action: utter_out_of_scope

domain.yml file: intent section: out_of_scope

response section: utter_out_of_scope:

- text: Sorry, I didn't get what you said. Please rephrase what you said.

config.yml file: pipeline section:

  • 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.5

      ambiguity_threshold: 0.1

policis section:

  • name: MemoizationPolicy

    • name: TEDPolicy

      max_history: 5

      epochs: 100

    • name: RulePolicy

Please help to sort out this issue. Regards, subbu.

@subbu_y80,did you retrain your model? Check out the docs about how to implement fallback.

Hi @marcos.allysson, I tried as per the rasa documentation, Still facing same issue. Can you please suggest me is there any other way to sort out this issue.

thanks, subbu.

you could run rasa shell --debug to check what intent your assistant is recognizing. Even run rasa interactive and teach your bot what kind of expressions are out of scope and how it should respond …