3
$\begingroup$

I am currently building a chatbot. What I have done so far is, collected possible questions/training data/files and create a model out of it using Apache OpenNLP; the model is able to predict all the questions that are in the training data and fails to predict for new questions.

Instead of doing all the above, I can write a program that matches the question/words against training data and predict the answer — what is the advantage of using Machine Learning algorithms?

I have searched extensively about this and all I got was, in Machine Learning there is no need to change the algorithm and the only change would be in the training data, but that is the case with programming too: the change will be in training data.

$\endgroup$
0

2 Answers 2

3
$\begingroup$

In my view ML does not work very well for conversational AI systems. It is generally alright for intent recognition, so getting what the user wants if they ask a question ("I want to book a flight?", "What is the weather in London?"), but anything after that quickly becomes difficult to handle, especially multi-step conversations that go beyond simple question/answer pairs.

My suggestion would be to plan possible dialogues out as flow charts (more like trees/graphs, as there can be multiple branches at any point), and then write a program that interprets the graph based on user input and gives appropriate replies. You will also want to have some conversational memory to keep track of any information the user has mentioned. That is also tricky to do in a ML system.

For a very simple framework to start off with, have a look at ELIZA. It's half a century old, but you can still use it as a starting point.

(Disclaimer: I work for a company that makes conversational AI systems)

$\endgroup$
2
  • $\begingroup$ With all the work with NMT models, I think weve gotten pretty far! (ofcourse theres alot more to do, but i dont think its worth overlooking) $\endgroup$
    – mshlis
    Commented Aug 16, 2019 at 17:12
  • $\begingroup$ I am actually looking to build intent finder, but both ML and programming seems to be same in that context $\endgroup$
    – java_dev
    Commented Aug 17, 2019 at 6:46
0
$\begingroup$

Sebastian Thrun in one of his online interviews once suggested that he thought that the conversational solution was a combination of both massive machine learning and rules based programming.

The problem in the case of chats is that our expectations are very high which dooms early solutions to failure. For the ML side we require large amounts of data, and while large amounts may be available they are highly biased and unbalanced; they mostly focus on one area (specialized context) and re-use the same sentence formulas over and over again, so the learning finds a comfortable corner case solution and refuses to learn anything else. People are so predictable so they are an unhelpful source of raw data.

One approach might be to use carefully constructed rules to generate the data that ML can learn from, rules that can guarantee broad contextual applicability and sentence construction variation.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .