Session handling

I just wanted to see what kind of time frames you are using for user sessions. When they expire, different states etc…

We started by using a time frame say 5-10 minutes of inactivity but sometimes people just aren’t quick to reply back and conversations can even last even over days. So wondering what you all define as a session.


Hm, interesting. Yeah, haven’t really thought too deeply into what defines a “session”. I suppose at the moment how we are doing that and how it’s represented in our analytics is every time some one sends a messages that is a session. Then we are measuring the time between messages sent and finding the average.

1 Like

hi there! my first post here :slight_smile:

I’m also facing the same challenges: session and dialog handling.

In the project I’m developing (HR bot), session is a well defined interaction with the chatbot:

  • Starts with a greeting (‘hi!’)
  • Message exchange (dialog)
  • Ends with a greeting (‘bye’)

So in this case the session start and end are well defined.
The issue I’m having is in the “dialog” part: say the chatbot asks you:
"what did you accomplish last week?“
Your answer can be just one message back: “Nothing” (lol) or can be a sequence of messages:
“Well I worked in project X”
“And I helped with proejct Y”
“And I was sick 2 days”
The challenge is, when does the bot know you’re done with the “complete” answer? In normal user interaction, the tone of voice, the body language, the pauses, etc. will somehow “mark” the end of an answer (and even with all those cues is not 100% accurate). But for a bot who only sees messages is kind of hard.
The only mechanism I thought so far is to give the human a specific timeframe to give an answer. If the answer is identified as an “open ended statement” (through NLP?) and X seconds passed by, then the bot would ask something like “aah, is that it?” (or something between those lines…) otherwise it would go on with the dialog.

But as Joseph said, what defines a session? :slight_smile:



I’ve used both 30 minutes and 1 hour, but at the moment I’m just using session time for analytics (e.g. sessions/user/day), I’m not varying the bots response based on this (although that’s a good idea).

1 Like

My bot is a note taking bot, and the session ends when the user completed their note. There is a specific interaction for completing the note (“done”), but if the user doesn’t add anything to it for an hour, the session ends automatically and the note gets finalized (uploaded to Evernote in my case).
However, I think that in many cases, the best thing to do is NOT to end the session after a time period, but to ask the user. For example, you could ask the user “do you want to continue where we left off?” if more than two hours passed since your last interaction, and provide convenient quick-replies or buttons to answer.
I also think that you really need to consider if you have to end a session at all. I don’t know what your bot does, but many times there is no compelling reason to end a session at all - the conversations can be structured so you can either continue where you left off or respond correctly if the user starts on a different thread of conversation - essentially, you can tell if the user wants to continue or is off on another request. After all, that’s what a human would do - a human would never assume you’re talking about something new jus because a set amount of time has passed, they would surmise it from what you say.

1 Like