Multiple intents with numbers

Hi everyone, my rasa version is Rasa 1.7.0

I am trying to develop a conversational AI for user information collection where I need to collect information like mobile number and age. Also, my bot will have option selection with the user provided selection number. But, my conversation always gets confused between mobile and age intents although I have set regex_mobile and regex_age intents for mobile and age respectively in nlu file. I have also tried event-base called with return[UserUttered(text="/", parse_data= {“intent”: {“name”: “your_intent_name”, “confidence”: 1.0},“entities”: {}})]. Also, MemoizationPolicy’s max_history: 1. But every time it gets confused. I have also tried to create stories using Rasa X but that also didn’t work. Snippet of my config, nlu, and stories are:

NLU file:

## intent:mobile_number
- [919546321525](regex_mobile)
- -------------
- -------------
## regex_mobile
- ^(91){1}[1-9]{1}[0-9]{9}$

## intent:age_entry
- [12](regex_age)
- [45](regex_age)
- [85](regex_age)
- [78](regex_age)
- [21](regex_age)
- [56](regex_age)
- -----
- -------

- ^(1[89]|[2-9][0-9])$


## New Registration Story

* welcome
   - utter_mobile
* mobile_number{"regex_mobile":"919005839050"}
  - action_mobile
* --------
  - -----
* ----------
  - -----------
* ---------
  - -----------
* age_entry{"regex_age":"31"}
  - action_age
* -----------
  - ------------

and, config file

# Configuration for Rasa NLU.
language: en
pipeline: supervised_embeddings

# Configuration for Rasa Core.
- name: MemoizationPolicy
  max_history: 1
- name: MappingPolicy
- name: KerasPolicy
- name: FormPolicy

Kindly, help me in sorting out this issue. I have tried several suggestions available in the forum.

Hi, in your NLU file, you aren’t actually defining any regex’s. Any regex you want to define needs to start with ## regex:, so you could do e.g.

## regex:regex_mobile
- ^(91){1}[1-9]{1}[0-9]{9}$


## regex:mobile_number
- ^(91){1}[1-9]{1}[0-9]{9}$

By the way, it is not necessary that the entity has the same name as the regex, so you can simply call your entities age and mobile, no need to prefix the entity name with regex. By using a regex, you’re simply telling the model to pay attention to words that look like this. You’re not directly linking the regex to an entity, the model will learn this association itself given the training data. The name of the regex is just for the human reader. (see also this docs page)

You can also use Duckling dimension “phone-number” for Phone numbers.