# How Rasa identify that which story to pick up from story.md file

**URL:** <https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154>\
**Category:** Rasa Open Source\
**Created:** [May 22, 2019, 11:11am UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154 "2019-05-22T11:11:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [May 22, 2019, 11:11am UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154/1 "2019-05-22T11:11:14Z")

</div>

Hi, everyone

I have query that how the rasa framework is able to pick different stories from story.md file.

Or How rasa decide that which story to pick from story.md file?

Can anyone elaborate on that??

---

<div class="post-metadata">

**Author:** ![nickopris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nickopris/32/2816_2.png) [@nickopris](https://forum.rasa.com/u/nickopris)\
**Post date:** [May 22, 2019, 3:18pm UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154/2 "2019-05-22T15:18:15Z")

</div>

Let me have an attempt at explaining this based on my understanding. I’m new to this but maybe it makes sense and if not I hope that one of the Rasa folks will correct me.

Firstly you have an Intent with a few variations that will train to recognise what the user is asking.

The variations of what the user can ask are in your `nlu.md`

```auto
## intent:greet
- hey
- hello
- hi
- good morning
- good evening
- hey there
- Heya
- Hi

```

Intents are in the domain.yml file

```auto
intents:
- affirm
- deny
- greet
- mood_great
- mood_unhappy

```

This intent is listed under one or more of your stories.

Stories are in your stories.md file

```auto
## happy path
* greet
  - utter_greet
* mood_great
  - utter_happy

## sad path 1
* greet
  - utter_greet
* mood_unhappy
  - utter_cheer_up
  - utter_did_that_help
* affirm
  - utter_happy

```

So my assumption is that if you say `Hi` this will fall into the `greet` intent, most likely within the first story that mention it.

Both stories follow up with `utter_great` asking the user to reply about the mood.

Then, depending on the user’s answer this can go into either the `## happy path` story or the `##sad path 1` story.

And so on…

---

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [May 23, 2019, 5:17am UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154/3 "2019-05-23T05:17:11Z")

</div>

Hi @nickopris thanks for your reply. So you are saying that it will look at the two stories simultaneously i.e. Happy path and Sad path and based on user’s next input, it will decide which story is appropriate and accordingly execute that story.

Is my understanding correct?

---

<div class="post-metadata">

**Author:** ![nickopris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nickopris/32/2816_2.png) [@nickopris](https://forum.rasa.com/u/nickopris)\
**Post date:** [May 23, 2019, 8:21am UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154/4 "2019-05-23T08:21:44Z")

</div>

I think so, yes. But I’d like someone more experienced to add to this.

---

<div class="post-metadata">

**Author:** ![prashant\_kamble](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@prashant\_kamble](https://forum.rasa.com/u/prashant_kamble)\
**Post date:** [May 23, 2019, 8:39am UTC](https://forum.rasa.com/t/how-rasa-identify-that-which-story-to-pick-up-from-story-md-file/10154/5 "2019-05-23T08:39:49Z")

</div>

Yes @nickopris. That would be more better I think. let’s see reply from other members.
