I want to know after finding the closest match from the text section of the response table how chatterbot is generating the "in_response_to" list and the "in_response_to_contains" list. If somebody could enlight me this then it would be a great help.
The in_response_to list is generated based on previous input statements that the bot receives. So for example, lets say that the following interaction occurs:

User: "Hello, how are you?"
Bot: "I am well, how are you."
User: "I am also well."

In this case, the bot would learn based on how the user responded to it. So "I am also well." is added to the in_response_to list of "I am well, how are you."

For the second part of your question, the in_response_to__contains is an attributed used to tell the chat bot to query the database for statements where the in_response_to field contains a particular response.
how chatterbot is creating the in_response_to and in_response_to_contains list