Entities are not extracted

Hello everyone, i have been working on a small project where i want to extract topic from a sentence to make a article research on this topic. exemple: " i want a document speaking about classification". entities : “classification”. i believe to have set everything wright but when i run rasa shell --debug, the intent is guessed well, but the entities are empy.

here is my config:

version: "2.0"

intents:

  - greet

  - goodbye

  - affirm

  - deny

  - demand:

      use_entities:

       - topic

entities:

  - topic

actions:

  - action_scrapping

slots:

  topic_list:

    type: list

  article_list:

    type: list

here is my intent from where i want to extract my topics

- intent: demand
  examples: |
    - i a looking for an articles about [science] {"entity":"topic","value":"science"}
    - i want a document speaking about [informatics] {"entity":"topic","value":"informatics"}
    - do you have an article about [geology] {"entity":"topic","value":"geology"}?
    - [machine learning] {"entity":"topic","value":"machine learning"},[classification] {"entity":"topic","value":"classification"}
    - an article about [history] {"entity":"topic","value":"history"} and [europe] {"entity":"topic","value":"europe"}
    - i need something about [sport] {"entity":"topic","value":"sport"}

can someone explain what i made wrong?

Thanks! Louis

what is the phrase that gives you empty entities?

i am typing " i want an article about Statistics" for exemple and it return this line :slight_smile:

2021-03-22 15:24:08 DEBUG    rasa.core.processor  - Received user message 'i want an article about statistics' with intent '{'id': -4990857339935643610, 'name': 'demand', 'confidence': 0.9999773502349854}' and entities '[]'

You need to remove space.

like this : [sport]{“entity”:“topic”,“value”:“sport”}

based on the provided training data, I don’t see any entities in the phrase “i want an article about Statistics”

okay i may have misunderstood something. Shoudn’t “statistics” be considered as an entity “topic”, which i have created ( i believe)? If it is not the case, what is the way to do that? Thanks.

I understand that this is the intended behavior, but my question is how would a model trained on your training data know that?

well, i watched a few times the youtube masterclass and i understood that the combination of the creation of the intent in the nlu.yml and with all the informations in the domain.yml and the pipelines in theconfig.yml, the model was able to recognize somehow the topics. But it is possible that i missed something. I would really appreciate if you have some more documentation on entity extractions, and if possible, on the particular issue i have.

it’s not about documentation. Technically, you did everything correct. The problem is in the nature of the language. Since your topics don’t have a lot of similar semantic features, it is very hard for any model to correctly recognize your topic entities. I’d recommend to create a list of possible topics that you support and create a lookup table

ok thanks for those infos. :wink: Actually a was looking for a way to extract whatever word is places after the intent example. I’m probaly use a form to extract my specific topics then.