# How to extract multiple values for one slot in same intent?

**URL:** <https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842>\
**Category:** Rasa Open Source\
**Created:** [March 31, 2020, 5:40pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842 "2020-03-31T17:40:13Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 31, 2020, 7:13pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/21 "2020-03-31T19:13:04Z")

</div>

I’ve set in config that 0.7 is the limit, so 0.71 has passed but he isn’t extracting entities, why could that be?

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [March 31, 2020, 7:14pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/22 "2020-03-31T19:14:15Z")

</div>

Can you show me ur `config.yml` file configuration?

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 31, 2020, 7:15pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/23 "2020-03-31T19:15:27Z")

</div>

```
# Configuration for Rasa NLU.

# https://rasa.com/docs/rasa/nlu/components/

language: en

pipeline:

  - name: WhitespaceTokenizer

  - name: RegexFeaturizer

  - name: LexicalSyntacticFeaturizer

  - name: CountVectorsFeaturizer

  - name: CountVectorsFeaturizer

    analyzer: "char_wb"

    min_ngram: 1

    max_ngram: 4

  - name: DIETClassifier

    epochs: 100

  - name: EntitySynonymMapper

  - name: ResponseSelector

    epochs: 100

# Configuration for Rasa Core.

# https://rasa.com/docs/rasa/core/policies/

policies:

  - name: MemoizationPolicy

  - name: TEDPolicy

    max_history: 5

    epochs: 100

  - name: TwoStageFallbackPolicy

    nlu_threshold: 0.65

  - name: MappingPolicy
```

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [March 31, 2020, 7:18pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/24 "2020-03-31T19:18:02Z")

</div>

Configuration seems to be fine, can you just test your utterances using the below command and let me know the output:

> rasa shell nlu

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 31, 2020, 7:19pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/25 "2020-03-31T19:19:36Z")

</div>

> [@JiteshGaikwad](#):
>
> rasa shell nlu

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/8/87cae45bfd2229b099aae31803f6e5e63a1bfd48.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/f/fc461304dd398bdc1c3094f99b1e7ac64bc94e2f.png)

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [March 31, 2020, 7:21pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/26 "2020-03-31T19:21:38Z")

</div>

The problem is with your Rasa nlu model it’s not able to predict the entity.

---

<div class="post-metadata">

**Author:** ![rasafan](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@rasafan](https://forum.rasa.com/u/rasafan)\
**Post date:** [March 31, 2020, 7:22pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/27 "2020-03-31T19:22:12Z")

</div>

Do you have any idea why is that?

I’ve tried training again and noticed that my entity “ingredients” isn’t being registered at all, why is that?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/1ad1de1945d314e925071d5358d8b45f8395959e.png)

I made a new project with this entity “ingredients”, copied all the code and it extracts the entities, it just doesn’t work in my project? Do you have any idea why could it that be?

---

<div class="post-metadata">

**Author:** ![shubhamnatraj](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shubhamnatraj/32/2091_2.png) [@shubhamnatraj](https://forum.rasa.com/u/shubhamnatraj)\
**Post date:** [May 19, 2020, 9:52am UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/28 "2020-05-19T09:52:18Z")

</div>

@rasafan @JiteshGaikwad I have a similar issue but not related to slots, just entity extraction.

When I give the utterance “i have bacon berries baguette”

I get my output as one entity

```
"entity": "ingredients",
      "start": 7,
      "end": 29,
      "confidence_entity": 0.9851168036734895,
      "value": "bacon berries baguette",
      "extractor": "CRFEntityExtractor"

```

Any idea how I could get the three separate ingredients out of it ?

---

<div class="post-metadata">

**Author:** ![noman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/noman/32/10071_2.png) [@noman](https://forum.rasa.com/u/noman)\
**Post date:** [July 8, 2020, 1:10pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/29 "2020-07-08T13:10:56Z")

</div>

Hi @Tobias_Wochinger facing the similar problem @shubhamnatraj has mentioned. Can you please share your insights on the issue as how can we get them as three separate ingredients entities i.e. ‘bacon’ ‘berries’ ‘baguette’ instead of one single entity as “bacon berries baguette”. Thanks

---

<div class="post-metadata">

**Author:** ![Tobias\_Wochinger](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tobias_wochinger/32/4580_2.png) [@Tobias\_Wochinger](https://forum.rasa.com/u/Tobias_Wochinger)\
**Post date:** [July 10, 2020, 7:19am UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/30 "2020-07-10T07:19:45Z")

</div>

@noman @shubhamnatraj Your bug seems to be related to your training data. Can you show your `nlu.md` file? Each entity has to be annotated separately, e.g.

```auto
## my intent
- [bacon](ingredient) [berries](ingredient) [baguette](ingredient)
```

---

<div class="post-metadata">

**Author:** ![shubhamnatraj](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/shubhamnatraj/32/2091_2.png) [@shubhamnatraj](https://forum.rasa.com/u/shubhamnatraj)\
**Post date:** [July 10, 2020, 2:31pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/31 "2020-07-10T14:31:46Z")

</div>

@Tobias_Wochinger, yes, the data has been annotated separately. I made another post on this topic a while back and @Tanja confirmed that this is expected behaviour. When multiple instances of the same entity are picked up in a row, they are concatenated by default. Doesn’t happen if I put an ‘and’ in between.

---

<div class="post-metadata">

**Author:** ![noman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/noman/32/10071_2.png) [@noman](https://forum.rasa.com/u/noman)\
**Post date:** [July 11, 2020, 11:39am UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/32 "2020-07-11T11:39:17Z")

</div>

@Tobias_Wochinger i have also annotated entities separately as you have mentioned. @shubhamnatraj can you point me to that post? and also can we stop this default rasa behaviour?. Thanks

---

<div class="post-metadata">

**Author:** ![heoheoheovt31](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/heoheoheovt31/32/12489_2.png) [@heoheoheovt31](https://forum.rasa.com/u/heoheoheovt31)\
**Post date:** [April 1, 2021, 3:55pm UTC](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842/33 "2021-04-01T15:55:30Z")

</div>

Did you solved it? I 'm facing the same mistake. You can help me. Thanks.

[Previous page](https://forum.rasa.com/t/how-to-extract-multiple-values-for-one-slot-in-same-intent/26842.md?page=1)
