# Incorrect intent recognition for similar words in rasa nlu

**URL:** <https://forum.rasa.com/t/incorrect-intent-recognition-for-similar-words-in-rasa-nlu/15341>\
**Category:** Rasa Open Source\
**Created:** [September 6, 2019, 1:53pm UTC](https://forum.rasa.com/t/incorrect-intent-recognition-for-similar-words-in-rasa-nlu/15341 "2019-09-06T13:53:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![piyush29programmer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/piyush29programmer/32/4050_2.png) [@piyush29programmer](https://forum.rasa.com/u/piyush29programmer)\
**Post date:** [September 6, 2019, 1:53pm UTC](https://forum.rasa.com/t/incorrect-intent-recognition-for-similar-words-in-rasa-nlu/15341/1 "2019-09-06T13:53:50Z")

</div>

When the user asks **out\_of\_scope** question which contains some keyword(helping words to construct the sentence) which is used in defined intent then it chooses the defined intent(I have not used any entity approach).

config.yml

```
# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline: supervised_embeddings

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
    max_history: 5
  - name: KerasPolicy
    epochs: 400
    batch_size: 100
    validation_split: 0.2
    max_history: 5
  - name: MappingPolicy
  - name: "FallbackPolicy"
    nlu_threshold: 0.7
    core_threshold: 0.5
    fallback_action_name: "action_default_fallback"

```

Below is my intent

```
intent: ask_faq_how_many _vegetarian_restaurants_are_there_nearby
- how many vegetarian restaurants are there nearby
- vegetarian restaurants near by
- please tell me how many vegetarian restaurants are there

```

If the user asks :

1. “what vegetarian food option do i have”?
2. “do you like vegetarian food”?
3. “vegetarian food”

then the nlu pick ask\_faq\_how\_many \_vegetarian\_restaurants\_are\_there\_nearby as intent .

Above 3 questions are not related to any intent and user can have many other chitchats using above keyword and training it all keyword might take a long time. Is there any way we can tell nlu to not to pick intent just based on a few keywords?

---

<div class="post-metadata">

**Author:** ![piyush29programmer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/piyush29programmer/32/4050_2.png) [@piyush29programmer](https://forum.rasa.com/u/piyush29programmer)\
**Post date:** [September 9, 2019, 2:14pm UTC](https://forum.rasa.com/t/incorrect-intent-recognition-for-similar-words-in-rasa-nlu/15341/2 "2019-09-09T14:14:48Z")

</div>

Can anybody please help

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [September 9, 2019, 3:09pm UTC](https://forum.rasa.com/t/incorrect-intent-recognition-for-similar-words-in-rasa-nlu/15341/3 "2019-09-09T15:09:33Z")

</div>

In order for an algorithm to understand the difference, you need to provide another intent so that it learns to predict `ask_faq_how_many` only if “how many” words are present
