How do i get totally random name from user input? i tried to follow examples but those samples only executed with name inside nlu.yml, not totally unknown name not listed in yml? or do i have to list all human name in this planet like this?? with sample intent below i try to catch unknown name like “AKARAPACI” , but the bots cannot recognized it as “give_name” intent
yes, actually im already using it, but still its still need to categorized as “give_name” intents, but when i give “Akarapaci” the bot dont even know the intents so the action “action_get_nama_lengkap” not triggered
this is rules.yml :
- rule: user beri namanya
steps:
- intent: give_name
- action: action_get_nama_lengkap
Here example, bot asks question and user can type anything there and then Action code is evaluating if answer is right or not and replies to user if answer is correct (match given choices) or not (anything else).
Now you can modify this to that you don’t evaluate slot but just store that as name. You can do some basic checkings like it is not number, first letter is capital etc.
in Domain
forms:
kysymys01_form:
vastaus01:
- type: from_text
slots:
vastaus01:
type: text
influence_conversation: false
responses:
utter_ask_vastaus01:
- text: "- Potilaalle on määrätty tyroksiinia 50 mikrogrammaa. Thyroxin tablettien vahvuus on 0,1 mg. Kuinka monta tablettia annat potilaalle? \n- Montak$
actions:
- action_tarkista_kysymys_01
Still have same problem , here’s the debug and yml. you can see the process after “utter_create_krs.ask_nama_lengkap” → action_listen → i type ARZUROS (which is i expect it as give_name intents), but the bot not consider it as that. can i see your nlu.yml about aloita intent?
When i use name listed in nlu.yml , it works well, but i cannot define all those human name in nlu.yml in real life situation
debug result
Your input -> ARZUROS
2021-11-10 07:55:39 DEBUG rasa.core.lock_store - Issuing ticket for conversation 'a1304dc35e4c4c3082b25ea1697d2b28'.
2021-11-10 07:55:39 DEBUG rasa.core.lock_store - Acquiring lock for conversation 'a1304dc35e4c4c3082b25ea1697d2b28'.
2021-11-10 07:55:39 DEBUG rasa.core.lock_store - Acquired lock for conversation 'a1304dc35e4c4c3082b25ea1697d2b28'.
2021-11-10 07:55:39 DEBUG rasa.core.tracker_store - Recreating tracker for id 'a1304dc35e4c4c3082b25ea1697d2b28'
2021-11-10 07:55:39 DEBUG rasa.nlu.classifiers.diet_classifier - There is no trained model for 'ResponseSelector': The component is either not trained or didn't receive enough training data.
2021-11-10 07:55:39 DEBUG rasa.nlu.selectors.response_selector - Adding following selector key to message property: default
2021-11-10 07:55:39 DEBUG rasa.nlu.classifiers.fallback_classifier - NLU confidence 0.35082995891571045 for intent 'ask_create_krs' is lower than NLU threshold 0.85.
2021-11-10 07:55:39 DEBUG rasa.core.processor - Received user message 'ARZUROS' with intent '{'name': 'nlu_fallback', 'confidence': 0.85}' and entities '[]'
domain.yml
version: '2.0'
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
intents:
- ask_create_krs
- greet
- affirm
- out_of_context
- goodbye
- deny
- give_name
entities:
- krs_student_name
forms:
krs_form:
krs_student_name:
- type: from_text
slots:
krs_student_name:
type: text
influence_conversation: false
responses:
utter_greet:
- text: Halo! ada yang bisa saya bantu?
utter_goodbye:
- text: Sampai jumpa!
utter_thanks:
- text: Terima kasih, akan kami proses segera!
utter_not_understand:
- text: Maaf saya kurang mengerti, bisa diperjelas?
utter_confirm_create_krs:
- text: Apa anda ingin membuat KRS? (ya/tidak)
utter_create_krs.ask_nama_lengkap:
- text: Baik kami akan membuatkannya. Apa nama lengkap anda?
actions:
- utter_confirm_create_krs
- utter_create_krs.ask_nama_lengkap
- utter_greet
- utter_thanks
- action_out_of_context
- action_get_nama_lengkap
rules.yml
- rule: greet user
steps:
- intent: greet
- action: utter_greet
- rule: user want to ask create krs
steps:
- intent: ask_create_krs
- action: utter_confirm_create_krs
- rule: user beri namanya
steps:
- intent: give_name
- action: krs_form
- active_loop: krs_form
- active_loop: null
- slot_was_set:
- requested_slot: null
- action: action_get_nama_lengkap
- rule: tanya user ingin isi krs atau tidak
steps:
- intent: affirm
- action: utter_create_krs.ask_nama_lengkap
There is no trained model for ‘ResponseSelector’: The component is either not trained or didn’t receive enough training data.
My intent “aloita” is finnish language and it just means “start”. I give this in automatically when chatbot frontend (chatbot window) is opened and bot starts to ask questions, automatically.
In my language is about asking the name of people , so its more like “What is your name?” → person can reply with his/her name. so the point is i want Arzuros as “give_name” intent then custom code will retrieve it and set into slot.
im in trouble to detect random phrase as “give_name” intent such as "SALAH or even elon musk child name without entering the name itself in nlu.yml