In custom slot mapping extract_<slotname> works before utter_ask_<slot_name>

I assume utter_ask_<slot_name> used to work before extract_<slot_name> because everything was working as expected, and after certain stage of development the chatbot was working abnormally (it’s suppose to ask prompt and extract entity from the user input, instead it tries to extract entity without asking prompt, and if the entity extraction method returns None then it performs the utter_ask_<slot_name>)

After debugging i found that extract_slot_name() method is executed before perform utter_ask_slot_name or action_ask_slot_name

could that be a problem of my rules /stories or from the action server?

@athulvingt I still see this behaviour even in rasa 3.6.4 version.

Any idea whether this by design or a bug ?

This is leading to use the entity found in the last user utterance whereas this should have asked the slot question and extract from that utterance.

@stephens Any idea about this one.

could that be a problem of my rules /stories or from the action server?

Yes. It could also be related to your slot mapping setup and form but would need to see the relavant config or share the repo.

Hi @stephens

In my case,

  • slot is set to custom mapping
  • custom action to ask for the slot.
  • formValidationaction which has extract_slotname and validate_slotname methods

When the form gets activated for the first time, the extract_slotname method gets executed which actually tries to extract from the last user utterance.

The way I was expecting is the custom_action for asking the slot question should be executed before attempting to extract the slot.

Is my understanding wrong ?

Without more details, I can’t answer your question. Is your slot mapping using an active_loop condition for the form?

Hi @stephens

Yes, I have used active_loop on the stories.