I have tried to follow the guide on Fallback and Human Handoff, but I couldnt manage to setup my TwoStageFallback. Currently when the NLU_threshold is not met, my chatbot just responds with utter_default. But I expect it to ask the user to rephrase their message. My files look like this :
domain.yml
responses:
utter_out_of_scope:
- text: Sorry, das ist out of scope
utter_ask_rephrase:
- text: Sorry, das habe ich nicht ganz verstanden. Kannst du das nochmal anders formulieren?
utter_default:
- text: Es tut mir leid, ich kann dir nicht weiterhelfen
....
config.yml
# The config recipe.
# https://rasa.com/docs/rasa/model-configuration/
recipe: default.v1
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: de
pipeline:
- name: SpacyNLP
model: "de_core_news_lg"
- name: SpacyTokenizer
- name: SpacyFeaturizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: "word"
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
- name: FallbackClassifier
threshold: 0.45
# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: RulePolicy
- name: UnexpecTEDIntentPolicy
max_history: 5
epochs: 30
- name: TEDPolicy
max_history: 5
epochs: 30
constrain_similarities: true
rules.yml
version: "3.0"
rules:
- rule: Say goodbye anytime the user says goodbye
steps:
- intent: goodbye
- action: utter_goodbye
- rule: Implementation of Two-Stage-Fallback
steps:
- intent: nlu_fallback
- action: action_two_stage_fallback
- active_loop: action_two_stage_fallback
- rule: out-of-scope
steps:
- intent: out_of_scope
- action: utter_out_of_scope
How do I get the described dialog where the user is asked to rephrase his message twice?