# Getting wrong intent on garbage input

**URL:** <https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494>\
**Category:** Rasa Open Source\
**Created:** [March 24, 2020, 2:43pm UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494 "2020-03-24T14:43:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Athar](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Athar](https://forum.rasa.com/u/Athar)\
**Post date:** [March 24, 2020, 2:43pm UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/1 "2020-03-24T14:43:15Z")

</div>

I have created a simple bot in German language. It only handles intents like greet, you are welcome, bye. On random garbage input am getting wrong intent name instead of fallback policy. For example when input is ‘kikjk’ it utters you are welcome response. Any help would be appreciated thanks.[nlu.md](https://forum.rasa.com/uploads/short-url/4krpiv2QGaaTE6lF70aiFnhSumb.md) (1.2 KB) [stories.md](https://forum.rasa.com/uploads/short-url/ydGa1gPjdnh9casInesaU0o4Cxj.md) (636 Bytes) [config.yml](https://forum.rasa.com/uploads/short-url/a4k9oi8a8IjteykEG9yGdJLjNL4.yml) (1 KB) [domain.yml](https://forum.rasa.com/uploads/short-url/6TDRV7JJWc6cWaMKjUNaLn5zDVu.yml) (2.1 KB)

---

<div class="post-metadata">

**Author:** ![rctatman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rctatman/32/6734_2.png) [@rctatman](https://forum.rasa.com/u/rctatman)\
**Post date:** [March 30, 2020, 9:10pm UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/2 "2020-03-30T21:10:17Z")

</div>

Hi Athar! Welcome to the Rasa forums. It’s a little difficult to pinpoint exactly what’s going wrong without seeing the log, but it sounds like the NLU is not identifying the intent correctly. Have you tried adjusting the nlu\_threshold to see if that makes a difference? A higher threshold means that your system will use the fallback policy more often because it needs to be more certain before proceeding.

---

<div class="post-metadata">

**Author:** ![IgNoRaNt23](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ignorant23/32/8029_2.png) [@IgNoRaNt23](https://forum.rasa.com/u/IgNoRaNt23)\
**Post date:** [March 31, 2020, 6:17am UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/3 "2020-03-31T06:17:11Z")

</div>

Don’t expect the bot to know what garbage is, when you don’t train him to recognize garbage. The bot will still try to match your input to the most likely intent.

There are certain errors in your training data:

- am 12.04.2020 um 9 Uhr unter der Nummer [01771827422] -\> don’t label times when you use duckling to extract it. These labels are meant for EntityExtractors to learn. Duckling is rule based and doesn’t need those. Furthermore these will get in conflict with ducklings entity extractor. The phone number also doesn’t have a phone-number label.

Your phone-number regex does not cover all your phone-number cases.

---

<div class="post-metadata">

**Author:** ![Athar](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Athar](https://forum.rasa.com/u/Athar)\
**Post date:** [March 31, 2020, 11:22am UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/4 "2020-03-31T11:22:01Z")

</div>

Thanks for replying. Yes i did tweak a bit with threshold. Its working now, i only needed to add more training data. I created an out\_of\_scope intent and added some examples. Its working now.

---

<div class="post-metadata">

**Author:** ![Athar](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Athar](https://forum.rasa.com/u/Athar)\
**Post date:** [March 31, 2020, 11:24am UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/5 "2020-03-31T11:24:19Z")

</div>

Thanks for pointing out the errors. I understand now that there is no need to add entity examples for Duckling or Spacy.

---

<div class="post-metadata">

**Author:** ![rctatman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rctatman/32/6734_2.png) [@rctatman](https://forum.rasa.com/u/rctatman)\
**Post date:** [March 31, 2020, 3:33pm UTC](https://forum.rasa.com/t/getting-wrong-intent-on-garbage-input/26494/6 "2020-03-31T15:33:18Z")

</div>

Glad to hear you’ve got it working! There’s definitely a bit of a learning curve with your first bot. 😁
