Hi , I have developed simple faq bot with rasa using Response selector and It is working fine . But when I implement Fallback Policy in the same and if a user asks anything which is not in the training questions it does not return with the default answer. Instead it gives one answer of faq question. Please let me know how to implement it correctly.
Stories file:
happy path
- Greet
- utter_greet
- faq
- respond_faq
- Bye
- utter_bye
Some question from FAQ
- faq
- respond_faq
- Bye
- utter_bye
Some random question
- Greet
- utter_greet
- faq
- utter_default
- Bye
- utter_bye
In Responses.md file I have written all the rsponses
Configuration for Rasa NLU.
Components
language: en pipeline:
- name: SpacyNLP model: “en_core_web_md”
- 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: 200
Configuration for Rasa Core.
Policies
policies:
- name: TEDPolicy
- name: MemoizationPolicy max_history: 1
- name: MappingPolicy
- name: FallbackPolicy nlu_threshold: 0.90 core_threshold: 0.80
–Domain File
intents:
- Greet
- Bye
- faq
actions:
- respond_faq
- utter_greet
- utter_bye
- utter_default
responses: utter_greet:
- text: “Hey! How are you?”
utter_bye:
- text: “Good bye , Have an Nice Day”
utter_default:
- text: “Sorry I dont have answer for that.”
session_config: session_expiration_time: 01 carry_over_slots_to_new_session: false
Kindly let me know what changes I have to do to have fallback implemented