How to clear events in rasa tracker

Hi,

After several conversations with the bot the number of events in action tracker increases very much and that results in increase in latency and intent misclassification. I have tried using CustomTrackerStore , but it was not of any help.

I receive following log during debugging:

2021-01-29 11:33:09 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 9566 events.

After many events stored i see following line very often:

2021-01-29 11:33:10 DEBUG rasa.core.policies.memoization - There is no memorised next action 2021-01-29 11:33:10 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, ‘deny’.

Is dere any way to clear the tracker events when i /restart the chat.??

hello @ojas, you can use redis tracker store and set a time to clear the tracker of a particular conversation,

UPDATE YOUR ENDPOINTS.YML FILE
tracker_store:
type: redis
url: ${REDIS_HOST}
port: ${REDIS_PORT}
password: ${REDIS_PASSWORD}
db: 1
record_exp: 180

here record_exp is a time in seconds to clear all events and slots in tracker of the conversation with last message time more then 180 seconds

Thanks for your reply!! @Rabi

I think it might be risky because if the user in the middle of conversation and events get cleared then it may create issue.

Just like slots value are reset when we pass ‘/restart’ so can we do anything same for the events. i.e. when the chat ends and user closes or goes back from the chat window then can we reset the tracker events.

@ojas yes yes - in our case we have a inactivity timer that end conversation between customer and bot/agent so fine for us

but yes you are right it is risky for normal use

you can customize Rasa and fix the max_event_history variable