gunthercox / ChatterBot

ChatterBot is a machine learning, conversational dialog engine for creating chat bots
https://chatterbot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
14.05k stars 4.44k forks source link

Incorrect answer to any question #1765

Open edilson-silva opened 5 years ago

edilson-silva commented 5 years ago

I'm getting incorrect reponse from my ChatBot.

1 - My Chatbot was created using the following code:


from chatterbot import ChatBot
from chatterbot import comparisons
from chatterbot import response_selection

bot = ChatBot(
    'Test Bot',
    storage_adapter='chatterbot.storage.MongoDatabaseAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch',
            'statement_comparison_function': comparisons.levenshtein_distance,
            'response_selection_method': response_selection.get_random_response,
            'threshold': 0.65,
            'default_response': 'Repeat please!'
        }
    ],
    database='test_db',
    database_uri='my_mongo_connection_url_here',
    read_only=True
)

2 - I was training this sentences:

Question: Would you like something to eat? Answer: Yes, I would like a bread.

Question: Would you like something to drink? Answer: Yes, I would like a cup of orange juice.

Question: Can you help me? Answer: No, I don't.

Question: What is a ChatBot? Answer: ChatBot is a conversational agent.

My big problem is: Even though I'm sending a random message I never get the default response, In most interactions I get the response to the first trained message or a random response, which in some cases are the same messages saved and not their responses.

I.E: I send "I hate you" and the ChatBot returns me "Yes, I would like a cup of orange juice" or any question like "What is a ChatBot?" instead of my default response that is 'Repeat please!'.

HassanSheraz commented 4 years ago

@edilson-silva sir have you solved this error because m facing the same issue. if you have solved then please help me

rohanrmallya commented 4 years ago

I think what you are looking for is answered in the low confidence response example