How do I make my intent be able to extract any type of alpha-numeric entity?

Lets say I have a bot who can scan a coupon code, and there is no specific pattern for the coupon. It can be a mix of both letters and numbers, with no specific pattern.

Some examples of the coupons are: A3121SDW34W3 434R43RD32DFF G534F332D2D4F

So you see there is no real pattern that it follows. So can this entity extraction be possible in Rasa?

So how do I make the bot be able to recognize it?

Here is what I tried:

- intent: reply_coupon_code
  examples: |
    - [10a0](coupon_code)
    - [10e0](coupon_code)
    - [e1e](coupon_code)

I have tested with the above intent, but it only has a 10% success rate. It almost all the time refers to nlu_fallback rather than recognizing this intent. It would mean a lot if someone could help me with this.

Thanks for your time!!!

1 Like

@BrookieHub Hi, Interesting question and use case. But, you can archived your use case by using Regular Expression (Regex) NLU Training Data. You just need to create a regex pattern for your coupon code, but above coupon code are not in same number first coupon have 12 second 13 and third 13 and coupon need to be same with alpha numeric else your regex will be more complex mean it should be fixed digits and alphabets. I hope you understand.

@BrookieHub Hello, I hope you doing fine? I guess you solve this issue :slight_smile: If not please share the problem you facing.