Problem with rules

HI!

Could someone explain me, why this doesn’t work? I have a rule and a story defined as:

- rule: submit make appointment form
  condition:
    - active_loop: make_appointment_form
  steps:
    - action: make_appointment_form
    - active_loop: null
    - action: utter_make_appointment_slots_values
    - action: utter_ask_data_correctness
    - intent: affirm
    - action: action_submit_make_appointment_form
- story: overall make appointment
  steps:
  - intent: greet+make_appointment
  - action: make_appointment_form
  - active_loop: make_appointment_form
  - active_loop: null
  - action: utter_make_appointment_slots_values
  - action: utter_ask_data_correctness
  - intent: affirm
  - action: action_submit_make_appointment_form
  - intent: affirm
  - action: action_make_appointment

Basically, story extends the rule by intent affirm and a response action. What I don’t get is why ‘action_make_appointment’ doesn’t occur, when ‘affirm’ intent is provided to the bot.

It doesn’t make sense, that you can’t extend a rule in the story… Does it? What am I missing? In debug I can clearly see, that RulePolicy was not able to predict an action, but… Rule policy should be done, when ‘action_submit_make_appointment_form’ occurs.

hi @BarMin - what does your policy config look like? What should happen here is that assuming you have the memoizationpolicy in your config, it should remember this story and just follow it as you go through the conversation.

Hi! Thanks for your response. My policies in config are as follows:

   - name: MemoizationPolicy
   - name: TEDPolicy
     max_history: 5
     epochs: 25
     evaluate_on_number_of_examples: 0
     evaluate_every_number_of_epochs: 5
     tensorboard_log_directory: "./tensorboard"
     tensorboard_log_level: "epoch"
   - name: RulePolicy

Seems correct, yet it’s not working.

@amn41 Any idea’s why that doesn’t work?

Hi @BarMin, two things you can try here:

  1. 25 epochs for TED is not very many, you should bump this up to 100 or even 200
  2. If you know that you always want action_make_appointment to follow
action: action_submit_make_appointment_form
intent: affirm

write another rule with this snippet:

 -  rule: make_appointment
    steps:
    - action: action_submit_make_appointment_form 
    - intent: affirm
    - action: action_make_appointment

I’d start with the first suggestion and see how it goes!