guys! I need a help here, when I train my dataset to recognize my intentions in rasa-nlu, I have a precision greater than 80%, but when I use the rasa-core to do the stories and the conversation, it does not acknowledges my intentions or I do not know, my stories are wrong. I’ve put my files down, and the debug logs for you guys take a look at what might be happening. I already tried to leave only one story and try to run only this story, leave only services and nothing works. Does anyone know what I’m doing wrong?
stories.md
## Story 1
* greet
- utter_greet
* servico{"setor": "atendimento"}
- slot{"setor": "atendimento"}
- action_check_servico
## Story 2
* greet
- utter_greet
* servico{"setor": "comercial"}
- slot{"setor": "comercial"}
- action_check_servico
## Story 3
* greet
- utter_greet
* servico{"setor": "curriculo"}
- slot{"setor": "curriculo"}
- action_check_servico
## Story 4
* greet
- utter_greet
* servico{"setor": "due"}
- slot{"setor": "due"}
- action_check_servico
## Story 5
* greet
- utter_greet
* servico{"setor": "financeiro"}
- slot{"setor": "financeiro"}
- action_check_servico
## Story 6
* greet
- utter_greet
* servico{"setor": "juridico"}
- slot{"setor": "juridico"}
- action_check_servico
## Story 7
* greet
- utter_greet
* servico{"setor": "ocr"}
- slot{"setor": "ocr"}
- action_check_servico
## Story 8
* greet
- utter_greet
* servico{"setor": "rh"}
- slot{"setor": "rh"}
- action_check_servico
## Story 9
* greet
- utter_greet
* goodbye
- utter_goodbye
## Story 10
* ofensa
- utter_ofensa
## Story 11
* greet
- utter_greet
domain.yml
intents:
- servico
- ofensa
- goodbye
- greet
entities:
- setor
- palavrao
actions:
- utter_servico_atendimento
- utter_servico_comercial
- utter_servico_curriculo
- utter_servico_due
- utter_servico_financeiro
- utter_servico_juridico
- utter_servico_ocr
- utter_servico_rh
- utter_ofensa
- utter_greet
- utter_goodbye
- utter_default
- actions.ActionCheckServico
slots:
setor:
type: categorical
values:
- atendimento
- comercial
- curriculo
- due
- financeiro
- juridico
- ocr
- rh
templates:
utter_greet:
- greet
utter_ofensa:
- ofensa
utter_default:
- new
utter_goodbye:
- goodbye
utter_servico_atendimento:
- atendimento
utter_servico_comercial:
- comercial
utter_servico_curriculo:
- curriculo
utter_servico_due:
- due
utter_servico_financeiro:
- financeiro
utter_servico_juridico:
- juridico
utter_servico_ocr:
- ocr
utter_servico_rh:
- rh
actions.py
from rasa_core.actions import Action
from rasa_core.events import SlotSet
class ActionCheckServico(Action):
def name(self):
return "action_check_servico"
def run(self, dispatcher, tracker, domain):
setor = tracker.get_slot('setor')
responses = {
'atendimento': 'utter_servico_atendimento',
'comercial': 'utter_servico_comercial',
'curriculo': 'utter_servico_curriculo',
'due': 'utter_servico_due',
'financeiro': 'utter_servico_financeiro',
'juridico': 'utter_servico_juridico',
'ocr': 'utter_servico_ocr',
'rh': 'utter_servico_rh',
}
if setor:
response = responses.get(setor,"utter_default")
dispatcher.utter_template(response, tracker)
else:
dispatcher.utter_template("utter_default")
return []
rasa_core.run debug
oi
2018-09-12 19:47:07 DEBUG rasa_core.tracker_store - Creating a new tracker for id 'default'.
2018-09-12 19:47:07 DEBUG rasa_core.processor - Received user message 'oi' with intent '{'confidence': 1.0, 'name': 'oi'}' and entities '[]'
2018-09-12 19:47:07 DEBUG rasa_core.processor - Logged UserUtterance - tracker now has 2 events
2018-09-12 19:47:07 DEBUG rasa_core.processor - Current slot values:
setor: None
2018-09-12 19:47:07 DEBUG rasa_core.policies.memoization - Current tracker state [None, {}, {'intent_oi': 1.0, 'prev_action_listen': 1.0}]
2018-09-12 19:47:07 DEBUG rasa_core.policies.memoization - There is no memorised next action
2018-09-12 19:47:07 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:07 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2018-09-12 19:47:07 DEBUG rasa_core.policies.ensemble - Predicted next action 'utter_greet' with prob 0.70.
greet
2018-09-12 19:47:07 DEBUG rasa_core.processor - Action 'utter_greet' ended with events '[]'
2018-09-12 19:47:07 DEBUG rasa_core.processor - Bot utterance 'BotUttered(text: greet, data: null)'
2018-09-12 19:47:07 DEBUG rasa_core.policies.memoization - Current tracker state [{}, {'intent_oi': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_oi': 1.0}]
2018-09-12 19:47:07 DEBUG rasa_core.policies.memoization - There is no memorised next action
2018-09-12 19:47:07 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:07 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:07 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2018-09-12 19:47:07 DEBUG rasa_core.policies.ensemble - Predicted next action 'action_listen' with prob 1.00.
2018-09-12 19:47:07 DEBUG rasa_core.processor - Action 'action_listen' ended with events '[]'
atendimento
2018-09-12 19:47:12 DEBUG rasa_core.tracker_store - Recreating tracker for id 'default'
2018-09-12 19:47:12 DEBUG rasa_core.processor - Received user message 'atendimento' with intent '{'confidence': 1.0, 'name': 'atendimento'}' and entities '[]'
2018-09-12 19:47:12 DEBUG rasa_core.processor - Logged UserUtterance - tracker now has 6 events
2018-09-12 19:47:12 DEBUG rasa_core.processor - Current slot values:
setor: None
2018-09-12 19:47:12 DEBUG rasa_core.policies.memoization - Current tracker state [{'intent_oi': 1.0, 'prev_action_listen': 1.0}, {'prev_utter_greet': 1.0, 'intent_oi': 1.0}, {'prev_action_listen': 1.0, 'intent_atendimento': 1.0}]
2018-09-12 19:47:12 DEBUG rasa_core.policies.memoization - There is no memorised next action
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_atendimento' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2018-09-12 19:47:12 DEBUG rasa_core.policies.ensemble - Predicted next action 'utter_ofensa' with prob 0.85.
ofensa
2018-09-12 19:47:12 DEBUG rasa_core.processor - Action 'utter_ofensa' ended with events '[]'
2018-09-12 19:47:12 DEBUG rasa_core.processor - Bot utterance 'BotUttered(text: ofensa, data: null)'
2018-09-12 19:47:12 DEBUG rasa_core.policies.memoization - Current tracker state [{'prev_utter_greet': 1.0, 'intent_oi': 1.0}, {'prev_action_listen': 1.0, 'intent_atendimento': 1.0}, {'prev_utter_ofensa': 1.0, 'intent_atendimento': 1.0}]
2018-09-12 19:47:12 DEBUG rasa_core.policies.memoization - There is no memorised next action
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_oi' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_atendimento' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.featurizers - Feature 'intent_atendimento' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2018-09-12 19:47:12 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2018-09-12 19:47:12 DEBUG rasa_core.policies.ensemble - Predicted next action 'action_listen' with prob 1.00.
2018-09-12 19:47:12 DEBUG rasa_core.processor - Action 'action_listen' ended with events '[]'