rasa-nlurasarasa-corerasa-xrasa-sdk

Why is my Fallback Intent and FallbackClassifier not working in Rasa?


I have mentioned it in my pipeline in the config.yml file, that I will be using the FallbackClassifier.

So my code looks like:

language: en
pipeline:
  - name: FallbackClassifier
    threshold: 0.7
    ambiguity_threshold: 0.1

However, I receive this error, when I try to run it:

InvalidConfigException: The pipeline configuration contains errors. The component 'FallbackClassifier' requires 'IntentClassifier' to be placed before it in the pipeline. Please add the required components to the pipeline.

Solution

  • the FallbackClassifier steps in when the IntentClassifier is not confident about the intent. so you cant use the Fallback classifier without using an Intentclassifier.

    you can choose an IntentClassifier from this https://rasa.com/docs/rasa/components/#intent-classifiers

    the most simple Intentclassifier is the "KeywordIntentClassifier" but it wont be a great choice if the bot is expected to make complicated Conversations.

    this as an Example of a working Pipeline using the Fallbackclassifier:

    language: "en"
    
    pipeline:
     - name: "WhitespaceTokenizer"
     - name: "CountVectorsFeaturizer"
     - name: "DIETClassifier"
     - name: FallbackClassifier
        threshold: 0.7
        ambiguity_threshold: 0.1