I was running into problems with a form/slot filling task, but (kind of) solved the problem by changing “intent: None” to “intent: inform”. When “none” was the set intention in a slot form, it would trigger a custom action for reasons I can’t figure out. I’m not sure why that’s happening and I’d prefer a slot that does not need a specified intent to be filled. I’ve looked through the documentation, and I’m not clear how to create a slot that can be filled with any type of response. I’ve included the domain and rules below. In the updated version (not shown), I changed None to “inform” and it’s started working, but only if I train the NLU to recognize most of the responses as an inform intent.
Is there someone I could learn more about how to create a slot that doesn’t require a specified intent? thanks!
DOMAIN
version: '2.0'
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: false
intents:
- inform
- act_asana_path
- flush_slots
- check_asana
- sleep_log
- affirm
- greet
- goodbye
- deny
- mood_great
- mood_unhappy
- bot_challenge
- question_test
- trigger_hello_world
- change_date
- verify_log_experience
entities:
- exercise
- sleep
- stress
- task_name
slots:
confirm_log:
type: text
influence_conversation: false
sleep_confirm:
type: text
influence_conversation: true
sleep:
type: text
influence_conversation: true
sleep_description:
type: text
influence_conversation: true
goal:
type: text
influence_conversation: true
asana_task_name:
type: text
influence_conversation: true
asana_number_select:
type: text
influence_conversation: true
asana_task_name_to_search:
type: text
influence_conversation: true
notes_from_asana_task_selected:
type: text
influence_conversation: false
asana_select_options_slot:
type: text
influence_conversation: false
asana_after_note_logged:
type: text
influence_conversation: false
verify_log_experience:
type: text
influence_conversation: false
experience_insight:
type: text
influence_conversation: false
experience_substance:
type: text
influence_conversation: false
experience_ask_missed_info:
type: text
influence_conversation: false
experience_dose:
type: text
influence_conversation: false
experience_behavior_change:
type: text
influence_conversation: false
experience_timing:
type: text
influence_conversation: false
experience_carry:
type: text
influence_conversation: false
experience_relates_to_task:
type: text
influence_conversation: true
responses:
utter_confirm_sleep:
- text: Do you want to talk about how you slept?
utter_greet:
- text: Hi! It's time for your daily sleep check-in. I'm excited to learn about your experience. Shall we get started?
utter_goodbye:
- text: Thanks for chatting. Bye!
utter_iamabot:
- text: I am a bot, powered by Rasa.
utter_ask_confirm_log:
- text: Did you exercise yesterday? Don't sweat it if you didn't run a marathon - walks count!
utter_ask_exercise:
- text: What kind of exercise did you do 💪 ?
utter_ask_sleep:
- text: How much sleep did you get last night?
utter_ask_sleep_description:
- text: How would you describe your sleep?
utter_ask_diet:
- text: Did you stick to a healthy diet 🥦 yesterday?
utter_ask_stress:
- text: What is your stress level right now 🧘 ?
buttons:
- title: low
payload: '/inform{"stress": "low"}'
- title: medium
payload: '/inform{"stress": "medium"}'
- title: high
payload: '/inform{"stress": "high"}'
utter_ask_goal:
- text: Setting goals - even small ones - is a great way to focus your day. What do you want to accomplish today 🥇 ?
utter_slots_values:
- text: |-
You've submitted the following answers:
- Exercised?: {confirm_log}
- Sleep: {sleep}
- Goal: {goal}
utter_no_worries:
- text: No problem :)
utter_ask_continue:
- text: Sorry, I don't quite understand. Do you want to continue?
utter_cheer_up:
- text: 'Here is something to cheer you up:'
image: https://i.imgur.com/nGF1K8f.jpg
utter_did_that_help:
- text: Did that help you?
utter_start_over:
- text: Ok, let's start over.
utter_happy:
- text: Great, carry on!
utter_question_test:
- text: What's your question?
utter_question_color_test:
- text: my favorite color is blue
utter_ask_asana_task_name:
- text: What's the task you'd like to check?
utter_experience_verify_log_experience:
- text: Would you like to log an experience?
utter_experience_insight:
- text: What was your insight or notable experience?
utter_experience_ask_missed_info:
- text: Is there something else you'd like to note about your experience?
utter_ask_experience_dose:
- text: How would you describe the dose?
utter_ask_experience_substance:
- text: How'd you describe the substance?
utter_ask_experience_context:
- text: How might you describe the timing or mindfullness practices?
utter_experience_carry:
- text: Do you feel like there are things you want to carry from this experience into your life?
utter_explanation_of_mechanism:
- text: How would you describe the mechanism of action for why your thoughts or behavior were different?
utter_experience_behavior_change:
- text: How would you describe how your behavior, such as conversational style or movements, changed?
utter_experience_timing:
- text: Please describe the context, such as time of day, around the experience.
utter_act_asana_path:
- text: Please describe the context, such as time of day, around the experience.
utter_asana_change_date:
- text: What new due date would you like for the task?
utter_experience_relates_to_task:
- text: does this relate to an asana task?
actions:
- act_asana_path
- action_ask_asana_after_note_logged
- action_ask_asana_change_date
- action_ask_asana_task_name_to_search
- action_ask_notes_from_asana_task_selected
- action_flush_slots
- action_hello_world
- action_submit_results
- check_asana_action
- confirm_log
- select_asana_action
- utter_ask_asana_task_name
- utter_confirm_sleep
- utter_exercise_info
- utter_greet
- utter_start_over
- validate_health_form
- validate_sleep_form
- validate_sleep_log
forms:
asana_form:
asana_task_name:
- type: from_text
intent: None
asana_task_name_to_search:
- intent:
- None
type: from_text
notes_from_asana_task_selected:
- intent:
- None
type: from_text
asana_after_note_logged:
- intent:
- None
type: from_text
sleep_form:
sleep_confirm:
- type: from_intent
intent: affirm
value: true
- type: from_intent
intent: deny
value: false
- type: from_intent
intent: inform
value: true
sleep_description:
- type: from_text
intent: None
not_intent: inform
health_form:
confirm_log:
- type: from_intent
intent: affirm
value: true
- type: from_intent
intent: deny
value: false
- type: from_intent
intent: inform
value: true
sleep:
- type: from_entity
entity: sleep
- type: from_intent
intent: deny
value: None
sleep_description:
- type: from_text
intent: None
not_intent: inform
goal:
- type: from_intent
intent: affirm
value: true
- type: from_intent
intent: deny
value: false
experience_form:
verify_log_experience:
- type: from_text
intent: affirm
value: true
experience_substance:
- type: from_text
intent: inform
value: true
experience_dose:
- type: from_text
intent: None
experience_insight:
- type: from_text
intent: None
experience_timing:
- type: from_text
intent: None
key_takeaway:
- type: from_text
intent: None
explanation_of_mechanism:
- type: from_text
intent: None
experience_behavior_change:
- type: from_text
intent: None
experience_carry:
- type: from_text
intent: None
experience_relates_to_task:
- type: from_text
intent: affirm
value: true
RULES version: “2.0”
rules:
#- rule: Say goodbye anytime the user says goodbye
# steps:
# - intent: goodbye
# - action: utter_goodbye
#- rule: Say 'I am a bot' anytime the user challenges
# steps:
# - intent: bot_challenge
# - action: utter_iamabot
- rule: Submit form
condition:
# Condition that form is active.
- active_loop: health_form
steps:
- action: health_form
- active_loop: null
# The action we want to run when the form is submitted.
- action: action_submit_results
- action: utter_slots_values
- rule: Ask exercise question
steps:
- intent: ask_exercise
- action: utter_exercise_info
- rule: Thanks
steps:
- intent: thankyou
- action: utter_no_worries
- action: utter_goodbye
- rule: ask sleep
steps:
- intent: sleep_log
- action: utter_confirm_sleep
- rule: activate sleep
steps:
- action: utter_confirm_sleep
- intent: affirm
- action: sleep_form
- active_loop: sleep_form
# submit form (activation is appended to each form)
- rule: submit sleep
condition:
- active_loop: sleep_form
steps:
- action: sleep_form
- active_loop: null
- action: utter_goodbye
# check asana
#- rule: check asana rule 1
# steps:
# - intent: check_asana
# - action: asana_form
# - active_loop: asana_form
- rule: asana action based
steps:
- intent: act_asana_path
- action: utter_ask_asana_task_name
- action: action_listen
- action: action_ask_asana_task_name_to_search
- action: action_listen
- action: action_ask_notes_from_asana_task_selected
- action: action_listen
- action: action_ask_asana_after_note_logged
- rule: experience to task rule
condition:
- active_loop: experience_form
- slot_was_set:
- experience_relates_to_task: True
steps:
- action: action_ask_asana_task_name_to_search
- rule: set new date
condition:
- slot_was_set:
- asana_select_options_slot: True
steps:
- intent: change_date
- action: action_ask_asana_change_date
- rule: rule log experience
steps:
- intent: experience_log
- action: experience_form