Tracker Stores - What does it include?

Hello There

I am currently trying to figure out how I could best save previously gathered conversation data (let’s say from sharing with real users) to a database (let’s say a SQL database). My bot is one large form, so all my users responses are saved in slots (using from_text as an extraction method) I have 2 options in mind:

  1. Using Tracker Store (SQLTrackerStore) to store conversation data
  2. Using a custom action at the end of the conversation. In there - with the use of a SQLConnector - save all the relevant slots to the database.

However, I am not too certain which information is provided from the Tracker Store. Are f. ex. slot values saved in the tracker store or ist it just the user messages?

Thanks in advance!

@BotEnthusiast Hello!

You can follow any approach, But, I would recommend to save the data into SQL or PostgresSQL both will store all the bot/user conversation logs, I had used both Personal but, I prefer more PostgresSQL, as you can import the data into excel.

Whatever, you see at the console screen when you run rasa using below command you can save all in database :

rasa run -m models --enable-api --cors "*" --debug

In endpoints.yml

For SQL:

tracker_store:
   type: SQL
   dialect: "mysql+pymysql"  # the dialect used to interact with the db
   url: "localhost"  # (optional) host of the sql db, e.g. "localhost"
   db: "rasa"  # path to your db
   username: "root"  # username used for authentication
   password: "root"  # password used for authentication

For PostgresSQL:

tracker_store:
   type: SQL
   dialect: "postgresql"  # the dialect used to interact with the db
   url: "localhost"  # (optional) host of the sql db, e.g. "localhost"
   db: "chatbot"  # path to your db
   username: "postgres"  # username used for authentication
   password: "123"  # password used for authentication
   # query: # optional dictionary to be added as a query string to the connection URL
   #   driver: my-driver

Note: You need to install PyMySQL, and I guess psycopg2-binary respectively

I hope this will solve your issue. Good Luck!

Thank you so much for you answer! Already helped a lot :slight_smile:

Maybe I need to rephrase the question: If I use let’s say PostgresSQL, can you tell/show me what the saved data looks like? Meaning, are slot values, entities, the user entries etc. all included in the database? So short: What is included in the bot/user conversation logs?

Thanks :slight_smile:

@BotEnthusiast As per NDA, I can not share much of my data, but I can share this snippet from my Postgres Database and I can rest assure you that you will see all the data which you are able to see in --debug mode. Under data column you will be able to bot, user and all the actions events.

I hope this will motivate you, and please can I request, close this thread with the solution for others. Keep safe!

@BotEnthusiast can I request you to please close this thread as a solution for others. Many thanks.