# Response is empty for text containing entity

**URL:** <https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994>\
**Category:** Rasa Open Source\
**Created:** [October 18, 2019, 5:17am UTC](https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994 "2019-10-18T05:17:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thinkingmonks](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@thinkingmonks](https://forum.rasa.com/u/thinkingmonks)\
**Post date:** [October 18, 2019, 5:17am UTC](https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994/1 "2019-10-18T05:17:16Z")

</div>

- I trianed my rasa model, i am able to get the response for normal inputs.
- When I give sentence which contains entity, the response is empty.

## nlu.md

```auto
## intent:defect_quantity
- what is the defect quantity for [2018](year)

```

## stories.md

```auto
## get defect quantity 01
* greet
  - utter_greet
* defect_quantity
  - utter_defect_quantity
* goodbye
  - utter_goodbye    

```

## user input

```auto
hi
what is the defect quantity of 2017
bye

```

## bot response

```auto
[{'recipient_id': 'default', 'text': 'Hey there! Wassup?'}]
[]
[]

```

I do not know why I am getting empty response when the entity is present in the input.

---

<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:** [October 23, 2019, 11:13am UTC](https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994/2 "2019-10-23T11:13:24Z")

</div>

This is likely because your `defect_quantity` intent is featurizing the entities, so you are on a story path not covered in your stories. You have 2 options:

if whether or not the entity is picked up matters, (i.e. if they don’t provide it you should ask for it), you would want to do something like

```auto
## get defect quantity 01
* greet
  - utter_greet
* defect_quantity{"year": 2018}
  - utter_defect_quantity
* goodbye
  - utter_goodbye    

## get defect quantity 01
* greet
  - utter_greet
* defect_quantity
  - utter_ask_year
* inform{"year": 2018"}
  - utter_defect_quantity
* goodbye
  - utter_goodbye    

```

if the same action is performed regardless of if you provide a year or not, then you can unfeaturize entities for the intent:

```auto
intents:
- defect_quantity:
    use_entities: []

```

which essentially does the same as providing the story

```auto
## get defect quantity 01
* greet
  - utter_greet
* defect_quantity OR defect_quantity{"year": 2018}
  - utter_defect_quantity
* goodbye
  - utter_goodbye    

```

but for all possible entities and combinations of entities.

---

<div class="post-metadata">

**Author:** ![thinkingmonks](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@thinkingmonks](https://forum.rasa.com/u/thinkingmonks)\
**Post date:** [October 30, 2019, 6:21am UTC](https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994/3 "2019-10-30T06:21:03Z")

</div>

Thank you for the response. I followed the last approched and now it respond the standard output message. But i am not pass the value with the response. Take for example 1000 is the defect quantity , I am not able to pass them as the response. how to pass the value 1000 using dispatcher. I used dispatcher.utter\_message() but i am not getting this in response for the agent.handle\_text()

---

<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:** [October 30, 2019, 4:37pm UTC](https://forum.rasa.com/t/response-is-empty-for-text-containing-entity/19994/4 "2019-10-30T16:37:06Z")

</div>

Can you post an example of how you are using the dispatcher to utter it, as well as the response you are receiving and the response you want to receive?
