hello all ,
how can we train the chatterbot effectively to achieve the good response from bot.
can you give suggestions to improve the quality of response from chatbot.
how can we train the chatterbot effectively to achieve the good response from bot.
A high amount of confidence. will give accurate response from bot. To set threshold like this
bot = ChatBot(
'Default Response Example Bot',
storage_adapter='chatterbot.storage.SQLStorageAdapter',
logic_adapters=[
{
'import_path': 'chatterbot.logic.BestMatch'
},
{
'import_path': 'chatterbot.logic.LowConfidenceAdapter',
'threshold': 0.90,
'default_response': 'I am sorry, but I do not understand.'
}
],
trainer='chatterbot.trainers.ListTrainer'
)
thanks for the reply .
Actually i want to know about HOW TO TRAIN a basic chatbot with more amount of data.
@Hemanth2396, you should just create a dataset (dialogue corpus) and format it to one of the using formats to training.
There are list of state-of-the-art corpuses for training chatbots: chat_corpus
@7633 Can you give a detailed explanation about this, If you have tried and succeeded in doing this?
Actually i want to know about HOW TO TRAIN a basic chatbot with more amount of data.
@Hemanth2396 and @anilneeluri
For large amount of data, it is recommended to write your corpus file. I think the below Q&A will answer your questions.
Chatterbot does support both YAML and JSON format in question and answers. You could find a large number of corpus files here https://github.com/gunthercox/chatterbot-corpus/tree/master/chatterbot_corpus/data.
Example
- - text: Hello, how are you doing today?
- text: I am doing well, thank you.
- - text: I cannot find my keys.
- text: Where was the last place you remember having them?
Training is the process involves loading example dialog into the chat bot鈥檚 database. Chatterbot does support different training classes to train your bot.
So this is not an easy thing to complete. We don't usually get the data set in the yaml format i.e the question and answer format and practically is it possible to get the large amount of data in that format?
You could write your own training class for example UbuntuDialogCorpus and Twitter Training classes take a look exists training classes https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/trainers.py
@vkosuri Could you please give more details about how to use JSON instead of YAML as a format for the corpora?
I tried writing this on the json file:
{"categories":"test_json",
"conversations": {"- - text": "Hello, how are you doing today?",
" - text": "I am doing well, thank you.",
"- - text": "I cannot find my keys.",
" - text": "Where was the last place you remember having them?"}}
It doesn't send an error on the console but the chatbot doesn't know the answers when say hello or when I ask her about the keys.
Try this:
{
"conversations": [
[
"Hello, how are you doing today",
"I am doing well, thank you"
],
[
"I cannot find my keys",
"Where was the last place you remember having them?"
]
]
}
This should be the proper JSON structure for training
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
A high amount of confidence. will give accurate response from bot. To set threshold like this