Difference between entities and form entity

I’m looking to better understand entities and form entity.

For example, in the domain.yml, you have entities that are extracted by the entity extractor using different language models.

But in forms, you also have “entity”, but these are slots and have slot mapping. This terminology is a bit confusing, and it’s unclear when I have to use entities vs. form entity/slots.

For example, I’m using forms to collect some basic inform to fill out an API request. Here is a portion of my domain.yml

What I’m trying to understand in this case, I think the slot section is defining each entity in my form. Do I even then need the entities?

entities:
- date_of_birth
- coverage_amount
- coverage_length
- gender
- nicotine
- states

forms:
  quote_form:
    date_of_birth:
    - type: from_entity
      entity: date_of_birth
    gender:
    - type: from_entity
      entity: gender
    nicotine:
    - type: from_entity
      entity: nicotine
    states:
    - type: from_entity
      entity: states
    coverage_amount:
    - type: from_entity
      entity: coverage_amount
    coverage_length:
    - type: from_entity
      entity: coverage_length

slots:
  date_of_birth:
    type: text
    auto_fill: false
    influence_conversation: false
  requested_slot:
    type: text
    influence_conversation: true
  coverage_amount:
    type: text
    auto_fill: false
    influence_conversation: true
  coverage_length:
    type: float
    auto_fill: false
    influence_conversation: true
    max_value: 1.0
    min_value: 0.0
  gender:
    type: text
    auto_fill: false
    influence_conversation: true
  nicotine:
    type: text
    auto_fill: false
    influence_conversation: true
  states:
    type: text
    auto_fill: false
    influence_conversation: true

As a follow on question, when filling slots, I’m a little confused between slots of type: categorical and forms using type: from_intent with values.

Take my slot gender. I could write it like this…but then I’m not sure how to use it in my form.

gender:
type: categorical
values:
  - male
  - female
auto_fill: false
influence_conversation: true

what I’ve done is use the type from_intent. But when I like at the documentation, it allows me to specify.

gender:
- type: from_intent
  intent: male
  value: male
- type: from_intent
  intent: female
  value: female

But in my nlu, I also learn you can specify the value of an entity like this (i think). I’m wondering if I’m doing any of this right or if there’s just multiple ways of doing this.

- intent: gender
  examples: |
    - i'm a [guy](gender:male)
    - [male](gender:male)
    - i'm a [man](gender:male)
    - [female](gender)
    - i'm a [woman](gender)
    - i'm a [gal](gender)

I think I’ve answer my own questions, there’s a lot of different ways to fill out those forms.

This article was helpful: How to Build Your First Rasa Form to giving some more info than just the 2.0 documentation.