Where are rasa slots stored while in a conversation? Are they stored in an SQL-like database?

I am researching on the topic of Rasa slots, if multiple users log in at the same time to a Rasa instance. I wanted to know where are the key-value pairs of slots stored while a conversation is ongoing. I had a look at rasa.db, but it only contained the table ‘domain_slots’ with the attributes of a slot. If multiple users use the chatbot at the same time, will it process user A’s slots separately from user B’s slot? How will it distinguish between different conversations? I know that a conversation ID is being generated. I also looked at tracker store, but that didn’t answer my question. How are the slots mapped to a conversation?

In simple terms, where are rasa slot key-value pairs stored?

@actorkrishna Hello! Your question is very interesting and in one question you asked everything, so let me explain.

I guess you are using Rasa-X, but I will explain this based on Rasa Open Source. When we build our bot, and run the bot on some live world Website, it depends on session based on front end (chat widget) that’s how SocketIO play a major role and even APIs to GET and POST, it’s at the backend generate sender id means if simultaneously 10 session are logged in it will generate 10 session id, and at the backend rasa in memory store i.e ( InMemoryTrackerStore is the default tracker store. It is used if no other tracker store is configured. It stores the conversation history in memory.) will see I need to answer based on session id and then bot reply simultaneously but to different session. At backend, there are separate events i.e bot, user and actions which save all the records in memory. I would encourage, try use the tracker store for PostgresSQL or MySQL to save the conversations for all the sessions i.e bot/user conversation, if you are using Rasa-X, you can send it your mobile via WhatsApp or to your friends via email etc, and then check the stored data, is rasa able to answer everything simultaneously or not at a same timestamp or not. Even, you can check the rasa logs, I use rasa open source so rasa shell --debug will give you everything what’s at backend rasa is doing.

Ref link: Tracker Stores | Using a custom tracker store to manage max event history in RASA. | by Simran Kaur Kahlon | Gray Matrix | Medium

Note: This is my own perception logic, based on some fact, videos, rasa documentation and experience, I can also be wrong, or if any reader what to correct me I am happy to learn; but I personally performed; simultaneously at same timestamp asked same question with my bot i.e 10-15 session running and chating with my bot :slight_smile:

If hope, above suggestion at least helped you some way. Keep thinking like that and keep searching. If this solve your query, please do close this thread with the solution for others.Good Luck!