Mapping for a non-existent intent (Mysterious cause) - Rasa 3.1

I’ve been struggling with an error that seems to be more than meets the eye (that is, not really described by the “Warning” and the “Warning” in this case is effectively an error). It has this message for every slot and entity:

/rasa/shared/utils/io.py:99: UserWarning: Slot ‘name’ uses a ‘from_entity’ mapping for a non-existent entity ‘name’. Skipping slot extraction because of invalid mapping.

Of course, it’s not literally true:

From domain.yml:

slots:
  name:
    type: text
    initial_value: null
    mappings:
      - type: from_entity
        entity: name

From nlu.yml:

- intent: provide_name
  examples: |
    - My name is [John Doe](name)
    - You can call me [Sara](name)
    - [James](name) is my name
    - they call me [Biggie Smallz](name)
    - [Yun Fan](name)

I have also tried several variations and tried appending an entity list to nlu.yml:

entities:
- name

My original slots syntax was more concise.

slots:
  name:
    type: text
    mappings:
      - type: from_entity
        entity: name

I’ve tried running with debug = True, log_level: DEBUG, -vv, Python versions 3.7, 3.8, 3.9, and 3.10, as well as deleting caches. I’ve tried running with debug = True, log_level: DEBUG, -vv, Python versions 3.7, 3.8, 3.9, and 3.10, as well as deleting caches. The model builds without error using rasa train. In fact, if I build the nlu component only with rasa train nlu I can run it and see that entity extraction works fine.

Additionally, when I put a debugger in the source code I see the domain_slots.items() look like this:

(‘name’, {‘type’: ‘text’, ‘initial_value’: None, ‘mappings’: [{‘type’: ‘from_entity’, ‘entity’: ‘name’}]}),

Updates:

  • I started over with a fork of this repo: GitHub - RasaHQ/kb-demo-chatgpt
  • I incrementally added functionality
  • Eventually the same thing happened to it
  • Additionally, now it started rapidly-firing the fallback action without user input until it says

“Circuit breaker tripped. Stopped predicting more actions for sender”

So… I guess now also have the questions “why does Rasa have a circuit breaker, how many volts or watts can it take, and where can I find a surge protector for it?”…

Sometimes, the order of sections in the domain.yml file can matter. Try reordering the sections, placing the entities section before the slots section.

entities:

  • name

slots: name: type: text initial_value: null mappings: - type: from_entity entity: name

In your NLU examples, make sure to use the entity name explicitly. Although your examples seem correct, double-check that there are no unexpected characters or spaces around the entity.