Asking user to confirm slot name

i am working on a project where i need to ask user, a user name and a customer name as both the values are of same kind the bot get confused, so wanted to ask the user, “is it a user name or a customer name”. is there any way to do this? @akelad @JulianGerhard @Juste @JiteshGaikwad

Hi @shanushawan,

your question seems to be a bit vague. Let me ask you some things:

  • Do you define username and customer name as slots?
  • Are you planning to fill the slots by a predefined entity (e.g. from spacy) like “PERSON”?
  • Is there just the possibility, that the user utters a name and you are wondering what it might be?

Otherwise, there are several ways to achieve the functionality. As soon as you provided more info, we are able to help you!

Regards

thank you for your quick response

yes my entity and slot name are same (username and customer name). And no i am trying it to fill it with my own trained entity set. yes i am trying to achieve, whenever a user just enters a value like like “julian”. the bot should ask is it user name or customer name. @JulianGerhard

Okay,

then a simple solution coming up to my mind would be to define a general_name slot which accepts a common name from which we want to know which kind of name it is and a user_uttered_name intent. In a story, this could be represented as:

* user_uttered_name{"general_name": "Julian Gerhard"}
- name_type_form
- form{"name": "name_type_form"}
- form{"name": null}
- action_restart

The template “utter_ask_name_type” asks the user for the type of the name and then you could set either the customername slot or the username slot according to the validation of general_name.

This story snippet can possibly inserted everywhere you want to allow the mentioning of the users name.

Did that help you?

Regards

Thanks again,

But this is not helping. As i am working with form actions can you tell me how can i do this using form action without using stories.

as i have told you i am using form action because i have lot(26) of fields and all of them are mandatory. so can you tell me how can i ask user before slot mapping in form action and map the slot according to their response.
@JulianGerhard

can anyone help me with this @JulianGerhard @akelad @Juste @juste_petr

Actually, I think what Julian proposed is the correct solution. However, it’s a different form from what you use to get your 26 fields.

So you define a form in your stories to clarify if the user meant a username or the customer name and then run another form to get the rest of your slots. In general it would look like this:

* user_uttered_name{"general_name":"Julian Gerhard"} <!----- This lets the bot know to ask which name ------!>
    - name_form
    - form{"name": "name_type_form"} <!----- This form asks: what sort of name is this? Returns either username or customer name and stores the appropriate name in the appropriate slot -----!>
    - form{"name": null}
* WHATEVER_INTENT_YOU_NEED_TO_START_YOUR_26_FIELD_FORM
    - 26-field_form
    - form{"name":"26-field_form"} <!--- this form handles the rest of your slots. One of them (name) is pre-filled.
    - form{"name": null}
2 Likes

hi i want to achieve same as you are talking about from person entity i want to fill two slots like looking_for means whom you are looking and what is your name. eg. john is user and he is looking for juliet. this both name comes from different intent.