Rasa entities regex

Hey everyone. I want to check my slots that are being filled from the user texts… Currently I have the following slot -

    type: list
    influence_conversation: true

and my nlu as :

- intent: quantity
   examples: |
     - 1
     - two
     - 2
     - three
     - 3
     - 4
     - four

…more similar examples. If I say “we rice” instead of “3 rice”, it captures “we” into the quantity slot. Can I specify that the quantity slot must have only digits?

I’d recommend to add a bunch of examples like we rice without quantity labels

no that’ll be counterproductive since “we rice” doesn’t mean anything… I just wanted to know if I add -

- regex: quantity
  examples: |

to my nlu , will it work to capture only digits into quantity?

no, regex only serve as additional features.

that’ll be counterproductive since “we rice” doesn’t mean anything

this is the idea of using ML instead of hardcoding: you provide a bunch of examples and contra examples to learn wanted behaviors.

also for numbers, I’d recommend to use Duckling: Components