I have created 3 forms of ordering a pizza, pasta and ice cream. Forms and extraction of entities are working fine. After form submission i have created denial paths of all three. Model is getting confused and opening ice cream form every time when we deny a request of pizza or pasta. I am sharing my rule.yml, stories.yml and config.yml file.
rule.yml version: “3.1”
rules:
-
rule: Say goodbye anytime the user says goodbye steps:
- intent: goodbye
- action: utter_goodbye
-
rule: Say ‘I am a bot’ anytime the user challenges steps:
- intent: bot_challenge
- action: utter_iamabot
-
rule: Activate Form pizza steps:
- intent: inform_pizza
- action: order_pizza_form
- active_loop: order_pizza_form
-
rule: Submit form pizza condition:
- active_loop: order_pizza_form steps:
- action: order_pizza_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: utter_order_details_pizza
- action: utter_confirm_order
-
rule: Activate Form pasta steps:
- intent: pasta_order
- action: order_pasta_form
- active_loop: order_pasta_form
-
rule: Submit form pasta condition:
- active_loop: order_pasta_form steps:
- action: order_pasta_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: utter_order_details_pasta
- action: utter_confirm_pasta
-
rule: Activate Form icecream steps:
- intent: inform_icecream
- action: order_icecream_form
- active_loop: order_icecream_form
-
rule: Submit form pizza condition:
- active_loop: order_icecream_form steps:
- action: order_icecream_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: utter_order_details_icecream
- action: utter_confirm_icecream
-
rule: utter welcome message anytime in the conversation steps:
- intent: thank_you
- action: utter_welcome_message
stories.yml version: “3.1”
stories:
-
story: greet path steps:
- intent: greet
- action: utter_greet
-
story: place an order path steps:
- intent: place_order
- action: utter_order_details
-
story: Submit pizza form with confirmation path steps:
- action: utter_confirm_order
- intent: affirm
- action: utter_thank_you
- action: action_reset_all_slots
-
story: confirmation of submission denied of pizza path steps:
- action: utter_confirm_order
- intent: deny
- action: utter_confirm_sure
- intent: affirm
- action: action_reset_all_slots
- action: order_pizza_form
- active_loop: order_pizza_form
-
story: pasta confirmation path steps:
- action: utter_confirm_pasta
- intent: affirm
- action: utter_thank_you
- action: action_reset_all_slots
-
story: pasta confirmation denied path steps:
- action: utter_confirm_pasta
- intent: deny
- action: utter_confirm_sure
- intent: affirm
- action: action_reset_all_slots
- action: order_pasta_form
- active_loop: order_pasta_form
-
story: icecream confirmation path steps:
- action: utter_confirm_icecream
- intent: affirm
- action: utter_thank_you
- action: action_reset_all_slots
-
story: confirmation denied icecream path steps:
- action: utter_confirm_icecream
- intent: deny
- action: utter_confirm_sure
- intent: affirm
- action: action_reset_all_slots
- action: order_icecream_form
- active_loop: order_icecream_form
config.yml
The config recipe.
Model Configuration
recipe: default.v1
Configuration for Rasa NLU.
Components
language: en
pipeline:
# No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# If you’d like to customize it, uncomment and adjust the pipeline.
# See Tuning Your NLU Model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer analyzer: char_wb min_ngram: 1 max_ngram: 4
- name: DIETClassifier epochs: 200 constrain_similarities: true
- name: “CRFEntityExtractor”
- name: EntitySynonymMapper
- name: ResponseSelector epochs: 200 constrain_similarities: true
- name: FallbackClassifier threshold: 0.3 ambiguity_threshold: 0.1
Configuration for 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 Policies for more information.
- name: MemoizationPolicy
- name: RulePolicy
- name: UnexpecTEDIntentPolicy max_history: 5 epochs: 200
- name: TEDPolicy max_history: 5 epochs: 200 constrain_similarities: true