Slots in stories

HI

I am bit confusing with slot setting in stories my doubt is that why we have to define same stories again for different state slots(here will state slots acts like if condition) instead of writing same story again for other states is there any other why in which we can execute all states in one story.

ex:

story6

  • access_eoi
  • action_login
  • slot{“value” : “0”}
  • action_eoi_msg
  • utter_grpyn
  • no
  • utter_state
  • statekey{“state”:“NV”}
  • utter_key
  • action_state_msg
  • utter_ans
  • yes
  • utter_any
  • no
  • action_reset_slot
  • utter_rate

story7

  • access_eoi
  • action_login
  • slot{“value” : “0”}
  • action_eoi_msg
  • utter_grpyn
  • no
  • utter_state
  • statekey{“state”:“GA”}
  • utter_key
  • action_state_msg
  • utter_ans
  • yes
  • utter_any
  • no
  • action_reset_slot
  • utter_rate

if you look at the above stories here all the steps are same only difference is slot value my doubt is that will slot value acts like if condition so that if we get NV story 6 will execute and if we get GA story 7 will execute.

Can i also define story like below covering all states(here statekey intent contains all states)

story7

  • access_eoi
  • action_login
  • slot{“value” : “0”}
  • action_eoi_msg
  • utter_grpyn
  • no
  • utter_state
  • statekey
  • utter_key
  • action_state_msg
  • utter_ans
  • yes
  • utter_any
  • no
  • action_reset_slot
  • utter_rate

Thanks, Surya.

Can any one please clarify my doubt

Hi there @surya1994, what is your slot_type for each slot you want to act as a condition? How it affects the story changing depends on the slot type. More information can be found here: Slots

Thanks for your response Here i mentioned slot type as text here for every state flow is same there is no separate flow for each state so i tried to do all these cases in single story but when i do like that it is showing very low accuracy with respect to next action but if i write single story for each state it accuracy related to next action get increased could you please explain why it is behaving like this. example: for single story accuracy level for * utter_state is 0.45 for each separate story with respect to state * utter_state is 0.71 should we require more stories even though the flow is same for all states(duplication of stories)

Can any one please solve my problem

You shouldn’t have to create multiple stories if the dialogue flow does not change. What is your policy configuration? If you’ve written your stories correctly, most action prediction should be invoked by the MemoizationPolicy with confidence 1, not lower.

Thanks Below is the policies in my config.yml file

Configuration for Rasa NLU.

Components

language: en pipeline: supervised_embeddings

Configuration for Rasa Core.

Policies

policies:

  • name: MemoizationPolicy
  • name: KerasPolicy
  • name: MappingPolicy
  • name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “action_default_fallback” should i have to mention max_history in MemoizationPolicy

some times i am also facing with the below issue when i try to execute following story with out - slot{“state” : “Value”}

  • access_eoi
  • action_login
  • slot{“value” : “0”}
  • action_eoi_msg
  • utter_grpyn
  • yes
  • utter_gpr
  • gp_no
  • action_get_gpno
  • action_state_msg
  • utter_ans
  • yes
  • utter_any
  • no
  • action_reset_slot
  • utter_rate

issue: some times it is saying slot{“state” : “Value”} needs to be set in stories

Yes, if you have a text slot, whether it is set or not (regardless of what it is set to) will affect your dialogue flow, so you should include it in the stories. If the slot being set truly doesn’t matter, you can set them to unfeaturized.

How many stories do you have of different paths (i.e. differ in ways other than slot values?)