Start if conversation

Hi,

I have few intents.

But what I want is, at the start of conversation not matter what is being asked I want to always give welcome message.

I tried few things to achieve this but didn’t work.

  • rule: rule-3 conversation_start: true steps:
    • intent: product_price
    • action: utter_greet

For example in my story if at any other places for same intent I want different action. But then it says contradicting rule and story.

Please note - user can start conversation literally by anything and I always want to greet with welcome message.

How do I do this?

Have you considered greeting the user before they even start talking to the bot?

I have resolved this using slots.

For every intent I have these story:

  • story: -story-1 steps:

    • slot_was_set:
      • start_conv: false
    • intent: greet
    • action: action_greet
  • story: -story-2 steps:

    • slot_was_set:
      • start_conv: false
    • intent: goodbye
    • action: action_greet
  • story: -story-3 steps:

    • slot_was_set:
      • start_conv: false
    • intent: product_price
    • action: action_greet

Now every real story always starts with this:

  • story: onroad_price greet1 steps:

    • slot_was_set:
      • start_conv: true
    • intent: onroad_price
    • action: action_onroad_price_query
    • intent: assert_yes
    • action: action_onroad_price_answer
  • story: onroad_price greet2 steps:

    • slot_was_set:
      • start_conv: true
    • intent: onroad_price
    • action: action_onroad_price_query
    • intent: assert_no
    • action: utter_more_help

Cool, I think that’s a good way to do it when you have a small number of intents. I think rasa has something similar in rules… for rules that only apply at the beginning of conversations, you can use conversation_start: true