Prevent detection of dependent intents such as "affirm" on initial messages

Hello,

I was running the concertbot in the official examples of the Rasa repo. It is a good bot to get a foundational understanding of rasa.

In the bot there are intents like affirm (“yes”, “y”,…) and compare_reviews (“compare reviews”,…).

In the stories (given below), these intents are written after some slots are set like likes_music and concerts.

However, if I say “yes” at the beginning of conversation , the bot still detects and intent. if is say “compare reviews” at the beginning of conversation, the bot detects an intent. (Note: example conversations given below)

I want to prevent these stray intent detections and only detect them on condition that a slot was set. (Note: I understand this can be done with custom actions, but I want to do this with stories)

What would be the best way to do it ?

example stories

- story: how_to_get_started, likes music
    steps:
      - intent: how_to_get_started
      - action: utter_get_started
      - intent: affirm
      - action: action_set_music_preference
      - slot_was_set:
          - likes_music: True
      - action: utter_awesome

- story: compare_reviews_concerts
    steps:
      - intent: search_concerts
      - action: action_search_concerts
      - slot_was_set:
          - concerts: [{ "artist": "Foo Fighters", "reviews": 4.5 }]
      - intent: compare_reviews
      - action: action_show_concert_reviews

example conversations (that I DO NOT want)

-> yes
-> Awesome! You can ask me things like "Find me some concerts" or "What's a good venue"
-> compare
-> venues from slots: None