How to keep conversation records

when users take a conversation with my chatbot, i want to keep the conversation records, that i can use these data to improve my chatbot