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.04k stars 4.44k forks source link

bot response doesn't make sense #1102

Closed nahidalam closed 6 years ago

nahidalam commented 6 years ago

I am using Chatterbot Corpus in the below code

bot = ChatBot(
    "Terminal",
    storage_adapter="chatterbot.storage.SQLStorageAdapter",
    logic_adapters=[
        "chatterbot.logic.MathematicalEvaluation",
        "chatterbot.logic.TimeLogicAdapter",
        "chatterbot.logic.BestMatch"
    ],
    input_adapter="chatterbot.input.TerminalAdapter",
    output_adapter="chatterbot.output.TerminalAdapter",
    database="./databaseTerminal.db"
)

bot.set_trainer(ChatterBotCorpusTrainer)
bot.train([
    "chatterbot.corpus.english"
])

I run the program and below question answers

Me: hi
Bot: How are you doing?
Me: I am good. Thanks
Bot: The current time is 05:21 PM
Me: I want to order some food
Bot: The current time is 05:21 PM
Me: tell me a joke
Bot: Did you hear the one about the mountain goats in the andes? It was "ba a a a a a d".
Me: no
Bot: Should I be?  Did something happen?

The response specially the 2nd and 3rd one doesn't make any sense. Responding with time when I am saying I am good. Thanks is unexpected. Maybe something like How can I help you? would make more sense. Also when I am taking about ordering food, at least it should go into some food direction as I see some food.ymltraining was done while running the program, but it responds with current time!!

What am I missing?

vkosuri commented 6 years ago

@nahidalam I agree with you, but it is not an issue technically, or impove MultiLogicAdapter. Could you please read this phase http://chatterbot.readthedocs.io/en/stable/logic/multi-logic-adapter.html#response-selection

However you could control this part by using it's confidence http://chatterbot.readthedocs.io/en/stable/logic/multi-logic-adapter.html#chatterbot.logic.multi_adapter.MultiLogicAdapter.get_greatest_confidence

vkosuri commented 6 years ago

And also i tagging this questions with testing, We had tests for MultiLogicAdapter, I am not sure for this case

ghost commented 6 years ago

@nahidalam have you seen how large the corpus is you have trained it with? It's very small...

pylobot commented 6 years ago

@nahidalam If you train more with data that match what you want the bot to respond as then it become more accurate.