Using the BestMatchAdapter of Chatterbot, it confuses two questions with the same answer. For example, training the ai.yml.
What is ai?
Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
What is a joke?
Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
On the otherhand, the following similar questions make much sense in the bot answer:
Can you bend?
No I can be perpetuated indefinitely.
Can you lie?
No I can be perpetuated indefinitely.
2
Answers
This adjustment makes it work @Mallikarjunarao Kosuri(much credit for your suggestion).
@taiwotman I don’t know the corpus files you have trained. In short the best match algorithm works like this, Bot will iterate all the statements which you have trained the bot.
Chatterbot uses the default statement comparison algorithm is levenshtein_distance
In your example, the scenario look like this
In this the confidence is 1.0 and you will get answer
Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
I think you were confused with this case. The chatterbot
default threshold values is 65%
. Among on all statement which have greater confidence then it will become as response.In this the confidence is 0.77 which is greater than 0.65 and you will get answer
Artificial Intelligence is the branch of engineering and science devoted to constructing machines that think.
I think you tried your botai conversations
other you may get accurate results.However you could get more granular results by setting confidence to 0.90 by using low-confidence-response-adapter.
The same answer applies to second question also. Let me know your suggestion/improvements on this question