# Rasa X entity

**URL:** <https://forum.rasa.com/t/rasa-x-entity/14526>\
**Category:** Rasa Open Source\
**Created:** [August 19, 2019, 7:06pm UTC](https://forum.rasa.com/t/rasa-x-entity/14526 "2019-08-19T19:06:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kacperlsky](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kacperlsky/32/4618_2.png) [@kacperlsky](https://forum.rasa.com/u/kacperlsky)\
**Post date:** [August 19, 2019, 7:06pm UTC](https://forum.rasa.com/t/rasa-x-entity/14526/1 "2019-08-19T19:06:20Z")

</div>

Hello, I created in Rasa X new NLU training intents: -my name is Albert - “Albert” is marked as an “name\_entity” -I am John - John is marked as an name\_entity etc. in responses I added: -nice to meet you {name\_entity} ! in stories it is written that after intent name(my name…) it should respond with utter\_name(nice to meet…). While testing, the name\_entity is recognized correctly as Albert or John but instead of replying with the real name the bot is replying with: nice to meet you {name\_entity} ! How to solve it and make bot reply with the name given in user’s message?

---

<div class="post-metadata">

**Author:** ![gcgloven](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/gcgloven/32/3915_2.png) [@gcgloven](https://forum.rasa.com/u/gcgloven)\
**Post date:** [August 20, 2019, 2:46am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/2 "2019-08-20T02:46:05Z")

</div>

You need to code a custom action to allow your bot to reply. Whatever you teaches your bot to reply would be a string only. create a new action in action.py

let’s say it’s action\_reply\_username

in you stories, you just need to write

```
## SAMPLE 
* user_greet{"name":"John"}
     - action_reply_username
```

---

<div class="post-metadata">

**Author:** ![gcgloven](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/gcgloven/32/3915_2.png) [@gcgloven](https://forum.rasa.com/u/gcgloven)\
**Post date:** [August 20, 2019, 2:46am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/3 "2019-08-20T02:46:20Z")

</div>

I am not sure if rasa x has a simpler way,

---

<div class="post-metadata">

**Author:** ![fuih](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fuih](https://forum.rasa.com/u/fuih)\
**Post date:** [August 20, 2019, 3:30am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/4 "2019-08-20T03:30:16Z")

</div>

I’ve been making utter templates as @kacperlsky did and it works fine. Although i have no idea why it didn’t work for him. Did you define the name\_entity slot in **domain.yml** , @kacperlsky ?

---

<div class="post-metadata">

**Author:** ![gcgloven](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/gcgloven/32/3915_2.png) [@gcgloven](https://forum.rasa.com/u/gcgloven)\
**Post date:** [August 20, 2019, 4:00am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/5 "2019-08-20T04:00:22Z")

</div>

Shaz… I didnt know abt that! I will try it later.

---

<div class="post-metadata">

**Author:** ![kacperlsky](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kacperlsky/32/4618_2.png) [@kacperlsky](https://forum.rasa.com/u/kacperlsky)\
**Post date:** [August 20, 2019, 11:36am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/6 "2019-08-20T11:36:56Z")

</div>

I have defined the entity called name\_entity. Is entity and slot the same? If not, how to add slots?

---

<div class="post-metadata">

**Author:** ![fuih](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fuih](https://forum.rasa.com/u/fuih)\
**Post date:** [August 20, 2019, 11:58am UTC](https://forum.rasa.com/t/rasa-x-entity/14526/7 "2019-08-20T11:58:51Z")

</div>

Defining the entity simply let the bot know how to recognise it. The value after that is gonna be stored at a slot with the same name as the entity (normal case).

The {slot\_name} in utter template is actually means value of that slot, so you need to define the corresponding slot in **domain.yml** :

```
slots:
- slot_name
```
