Neofita
(Mike)
May 19, 2020, 10:49am
1
Hi
I was not able to have the right result in my project for Duckling, I tested with the financial-demo and I have the same result without understand why.
in Rasa (I am using Rasa X)
Typed
next week
Got
in Rasa => slot{“time”:“next week”}
with curl
url -XPOST http://localhost:8000/parse --data “locale=en_XX&text=next week”
[{“body”:“next week”,“start”:0,“value”:{“values”:[{“value”:“2020-05-25T00:00:00.000-07:00”,“grain”:“week”,“type”:“value”}],“value”:“2020-05-25T00:00:00.000-07:00”,“grain”:“week”,“type”:“value”},“end”:9,“dim”:“time”,“latent”:false}]
Typed
today
Got
slot{“time”:“2020-05-19T00:00:00.000-07:00”}
with curl
curl -XPOST http://localhost:8000/parse --data “locale=en_XX&text=today”
[{“body”:“today”,“start”:0,“value”:{“values”:[{“value”:“2020-05-19T00:00:00.000-07:00”,“grain”:“day”,“type”:“value”}],“value”:“2020-05-19T00:00:00.000-07:00”,“grain”:“day”,“type”:“value”},“end”:5,“dim”:“time”,“latent”:false}]
I was expecting to have the date and not the text in the slot.
Moreover, it seems that duckling return the same format
rctatman
(Rachael Tatman )
May 21, 2020, 3:37pm
2
Hmm, that is unexpected. Did you possibly add examples of time entities in your NLU data? If so, duckling and Rasa might be disagreeing about
Have you tried running this in debug mode? A closer look at the logs would be helpful in figuring out where the problem is.
Neofita
(Mike)
May 21, 2020, 3:47pm
3
Thank you for the reply I used the financial demo in order to avoid any error on my side.
Have you had the opportunity to give it a try with the financial demo? In order to see if you have the same behaviour.
In the debug mode the information is there, however, the slot takes only the text not the date
When I enter “today” I have the date if I enter “next week” I have the text in the slot
Juste
(Juste)
May 21, 2020, 4:33pm
4
Hi @Neofita . I have just tried to replicate you error, but duckling seems to setting the slot with the actual date rather than text for me (for both "“today” and “next week” inputs).
Could you share the output of the debug logs for the case when it didn’t work for you? I would be very interested in seeing the logs for the processing of the message “Next week”.
You can run you assistant in a debug model using the command rasa shell --debug
Neofita
(Mike)
May 21, 2020, 5:01pm
5
Here the result for next week
Your input -> next week
2020-05-21 12:59:11 DEBUG rasa.core.tracker_store - Creating a new tracker for id '44e1a7cd61764f2b83c72129c64e96d4'.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Starting a new session for conversation ID '44e1a7cd61764f2b83c72129c64e96d4'.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Action 'action_session_start' ended with events '[<rasa.core.events.SessionStarted object at 0x7f09c5ca5f60>, <rasa.core.events.ActionExecuted object at 0x7f09c5ca5f28>]'.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Current slot values:
PERSON: None
account_balance: 1000
amount_of_money: None
amount_transferred: None
confirm: None
credit_card: None
currency: $
end_time: None
grain: None
payment_amount: None
payment_amount_type:
requested_slot: None
search_type: None
start_time: None
time: None
vendor_name: None
2020-05-21 12:59:11 DEBUG rasa.core.processor - Received user message 'next week' with intent '{'name': 'inform', 'confidence': 0.999988317489624}' and entities '[{'start': 0, 'end': 9, 'text': 'next week', 'value': 'next week', 'confidence': 1.0, 'additional_info': {'values': [{'value': '2020-05-25T00:00:00.000-07:00', 'grain': 'week', 'type': 'value'}], 'value': '2020-05-25T00:00:00.000-07:00', 'grain': 'week', 'type': 'value'}, 'entity': 'time', 'extractor': 'DucklingHTTPExtractor'}]'
2020-05-21 12:59:11 DEBUG rasa.core.processor - Current slot values:
PERSON: None
account_balance: 1000
amount_of_money: None
amount_transferred: None
confirm: None
credit_card: None
currency: $
end_time: None
grain: None
payment_amount: None
payment_amount_type:
requested_slot: None
search_type: None
start_time: None
time: next week
vendor_name: None
2020-05-21 12:59:11 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 5 events.
2020-05-21 12:59:11 DEBUG rasa.core.policies.fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2020-05-21 12:59:11 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {'entity_time': 1.0, 'intent_inform': 1.0, 'prev_action_listen': 1.0}]
2020-05-21 12:59:11 DEBUG rasa.core.policies.memoization - Launch DeLorean...
2020-05-21 12:59:11 DEBUG rasa.core.policies.memoization - Current tracker state [None, None, None, {}, {'entity_time': 1.0, 'intent_inform': 1.0, 'prev_action_listen': 1.0}]
2020-05-21 12:59:11 DEBUG rasa.core.policies.memoization - There is no memorised next action
2020-05-21 12:59:11 DEBUG rasa.core.policies.form_policy - There is no active form
2020-05-21 12:59:11 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_0_FallbackPolicy
2020-05-21 12:59:11 DEBUG rasa.core.processor - Predicted next action 'action_default_fallback' with confidence 0.30.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Action 'action_default_fallback' ended with events '[BotUttered('Sorry, I didn't get that. Could you rephrase?', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1590080351.6903381), <rasa.core.events.UserUtteranceReverted object at 0x7f09c5ca55c0>]'.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Current slot values:
PERSON: None
account_balance: 1000
amount_of_money: None
amount_transferred: None
confirm: None
credit_card: None
currency: $
end_time: None
grain: None
payment_amount: None
payment_amount_type:
requested_slot: None
search_type: None
start_time: None
time: None
vendor_name: None
2020-05-21 12:59:11 DEBUG rasa.core.processor - Predicted next action 'action_listen' with confidence 1.00.
2020-05-21 12:59:11 DEBUG rasa.core.processor - Action 'action_listen' ended with events '[]'.
2020-05-21 12:59:11 DEBUG rasa.core.lock_store - Deleted lock for conversation '44e1a7cd61764f2b83c72129c64e96d4'.
Sorry, I didn't get that. Could you rephrase?
rasa==1.10.0
rasa-sdk==1.10.0
rasa-x==0.28.2
Juste
(Juste)
May 22, 2020, 8:46am
6
Hi @Neofita . Thank you so much for sharing these details, it makes it very easy to try and find the root cause for this.
However, I am not able to replicate this myself - the slot gets set correctly every time:
2020-05-22 10:38:43 DEBUG rasa.core.processor - Received user message 'next week' with intent '{'name': 'inform', 'confidence': 0.9999951124191284}' and entities '[{'start': 0, 'end': 9, 'text': 'next week', 'value': '2020-05-25T00:00:00.000-07:00', 'confidence': 1.0, 'additional_info': {'values': [{'value': '2020-05-25T00:00:00.000-07:00', 'grain': 'week', 'type': 'value'}], 'value': '2020-05-25T00:00:00.000-07:00', 'grain': 'week', 'type': 'value'}, 'entity': 'time', 'extractor': 'DucklingHTTPExtractor'}]'
2020-05-22 10:38:43 DEBUG rasa.core.processor - Current slot values:
PERSON: None
account_balance: 1000
amount_of_money: 100.00
amount_transferred: None
confirm: None
credit_card: iron bank
currency: $
end_time: None
grain: None
payment_amount: 100
payment_amount_type:
requested_slot: time
search_type: None
start_time: None
time: 2020-05-25T00:00:00.000-07:00
vendor_name: None
I am running the latest version of the financial assistant. The only difference is that I am using the latest rasa version too rasa==1.10.0, but to me it looks like it’s duckling that is not returning a proper converted date (for the “next week” it should return the first day of the following week).
Would you mind to try testing it once again in a fresh virtual environment with rasa==1.10.1 and the latest pull of financial bot?
Neofita
(Mike)
May 22, 2020, 10:19am
7
After updating rasa to the 1.10.1 I have the date in the time slot
thank you
1 Like