Bot not able to recognise names and company names in forms with from_text

I am trying to get names and company name from user. but if I message any name which is not inside my nlu.yml file it says anything from responses and deactivates form. So, anyone know how to achieve this?
I have shared content of nlu.yml, domain.yml(for form) and config.yml

Screenshot from 2021-02-17 18-12-34


    - entity: amount-of-money
      - ask_amount_of_money
      - textspace_demo
      type: from_entity
    - intent: ask_company_name
      type: from_text
    - entity: email
      type: from_entity
    - intent: ask_person_name
      type: from_text
    - intent: affirm
      type: from_intent
      value: yes
    - intent: deny
      type: from_intent
      value: no

config.yml config.yml (979 Bytes)

I think more training data would be needed, at least 15-20 examples for each intent.

That’s doesn’t work because it just captures name which are in Nlu training data

Sorry I’m not understanding. Are you saying that you’ve tried adding more training data, but the NLU still predicts only examples in the training data and fails to generalize to other inputs?


I’m curious to know what the prediction confidence is. I suspect that it’s low since your two intents are quite similar. Perhaps you could try to use a single intent such as inform, and use two entities person_name and company_name. Especially since you are handling this part with a form, I don’t see the purpose of using two separate intents.

What I can try is use inform intent and get from_text so whatever user provide I will accept it as an answer because name can’t be properly identify. E.g. Former name of Elon Musk son it was alphanumeric and some companies too have names like that so can’t identify

I found a solution for names and company names in forms. Here is it

    - type: from_entity
      entity: number
    - type: from_text
    - type: from_intent
      intent: affirm
      value: yes
    - type: from_intent
      intent: deny
      value: no

Above I used from_text and no intent or entity needs to be added. This way we will get a proper text out of that particular slot. Thanks for the help @alexyuwen but training data won’t help here. :slightly_smiling_face: Here is output on rasa shell: