Limit the number of questions a user asks

I am building a Chat based AI Agent and want to limit the number of questions a user asks per day (e.g 10 questions)

If I put condition based on chat session id it does not work as if a user refreshes the chat he gets a new chat id.