# Intents with the same text

**URL:** <https://forum.rasa.com/t/intents-with-the-same-text/15462>\
**Category:** Rasa Open Source\
**Created:** [September 10, 2019, 9:56am UTC](https://forum.rasa.com/t/intents-with-the-same-text/15462 "2019-09-10T09:56:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rustem](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@rustem](https://forum.rasa.com/u/rustem)\
**Post date:** [September 10, 2019, 9:56am UTC](https://forum.rasa.com/t/intents-with-the-same-text/15462/1 "2019-09-10T09:56:49Z")

</div>

I have 4 intents with the same text:

```auto
> {"intent": "bread-conditions", "text": "Terms & Benefits"},
> {"intent": "wine-conditions", "text": "Terms & Benefits"},
> {"intent": "juice-conditions", "text": "Terms & Benefits"},
> {"intent": "apple-conditions", "text": "Terms & Benefits"}

For every intent I have their own actions, so I differentiate them with writing 4 different stories:
## story-1
* bread
  - utter_bread
* bread-conditions
  - utter_bread-conditions
## story-2
* wine
  - utter_wine
* wine-conditions
  - utter_wine-conditions
## story-3
* juice
  - utter_juice
* juice-conditions
  - utter_juice-conditions
## story-4
* apple
  - utter_apple
* apple-conditions
  - utter_apple-conditions

```

Configuration for Rasa Core:

> ```
> > agent = Agent(path_to_domain, policies=[AugmentedMemoizationPolicy(max_history=2),
> > KerasPolicy(max_history=2,
> > epochs=300,
> > batch_size=64,
> > random_seed=2,
> > validation_split=0.0,
> > featurizer=MaxHistoryTrackerFeaturizer(
> > max_history=2,
> > state_featurizer=BinarySingleStateFeaturizer())),
> > fallback])
> 
> ```

The problem is that bot is not following flow, it goes one of those intents(writed at the beginning) but not to the correct one. Is there any way to overcome this problem ? Or How prioritize RasaCore over RasaNLU?

---

<div class="post-metadata">

**Author:** ![erohmensing](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/erohmensing/32/1789_2.png) [@erohmensing](https://forum.rasa.com/u/erohmensing)\
**Post date:** [September 10, 2019, 12:52pm UTC](https://forum.rasa.com/t/intents-with-the-same-text/15462/2 "2019-09-10T12:52:52Z")

</div>

This i s a problem with how your data is structured. this should just be one intent. Then your stories will look like

```auto
## story-1
* bread
  - utter_bread
* conditions
  - utter_bread-conditions
## story-2
* wine
  - utter_wine
* conditions
  - utter_wine-conditions
## story-3
* juice
  - utter_juice
* conditions
  - utter_juice-conditions
## story-4
* apple
  - utter_apple
* conditions
  - utter_apple-conditions

```

With a max history of 2, Core will look back at the last 2 events (e.g. conditions and utter\_apple) and will know that the combination of those two means that utter\_apple-conditions should come next.
