Entity Detection

Hi, I am trying to create a financial bot, everything was working perfectly, but when I am trying to give the bot CCV and amount-of-money for card bill payment, it is going to take the amount of money as CCV (amount-of-money could be 2 digits to 6 or 7 digits and CCV is 3 digits. you can see it below.) when I am giving 3 digits amount, the new 3 digits amount replace the existing value of CCV, although CCV is not empty. You can see the story and nlu below

- story: story of card_bill_form if confirmed positive
  steps:
  - intent: card_bill
  - action: action_GetCardNumberFromDB
  - action: action_card_bill_form
  - intent: affirm
  - action: action_AffirmCardNumber
  - action: card_bill_form
  - active_loop: card_bill_form
  - slot_was_set:
    - requested_slot: card_number
  - slot_was_set:
    - requested_slot: Valid_DATE
  - slot_was_set:
    - requested_slot: CCV
  - slot_was_set:
    - requested_slot: amount-of-money
  - slot_was_set:
    - requested_slot: null
  - active_loop: null
  - action: utter_card_payment_details
  - action: utter_ask_confirm
  - intent: affirm
  - action: utter_submit

my nlu looks like this:

- regex: CCV
  examples: |
      - [0-9]\d{3}
- regex: Valid_DATE
  examples: |
      - \b\d{2}/\d{2}\b
- regex: amount-of-money
  examples: |
      - [0-9]

I am solving this issue in the action.py file manually. However, I am looking for an optimized solution. Is there anything available for such kind of situation? [N.B: This problem does not occur if I say something like 100 Taka, or BDT 100, and for Bangla language too. It’s happening only for the English model.] Thanks in Advance

Check out slot mappings Forms.

You should be able to tell it to extract only from your desired intent or ignore specific intents.

EDIT: With rasa 3 this should be much easier and more steamlined. Looking forwards to getting my hands on it, check out Domain if moving to rasa 3.0 is going to be an option for your bot.