Hello,
I have run rasa init
and I added a few sentences into an intent named ask-want-drink
. I added some entities named entity_drink
. However, the result JSON array is always empty.
Here is my files:
config.yml
recipe: default.v1
assistant_id: 20230407-124154-honest-gulch
language: en
pipeline:
# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model.
# # If you'd like to customize it, uncomment and adjust the pipeline.
# # See https://rasa.com/docs/rasa/tuning-your-model for more information.
- name: WhitespaceTokenizer
- name: RegexFeaturizer
- name: LexicalSyntacticFeaturizer
- name: CountVectorsFeaturizer
- name: CountVectorsFeaturizer
analyzer: char_wb
min_ngram: 1
max_ngram: 4
- name: DIETClassifier
epochs: 100
constrain_similarities: true
entity_recognition: true
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
constrain_similarities: true
- name: FallbackClassifier
threshold: 0.3
ambiguity_threshold: 0.1
policies:
# # No configuration for policies was provided. The following default policies were used to train your model.
# # If you'd like to customize them, uncomment and adjust the policies.
# # See https://rasa.com/docs/rasa/policies for more information.
- name: MemoizationPolicy
- name: RulePolicy
- name: UnexpecTEDIntentPolicy
max_history: 5
epochs: 100
- name: TEDPolicy
max_history: 5
epochs: 100
constrain_similarities: true
domain.yml:
version: "3.1"
intents:
- greet
- goodbye
- affirm
- deny
- mood_great
- mood_unhappy
- bot_challenge
- ask-want-drink:
use_entities:
- entity_drink
responses:
utter_greet:
- text: "Hey! How are you?"
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."
session_config:
session_expiration_time: 60
carry_over_slots_to_new_session: true
entities:
- entity_drink
nlu.yml (I only added an intent, the rest is as generated rasa init).
version: "3.1"
nlu:
- intent: ask-want-drink
examples: |
- I like (schweppes){"entity":"entity_drink", "value":"schweppes"}, give me
- I would like a (schweppes){"entity":"entity_drink", "value":"schweppes"}
- I want to drink (schweppes){"entity":"entity_drink", "value":"schweppes"}
- please give me a (schweppes){"entity":"entity_drink", "value":"schweppes"} drink
- please (oasis){"entity":"entity_drink", "value":"oasis"}
- I want to drink (7up){"entity":"entity_drink", "value":"7up"}
- can I have a (perrier){"entity":"entity_drink", "value":"perrier"}
- pass me the (badoit){"entity":"entity_drink", "value":"badoit"}
- give (tea){"entity":"entity_drink", "value":"tea"}}
- please give (sprite){"entity":"entity_drink", "value":"sprite"}
- give me (water){"entity":"entity_drink", "value":"water"}
stories.yml (Likewise, I only added this story into stories.yml)
- story: want a drink path
steps:
- intent: ask-want-drink
- action: utter_goodbye
e.g, when sending the following sentences:
I want to drink schweppes
my entities array is always empty as follows:
{
"text": "I want to drink schweppes",
"intent": {
"name": "ask-want-drink",
"confidence": 0.9999985694885254
},
"entities": [],
"text_tokens": [
[
0,
1
],
[
2,
6
],
[
7,
9
],
[
10,
15
],
[
16,
25
]
],
"intent_ranking": [
{
"name": "ask-want-drink",
"confidence": 0.9999985694885254
},
{
"name": "bot_challenge",
"confidence": 5.609626896330155e-7
},
{
"name": "affirm",
"confidence": 3.2016720297178836e-7
},
{
"name": "deny",
"confidence": 2.465369561832631e-7
},
{
"name": "mood_unhappy",
"confidence": 1.1073560557406381e-7
},
{
"name": "mood_great",
"confidence": 7.839430793410429e-8
},
{
"name": "goodbye",
"confidence": 6.600657087574291e-8
},
{
"name": "greet",
"confidence": 8.942786067223096e-9
}
],
"response_selector": {
"all_retrieval_intents": [],
"default": {
"response": {
"responses": null,
"confidence": 0.0,
"intent_response_key": null,
"utter_action": "utter_None"
},
"ranking": []
}
}
}
Please let me know how to fix this, and eventually if something is made wrong. Thank you!