Optional item in a story

Hi, I am trying to set up a chatbot, and I want to deal with two kinds of situations in the beginning of a dialog:

  1. The person greets the bot
  2. The person goes straight to business.

My story file is something like this:

## Problem with service
* intent_greet
    - utter_greet
* intent_service_problem
    - utter_here_is_how_you_solve_the_problem

It goes ok if I first greet the bot. But in case I state my problem directly, it either greets the person, or does nothing until I respectively restate the problem or greet the bot. Do I have to repeat the story without greeting intent, or is there some syntax of stories I do not know about?

You should repeat it without the greet intent

To expand on Akela’s answer: RASA uses the stories you give it as examples to generate a conversation it can follow.

You’ve only written a story that starts with a greeting. Thus, RASA has learnt that it MUST start with a greeting. There’s no other way into the conversation.

Therefore, you should add another story that goes like this:

## Problem with service - DIRECT
* intent_service_problem
    - utter_here_is_how_you_solve_the_problem

Now Rasa has 2 stories to choose from. It can either greet someone or directly go to the problem at hand.

If you plan on adding more of these kinds of stories, it may be worth your while to write a story that only greets the user:

## Greeting story
* intent_greet
    - utter_greet

This way, the bot can stitch different stories together.