Below are my yaml files
nlu
version: "3.1"
nlu:
- intent: begin_lead
examples: |
- begin lead
- Hair Transplant services
- Scalp Analysis
- Scalp Restoration
- Dandruff removal
- intent: greet
examples: |
- hey
- hello
- hi
- hello there
- good morning
- good evening
- moin
- hey there
- let's go
- hey dude
- goodmorning
- goodevening
- good afternoon
- intent: goodbye
examples: |
- cu
- good by
- cee you later
- good night
- bye
- goodbye
- have a nice day
- see you around
- bye bye
- see you later
- intent: affirm
examples: |
- yes
- y
- indeed
- of course
- that sounds good
- correct
- intent: deny
examples: |
- no
- n
- never
- I don't think so
- don't like that
- no way
- not really
- intent: mood_great
examples: |
- perfect
- great
- amazing
- feeling like a king
- wonderful
- I am feeling very good
- I am great
- I am amazing
- I am going to save the world
- super stoked
- extremely good
- so so perfect
- so good
- so perfect
- intent: mood_unhappy
examples: |
- my day was horrible
- I am sad
- I don't feel very well
- I am disappointed
- super sad
- I'm so sad
- sad
- very sad
- unhappy
- not good
- not very good
- extremly sad
- so saad
- so sad
- intent: bot_challenge
examples: |
- are you a bot?
- are you a human?
- am I talking to a bot?
- am I talking to a human?
- intent: business_requirements
examples: |
- does the app work in all operating systems?
- does the app make me feel anything better?
- does the app helps in solving any business problem?
- does the app keeps me posted about promotions?
domain.yml
version: "3.1"
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- business_requirements
- begin_lead
actions:
- utter_greet
- utter_menu
responses:
utter_greet:
- text: "Hey! How are you?"
utter_menu:
- text: "What are you looking for today?"
buttons:
- title: "Hair transplantation"
payload: "/begin_lead"
- title: "Scalp restorations"
payload: "/begin_lead"
- title: "Scalp Analysis"
payload: "/begin_lead"
- title: "Dandruff removal"
payload: "/begin_lead"
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_happy:
- text: "Great, carry on!"
utter_goodbye:
- text: "Bye"
utter_iamabot:
- text: "I am a bot, powered by Rasa."
utter_business_requirements:
- text: "I'm represting this business for this session to support any questions"
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
stories.yml
version: "3.1"
stories:
- story: happy path
steps:
- intent: greet
- action: utter_greet
- intent: mood_great
- action: utter_happy
- story: sad path 1
steps:
- intent: greet
- action: utter_greet
- intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- intent: affirm
- action: utter_happy
- story: sad path 2
steps:
- intent: greet
- action: utter_greet
- intent: mood_unhappy
- action: utter_cheer_up
- action: utter_did_that_help
- intent: deny
- action: utter_goodbye
- story: happy lead
steps:
- intent: greet
- action: utter_greet
- action: utter_menu
- intent: begin_lead
- action: utter_greet
Welcome to the forum
Use rasa shell --debug
to get more detail about what is happening.
Also try deleting all models and training again.
sekhar
(Chandra Sekhar)
May 1, 2022, 8:24am
3
May be you can retrain the model again
i tried deleting and retraining the modules , also below is the screenshot in debug mode for input->hello
I did try it training it multiple times but the response is same only rules.yml file is working because bot_challenge and utte_bye are working and did add screenshot with debug mode also. can you please look on to it if i’m missing anything. It worked without any changes though.
So the problem is not that the bot is not responding, but that it does not find a response (nuance!)
Do you only have stories and no rules?
No i do have both files and here is my rules file.
version: "3.1"
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
So what need to be corrected for finding response
sekhar
(Chandra Sekhar)
May 2, 2022, 1:37am
8
Is it needed actions in the domain.yml? as there is no actions in the action.py.
I think may be that’s the problem ur facing.
SUMANA
(Sumana Biswas)
May 2, 2022, 5:08am
9
Hi,
I am facing the same problem. Rasa is running and responding but for new intent, it is only considered utter action for bot challenge or goodbye intent.
Any help will be highly appreciated.
You don’t have any rules for the greet
intent? If you add a new intent you should add a rule for it.
how come the rasa init work for greet intent without any rule?
Stories sometimes work by themselves but you should not rely on them. They are used for longer conversations, not simple intent-to-action mappings.
but rasa documentation says otherwise of what we are speaking here, do not over use rules and stories are what makes to train the bot with data.
A story is a representation of a conversation between a user and an AI assistant, converted into a specific format where user inputs are expressed as intents (and entities when necessary), while the assistant’s responses and actions are expressed as action names.
I don’t see the contradictions.
The simple explanation is that rules are flows the bot MUST follow, while stories are flows the bot CAN follow.
1 Like
So for every intent do we need add it in the rule, like intent: mood_unhappy and affirm? which makes it replicate what ever we have in the stories to rules file also?
If you want your bot to always execute a specific action when a specific intent is detected, use rules. Otherwise use stories.
Rules are always followed no matter what, while stories use a bit more context.
I’ve made changes to rules and it works great for greet now but the later part doesnt have any response. Only rules file has information is being responded back but rest of the inputs are blank without any response
Use the --debug
option again to know what’s happening
Here is the debug result.
Your input -> hi
2022-05-02 13:13:04 DEBUG rasa.core.lock_store - Issuing ticket for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:04 DEBUG rasa.core.lock_store - Acquiring lock for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:04 DEBUG rasa.core.lock_store - Acquired lock for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:04 DEBUG rasa.core.tracker_store - Could not find tracker for conversation ID '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Starting a new session for conversation ID '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Action 'action_session_start' ended with events '[<rasa.shared.core.events.SessionStarted object at 0x16099c790>, ActionExecuted(action: action_listen, policy: None, confidence: None)]'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Current slot values:
session_started_metadata: None
2022-05-02 13:13:04 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__message__': [<rasa.core.channels.channel.UserMessage object at 0x160a48580>]}, targets: ['run_RegexMessageHandler'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'nlu_message_converter' running 'NLUMessageConverter.convert_user_message'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_WhitespaceTokenizer0' running 'WhitespaceTokenizer.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_RegexFeaturizer1' running 'RegexFeaturizer.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_LexicalSyntacticFeaturizer2' running 'LexicalSyntacticFeaturizer.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer3' running 'CountVectorsFeaturizer.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer4' running 'CountVectorsFeaturizer.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_DIETClassifier5' running 'DIETClassifier.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_EntitySynonymMapper6' running 'EntitySynonymMapper.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_ResponseSelector7' running 'ResponseSelector.process'.
2022-05-02 13:13:04 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.
2022-05-02 13:13:04 DEBUG rasa.nlu.selectors.response_selector - Adding following selector key to message property: default
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_FallbackClassifier8' running 'FallbackClassifier.process'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_RegexMessageHandler' running 'RegexMessageHandler.process'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Received user message 'hi' with intent '{'name': 'greet', 'confidence': 0.9999996423721313}' and entities '[]'
2022-05-02 13:13:04 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 4 events.
2022-05-02 13:13:04 DEBUG rasa.core.actions.action - Validating extracted slots:
2022-05-02 13:13:04 DEBUG rasa.core.processor - Default action 'action_extract_slots' was executed, resulting in 0 events:
2022-05-02 13:13:04 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x160a483a0>}, targets: ['select_prediction'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'rule_only_data_provider' running 'RuleOnlyDataProvider.provide'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_RulePolicy0' running 'RulePolicy.predict_action_probabilities'.
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user text: hi | previous action name: action_listen
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: greet | previous action name: action_listen
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'utter_greet'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'select_prediction' running 'DefaultPolicyPredictionEnsemble.combine_predictions_from_kwargs'.
2022-05-02 13:13:04 DEBUG rasa.core.policies.ensemble - Made prediction using user intent.
2022-05-02 13:13:04 DEBUG rasa.core.policies.ensemble - Added `DefinePrevUserUtteredFeaturization(False)` event.
2022-05-02 13:13:04 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Predicted next action 'utter_greet' with confidence 1.00.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Policy prediction ended with events '[<rasa.shared.core.events.DefinePrevUserUtteredFeaturization object at 0x160a44730>]'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Action 'utter_greet' ended with events '[BotUttered('Hey! How are you?', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {"utter_action": "utter_greet"}, 1651515184.750634)]'.
2022-05-02 13:13:04 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x160a483a0>}, targets: ['select_prediction'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'rule_only_data_provider' running 'RuleOnlyDataProvider.provide'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'run_RulePolicy0' running 'RulePolicy.predict_action_probabilities'.
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: greet | previous action name: action_listen
[state 2] user intent: greet | previous action name: utter_greet
2022-05-02 13:13:04 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'action_listen'.
2022-05-02 13:13:04 DEBUG rasa.engine.graph - Node 'select_prediction' running 'DefaultPolicyPredictionEnsemble.combine_predictions_from_kwargs'.
2022-05-02 13:13:04 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2022-05-02 13:13:04 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'.
2022-05-02 13:13:04 DEBUG rasa.core.lock_store - Deleted lock for conversation '98ee75bada644927aa98694569cbfcbb'.
Hey! How are you?
Your input -> good
2022-05-02 13:13:17 DEBUG rasa.core.lock_store - Issuing ticket for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:17 DEBUG rasa.core.lock_store - Acquiring lock for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:17 DEBUG rasa.core.lock_store - Acquired lock for conversation '98ee75bada644927aa98694569cbfcbb'.
2022-05-02 13:13:17 DEBUG rasa.core.tracker_store - Recreating tracker for id '98ee75bada644927aa98694569cbfcbb'
2022-05-02 13:13:17 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__message__': [<rasa.core.channels.channel.UserMessage object at 0x16099c7f0>]}, targets: ['run_RegexMessageHandler'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'nlu_message_converter' running 'NLUMessageConverter.convert_user_message'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_WhitespaceTokenizer0' running 'WhitespaceTokenizer.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_RegexFeaturizer1' running 'RegexFeaturizer.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_LexicalSyntacticFeaturizer2' running 'LexicalSyntacticFeaturizer.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer3' running 'CountVectorsFeaturizer.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer4' running 'CountVectorsFeaturizer.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_DIETClassifier5' running 'DIETClassifier.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_EntitySynonymMapper6' running 'EntitySynonymMapper.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_ResponseSelector7' running 'ResponseSelector.process'.
2022-05-02 13:13:17 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.
2022-05-02 13:13:17 DEBUG rasa.nlu.selectors.response_selector - Adding following selector key to message property: default
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_FallbackClassifier8' running 'FallbackClassifier.process'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_RegexMessageHandler' running 'RegexMessageHandler.process'.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Received user message 'good' with intent '{'name': 'mood_great', 'confidence': 0.9220313429832458}' and entities '[]'
2022-05-02 13:13:17 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 9 events.
2022-05-02 13:13:17 DEBUG rasa.core.actions.action - Validating extracted slots:
2022-05-02 13:13:17 DEBUG rasa.core.processor - Default action 'action_extract_slots' was executed, resulting in 0 events:
2022-05-02 13:13:17 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x160beef10>}, targets: ['select_prediction'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'rule_only_data_provider' running 'RuleOnlyDataProvider.provide'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_RulePolicy0' running 'RulePolicy.predict_action_probabilities'.
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: greet | previous action name: action_listen
[state 2] user intent: greet | previous action name: utter_greet
[state 3] user text: good | previous action name: action_listen
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: greet | previous action name: action_listen
[state 2] user intent: greet | previous action name: utter_greet
[state 3] user intent: mood_great | previous action name: action_listen
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'select_prediction' running 'DefaultPolicyPredictionEnsemble.combine_predictions_from_kwargs'.
2022-05-02 13:13:17 DEBUG rasa.core.policies.ensemble - Made prediction using user intent.
2022-05-02 13:13:17 DEBUG rasa.core.policies.ensemble - Added `DefinePrevUserUtteredFeaturization(False)` event.
2022-05-02 13:13:17 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Predicted next action 'action_default_fallback' with confidence 0.30.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Policy prediction ended with events '[<rasa.shared.core.events.DefinePrevUserUtteredFeaturization object at 0x160a2ee80>]'.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Action 'action_default_fallback' ended with events '[<rasa.shared.core.events.UserUtteranceReverted object at 0x160b9fb20>]'.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Current slot values:
session_started_metadata: None
2022-05-02 13:13:17 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x160beef10>}, targets: ['select_prediction'] and ExecutionContext(model_id='bbab84c82a1c47b8a09149b222c208b9', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'rule_only_data_provider' running 'RuleOnlyDataProvider.provide'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'run_RulePolicy0' running 'RulePolicy.predict_action_probabilities'.
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - Current tracker state:
[state 1] user intent: greet | previous action name: action_listen
[state 2] user intent: greet | previous action name: utter_greet
2022-05-02 13:13:17 DEBUG rasa.core.policies.rule_policy - There is a rule for the next action 'action_listen'.
2022-05-02 13:13:17 DEBUG rasa.engine.graph - Node 'select_prediction' running 'DefaultPolicyPredictionEnsemble.combine_predictions_from_kwargs'.
2022-05-02 13:13:17 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Policy prediction ended with events '[]'.
2022-05-02 13:13:17 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'.
2022-05-02 13:13:17 DEBUG rasa.core.lock_store - Deleted lock for conversation '98ee75bada644927aa98694569cbfcbb'.
It is selecting the intent correctly like mood_greet with confidence but it is resulting the entities as empty array for the intent
Can you show your pipeline and policies?
That’s correct though, there are no entities