in my nlu I have the following:
- intent: search_product_by_name
examples: |
- el [omega 3]{"entity":"product", "role": "product_search"} de cuánto es?
- Me puedes ayudar a buscar [cremas]{"entity":"product", "role": "product_search"}
- [3 Mag Blend | Mezcla de Citrato, Óxido y Gluconato de Magnesio 200 Cápsulas | 500 mg]{"entity":"product", "role": "product_search"}
- [3 Mag Platinum | Mezcla de Citrato, Glicinato y L-Treonato de Magnesio]{"entity":"product", "role": "product_search"}
- [200 Billion Probiotics | 200 Billones de Probióticos]{"entity":"product", "role": "product_search"}
- [80 Billion Probiotics Platinum | 80 Billones de Probióticos Platinum 120 Cápsulas | 550 mg]{"entity":"product", "role": "product_search"}
- [80 Billion Probiotics Platinum | 80 Billones de Probióticos Platinum 60 Cápsulas | 550 mg]{"entity":"product", "role": "product_search"}
- intent: ingredients_of_productos
examples: |
- [¿Qué ingredientes tiene](ingredient_query) [Psyllium Husk Fiber]{"entity":"product", "role": "product_ingredient"}?
- [Dime los ingredientes de](ingredient_query) [Fibra de Cáscara de Psyllium]{"entity":"product", "role": "product_ingredient"}?
- [¿Cuáles son los ingredientes en](ingredient_query) [Pastillero Premium]{"entity":"product", "role": "product_ingredient"}?
- [Ingredientes de](ingredient_query) [Resveratrol 180 Cápsulas]{"entity":"product", "role": "product_ingredient"}?
- [Lista de ingredientes para](ingredient_query) [Resveratrol 90 Cápsulas]{"entity":"product", "role": "product_ingredient"}?
- [¿Qué contiene](ingredient_query) [N-Acetyl Cysteine]{"entity":"product", "role": "product_ingredient"}?
- [¿Qué hay en](ingredient_query) [N-Acetilcisteína]{"entity":"product", "role": "product_ingredient"}?
- [Componentes de](ingredient_query) [Quercetin Blend]{"entity":"product", "role": "product_ingredient"}?
- [¿Qué se usa en](ingredient_query) [Quercetina]{"entity":"product", "role": "product_ingredient"}?
- [Ingredientes en](ingredient_query) [Organic Matcha en Polvo]{"entity":"product", "role": "product_ingredient"}?
- [¿Qué tiene](ingredient_query) [Matcha Orgánica]{"entity":"product", "role": "product_ingredient"}?
- lookup: products
examples: |
- # samples
- lookup: ingredient_query
examples: |
- # samples
domain.yml
entities:
- product:
roles:
- product_search
- product_ingredient
slots:
product:
type: text
mappings:
- type: from_entity
entity: product
role: product_search
product_ingredient:
type: text
mappings:
- type: from_entity
entity: product
role: product_ingredient
stories.yml
- story: search ingredients
steps:
- intent: ingredients_of_productos
- slot_was_set:
- product_ingredient
- ingredient_query
entities:
- ingredient_query
- product: Multivitamínico para Hombre +40
role: product_ingredient
- action: action_retrieve_only_ingredients
- story: search_by_product
steps:
- intent: search_product_by_name
- slot_was_set:
- product
- products_link
entities:
- product: Jabón Corporal Sólido
role: product_search
- products_link
- action: action_retrieve_information_by_product
rules.yml
- rule: search ingredient
condition:
- slot_was_set:
- product_ingredient: 60 Billion Probiotics
- ingredient_query
steps:
- intent: ingredients_of_productos
- action: action_reset_selective_slots
- action: action_retrieve_only_ingredients
- rule: search_by_product
condition:
# Se puede agregar condiciones aquí si es necesario, por ejemplo:
- slot_was_set:
- product: Mens T Platinum # Asegura que el slot 'product' esté lleno
- products_link
steps:
- intent: search_product_by_name
- action: action_reset_selective_slots
- action: action_retrieve_information_by_product
And display this in my console
2024-08-05 14:55:59 DEBUG rasa.core.lock_store - Issuing ticket for conversation 'BLA_654cfcbfe83bcd264575538b_102c507b-1090-4ebb-a3dc-e476689c3e7b'.
2024-08-05 14:55:59 DEBUG rasa.core.lock_store - Acquiring lock for conversation 'BLA_654cfcbfe83bcd264575538b_102c507b-1090-4ebb-a3dc-e476689c3e7b'.
2024-08-05 14:55:59 DEBUG rasa.core.lock_store - Acquired lock for conversation 'BLA_654cfcbfe83bcd264575538b_102c507b-1090-4ebb-a3dc-e476689c3e7b'.
2024-08-05 14:55:59 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__message__': [<rasa.core.channels.channel.UserMessage object at 0x000002562DF98E20>], '__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x000002562DF99E70>}, targets: ['run_RegexMessageHandler'] and ExecutionContext(model_id='7b4597ee9ce14f8d9c6b9ed48983bcb0', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'nlu_message_converter' running 'NLUMessageConverter.convert_user_message'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'provide_SpacyNLP0' running 'SpacyNLP.provide'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_SpacyNLP0' running 'SpacyNLP.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_SpacyTokenizer1' running 'SpacyTokenizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_SpacyFeaturizer2' running 'SpacyFeaturizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_LexicalSyntacticFeaturizer3' running 'LexicalSyntacticFeaturizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer4' running 'CountVectorsFeaturizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_CountVectorsFeaturizer5' running 'CountVectorsFeaturizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_RegexFeaturizer6' running 'RegexFeaturizer.process'.
2024-08-05 14:55:59 DEBUG rasa.engine.graph - Node 'run_LanguageModelFeaturizer7' running 'LanguageModelFeaturizer.process'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_DIETClassifier8' running 'DIETClassifier.process'.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag, L- tag pair encloses multiple entity classes.i.e. [B-a, I-b, L-a] instead of [B-a, I-a, L-a].
Assuming B- class is correct.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O].
Assuming last tag is L- instead of I-.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag, L- tag pair encloses multiple entity classes.i.e. [B-a, I-b, L-a] instead of [B-a, I-a, L-a].
Assuming B- class is correct.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O].
Assuming last tag is L- instead of I-.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag, L- tag pair encloses multiple entity classes.i.e. [B-a, I-b, L-a] instead of [B-a, I-a, L-a].
Assuming B- class is correct.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O].
Assuming last tag is L- instead of I-.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_CRFEntityExtractor9' running 'CRFEntityExtractor.process'.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O].
Assuming last tag is L- instead of I-.
2024-08-05 14:56:00 DEBUG rasa.nlu.utils.bilou_utils - Inconsistent BILOU tagging found, B- tag not closed by L- tag, i.e [B-a, I-a, O] instead of [B-a, L-a, O].
Assuming last tag is L- instead of I-.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_RegexEntityExtractor10' running 'RegexEntityExtractor.process'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_EntitySynonymMapper11' running 'EntitySynonymMapper.process'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_ResponseSelector12' running 'ResponseSelector.process'.
2024-08-05 14:56:00 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.
2024-08-05 14:56:00 DEBUG rasa.nlu.selectors.response_selector - Adding following selector key to message property: default
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_FallbackClassifier13' running 'FallbackClassifier.process'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_RegexMessageHandler' running 'RegexMessageHandler.process'.
2024-08-05 14:56:00 DEBUG rasa.core.processor - [debug ] processor.message.parse parse_data_entities=[{'entity': 'ingredient_query', 'start': 0, 'end': 12, 'confidence_entity': 0.8513057231903076, 'value': 'ingredient_query', 'extractor': 'DIETClassifier', 'processors': ['EntitySynonymMapper']}, {'entity': 'product', 'start': 17, 'end': 33, 'confidence_entity': 0.5198583006858826, 'role': 'product_search', 'confidence_role': 0.8342651724815369, 'value': 'omega 3 platinum', 'extractor': 'DIETClassifier'}, {'entity': 'product', 'start': 17, 'end': 33, 'confidence_entity': 0.9911935726792833, 'role': 'product_search', 'confidence_role': 0.9913995508095444, 'value': 'omega 3 platinum', 'extractor': 'CRFEntityExtractor'}, {'entity': 'product', 'start': 17, 'end': 33, 'value': 'omega 3 platinum', 'extractor': 'RegexEntityExtractor'}] parse_data_intent={'name': 'search_product_by_name', 'confidence': 0.9943285584449768} parse_data_text=ingredientes del omega 3 platinum
2024-08-05 14:56:00 DEBUG rasa.core.processor - [debug ] processor.slots.log slot_values= user_name: None
question: None
product: None
product_ingredient: None
privacy_topic: None
company_info: None
ingredient: None
symptom: None
user_orders: None
list_products: None
total_of_products: None
catalog: None
pain: None
promo_value: None
promo: None
combination_query: None
categories: None
payment_methods: None
payment_captured: None
invoice: None
sex: None
age: None
ingredient_query: None
products_link: None
customer_service: None
shipping_tracking: None
cancel: None
refund: None
my_latest_orders: None
unknown_charges: None
customer_service_slot: None
phone: None
order_number: None
requested_slot: None
session_started_metadata: None
2024-08-05 14:56:00 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 11 events.
2024-08-05 14:56:00 DEBUG rasa.core.actions.action - Validating extracted slots: product
ingredient_query
2024-08-05 14:56:00 DEBUG rasa.core.processor - [debug ] processor.extract.slots action_extract_slot=action_extract_slots len_extraction_events=2 rasa_events=[SlotSet(key: product, value: omega 3 platinum), SlotSet(key: ingredient_query, value: ingredient_query)]
2024-08-05 14:56:00 DEBUG rasa.engine.runner.dask - Running graph with inputs: {'__tracker__': <rasa.shared.core.trackers.DialogueStateTracker object at 0x000002562DF99E70>}, targets: ['select_prediction'] and ExecutionContext(model_id='7b4597ee9ce14f8d9c6b9ed48983bcb0', should_add_diagnostic_data=False, is_finetuning=False, node_name=None).
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'rule_only_data_provider' running 'RuleOnlyDataProvider.provide'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'domain_provider' running 'DomainProvider.provide_inference'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_RulePolicy1' running 'RulePolicy.predict_action_probabilities'.
2024-08-05 14:56:00 DEBUG rasa.core.policies.rule_policy - [debug ] rule_policy.actions.find current_states=
[state 1] user text: ingredientes del omega 3 platinum | previous action name: action_listen | slots: {'product': (1.0,), 'ingredient_query': (1.0,)}
2024-08-05 14:56:00 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2024-08-05 14:56:00 DEBUG rasa.core.policies.rule_policy - [debug ] rule_policy.actions.find current_states=
[state 1] user intent: search_product_by_name | user entities: ('product', 'product#product_search') | previous action name: action_listen | slots: {'product': (1.0,), 'ingredient_query': (1.0,)}
2024-08-05 14:56:00 DEBUG rasa.core.policies.rule_policy - There is no applicable rule.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'run_TEDPolicy0' running 'TEDPolicy.predict_action_probabilities'.
2024-08-05 14:56:00 DEBUG rasa.engine.graph - Node 'select_prediction' running 'DefaultPolicyPredictionEnsemble.combine_predictions_from_kwargs'.
2024-08-05 14:56:00 DEBUG rasa.core.policies.ensemble - Made prediction using user intent.
2024-08-05 14:56:00 DEBUG rasa.core.policies.ensemble - Added `DefinePrevUserUtteredFeaturization(False)` event.
2024-08-05 14:56:00 DEBUG rasa.core.policies.ensemble - Predicted next action using RulePolicy.
2024-08-05 14:56:00 DEBUG rasa.core.processor - Predicted next action 'action_default_fallback' with confidence 0.40.
2024-08-05 14:56:00 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'action_default_fallback'.
2024-08-05 14:56:00 DEBUG rasa.core.nlg.callback - Failed to fetch response id. Responses not provided.
I want this text ingredientes del omega 3 platinum
to be confident to ingredients_of_productos
but it moves to this intent search_product_by_name
who does not have ingredient_query
entity
What can I do to this text to be confident to ingredients_of_productos
Thanks