AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

If a bot had a brain, what would be it’s thought process? 
 
 

I came here as a complete noob. Well… I still am lol. Other newbies must also wonder how the bot works.

Please describe in layman’s terms how a bot functions when you say hello to it.

“Gosh, it would be awful pleasin’
To reason out the reason
For things I can’t explain
Then perhaps I’ll deserve your
And be even worthy of you
If I only had a brain”
Tin man

 

 
  [ # 1 ]

That quite depends on the bot. There are various systems that go about it in different ways. The simplest and most common is called “pattern matching” and works like a lookup table. The bot’s creator first makes a list of all expected inputs and writes them down along with default answers to return.

input: Hello.
answer: Hello to you to.

input: How are you?
answer: I am fine.

input: Yes or no?
answer: Yes.

When the bot gets an input, it simply looks it up in the list and responds with the corresponding default answer. Every answer is manually rigged. Of course, you can never anticipate every exact input, so the list also has answers in response to just a few keywords. And when the list of answers does not contain any matching input or keyword to what the user said? Then it simply fails, and usually the bot gives a random default answer to change the topic.

This can be made increasingly more complex though. Some systems allow you to finetune the list with grammatical data (e.g. give a different answer to the verb “wind” and the noun “wind”). You could also take the subject of an input phrase, whatever it is, look up some facts about it in a database, and give that fact as answer. (e.g. “What is a X” -> look up definition of X in a database or wikipedia and return that as answer). As Andrew mentioned in the other topic, Cyc is one such database, but also WordNet. You could also add programming to make the bot draw inferences between simple facts. That’s about as far as conventional chatbots go.

Then there’s the statistical approaches, which again, use a list of answers. A good example is Cleverbot, who learned (copied) all its answers from humans who chatted to it. It also remembers which answer was typed in response to which answer, and so pretty much parrots its users. However, when it has multiple answers on file for the same input, it chooses the best one by scoring each listed answer by how many of the same words it contains, and/or how often it saw a human give that answer. Technically you could add all sorts of underlying data to this statistical score system, like emotional values associated to certain words. If the user enters a sentence with words that indicate anger (there are word lists for this called sentiment databases), the bot could give a higher score to answers that also contain angry words. The highest scoring answer is then chosen.

And then there is artificial intelligence, which is too broad a field to explain easily and much less used in chatbots. Though technically Cleverbot’s use of a neural network for its scoring system is also artificial intelligence, and pattern matching can be augmented with it.

 

 
  [ # 2 ]

Thanks I’m processing so much information in my head right now, I’ll definitely get back to this red face

 

 
  login or register to react