Rasa version:
1.6.1
Rasa SDK version (if used & relevant):
Rasa X version (if used & relevant):
Python version:
3.6.9
Operating system (windows, osx, ...):
Ubuntu 19.10
Issue:
When adding first user message Rasa is incorrectly pushing two action_listen event to tracker, which results in predicting ActionDefaultFallback instead of proper action defined in conversation. Error occurs when using tracker store different than InMemoryTrackerStore.
Full tracker of that conversation:
{
"_id" : ObjectId("5e1d829fc0f0571179a05a68"),
"sender_id" : "internal_6ded90eb-1713-4cc0-bb94-e44f10906aa9",
"active_form" : {},
"events" : [
{
"event" : "action",
"timestamp" : 1578992287.49245,
"name" : "action_session_start",
"policy" : null,
"confidence" : null
},
{
"event" : "session_started",
"timestamp" : 1578992287.49247
},
{
"event" : "action",
"timestamp" : 1578992287.49251,
"name" : "action_listen",
"policy" : null,
"confidence" : null
},
{
"event" : "action",
"timestamp" : 1578992287.49251,
"name" : "action_listen",
"policy" : null,
"confidence" : null
},
{
"event" : "user",
"timestamp" : 1578992287.49483,
"text" : "hej",
"parse_data" : {
"intent" : {
"name" : "greet",
"confidence" : 0.9904693961
},
"intent_ranking" : [
{
"name" : "greet",
"confidence" : 0.9904693961
},
{
"name" : "wypowiedzenie_polisy",
"confidence" : 0.0028299373
},
{
"name" : "lista",
"confidence" : 0.0022578358
},
{
"name" : "your_name",
"confidence" : 0.0019035154
},
{
"name" : "intencja_8",
"confidence" : 0.0013759891
},
{
"name" : "inform",
"confidence" : 0.0004938081
},
{
"name" : "goodbye",
"confidence" : 0.0004290111
},
{
"name" : "stop",
"confidence" : 0.000240524
}
],
"entities" : [],
"text" : "hej",
"disablesBot" : false,
"originalText" : "hej",
"intentId" : "5d131175239ef4004bae057f"
},
"input_channel" : null,
"message_id" : "e78661e26cc9411f823dbd02d1421caf",
"metadata" : {}
},
{
"event" : "action",
"timestamp" : 1578992287.79463,
"name" : "action_default_fallback",
"policy" : "policy_2_FallbackPolicy",
"confidence" : 0.3
},
{
"event" : "bot",
"timestamp" : 1578992287.79464,
"metadata" : {
"attachments" : []
},
"text" : null,
"data" : {
"elements" : [],
"quick_replies" : null,
"buttons" : null,
"attachment" : null,
"image" : null,
"custom" : null
}
},
{
"event" : "rewind",
"timestamp" : 1578992287.79464
}
],
"followup_action" : null,
"latest_action_name" : "action_listen",
"latest_event_time" : 1578992287.79464,
"latest_input_channel" : null,
"latest_message" : {
"intent" : {},
"entities" : [],
"text" : null,
"message_id" : null,
"metadata" : {}
},
"paused" : false,
"slots" : {
"form_state" : null,
"imie" : null,
"nazwisko" : null,
"requested_slot" : null,
"system" : null,
"zonaty" : null
}
}
There is also another bug connected with this one, that Rasa is falling into infinite loop of ActionDefaultFallback predictions. In Rasa code there is safety limit of action execution and predictions, but in our bot we are manualy calling endpoints for adding message, predicting action and executing predicted action and we have to implement check, that ActionDefaultFallback is not predicted two or more times in a row.
@tdzienniak Thanks for raising this issue. Did you used rasa shell or did you use the Rasa API for submitting the first user message?
@tabergma I used Rasa API.
@tdzienniak I have some trouble reproducing your error. Can you tell me the exact steps you did?
I started rasa with rasa run -m models --endpoints endpoints.yml --enable-api and configured an SQL tracker store in the endpoints.yml file. After the server started I sent a message to the server via http://localhost:5005/conversations/default/messages. The respond looked fine.
@tabergma hi, I have more details about this bug. It is also present in Rasa 1.7.0. I have created repository that can be used to reproduce this bug: https://github.com/tdzienniak/rasa-bug-with-mongo-tracker-store .
I was able to reproduce this, on master commit 4211b92b029:

To reproduce:
rasa init --no-promptendpoints.ymlrasa shelltracker.dbMy endpoints.yml file:
tracker_store:
type: sql
dialect: sqlite
db: tracker.db
cc @ricwo this is what I mentioned in the rasa export PR
@tdzienniak so the default trackerstores(InMemory) resulted in this bug? which tracker stores is better to avoid this bug?
fixed with Rasa Open Source 1.7.4