Force rasa perform actions without intent

Hello everyone! I have some problems with slot recognition. For every ai it is too hard to understand what second name is. I decided to take the word of user and take all his message as surname. I already know about FollowupAction and SlotSet, but don’t know how to use it properly. I want perform something like this

intent: second_name (user: I want to add me to the system)
action: ask_second_name (bot: What is your last name?)
action: action_listen (user: Kowalczyk)
action: set_second_name_slot (bot: You had been added to database as {second_name_slot})

Every time when I type second_name, rasa trying to understand what I send and gives me wrong intent, that I don’t need. FollowupAction might be useful, but i need to get response from user with action_listen, and there is not multiple FollowupAction in rasa to perform a chain of actions.

Do sombody have the same problem? Can someone give me any suggestion?

Hi @xinchao-bojan ,

For your tasks I hink it is easiest to go with forms. You want to take all imput at this point as the last name, right? Than this code might do the job:

for slots in domain.yml file

slots:
  last_name:
    type: text
    mappings:
    - type: from_text
      conditions:
      - active_loop: add_to_system_form
        requested_slot: last_name

for form in domain.yml

forms:
  add_to_system_form:
    required_slots:
        - last_name

To ask the follow up question you need a utter_ask_last_name in your responses.

And two rules for activating and deactivating the form (Forms)

It’s already very late so I couldn’t test it myself. Just let me know if you have any questions.

Sören

1 Like

Thank you. It is solution of my problem.

1 Like