Skip to main content

Greetings, in the World of Chatbots

Imagine a scenario - You are on a website, and on the bottom right you see a chat window. You realize that it is a virtual assistant, some kind of a chatbot. The look of that window tempts you to experiment. You have interacted with various chatbots previously, a kind of a hobby you have developed, and have seen how miserable the chatbots are.

So you start your usual conversation with a Hello. The chatbot replies with “Hello. How can I help you?”.

You think yourself as a grand experimenter. You have heard of the Turing Test, and you feel like testing this bot. You say “Hello” again, expecting a similar reply that you got earlier, but to your surprise you get “Hey you. I guess we have exchanged greetings. How can I help you?”

You are not satisfied, you want to test it further. You say “Hi, what’s up?”. Will the chatbot get irritated, you ask yourself. The chatbot replies “So you want to play the hello game? I am all for it, as long as you don’t get tired.” You get shocked, it sounds real, like a human. You feel there must be a human who is answering all your hellos, how else the chatbot is able to do such a complicated thing. To program conversation even if it deals with greetings is a difficult thing, only AI can do that. You continue your conversation, and continue testing the bot.

You reply “I will like to play this game of hello”. The chatbot takes some time, as if it is thinking, just like a human. You are on your toes, and you get a reply. “Hello! Sorry for replying late, I was reading the internet about various forms of greetings. If you are interested I can greet you in any language on this earth, including tribal.” You are shocked, you feel like this is a dream, one taken from your long list of chatbot fantasies. Looks unreal. You didn’t expect the game of greetings will take this turn. You fall into the trap, and reply “Bonjour”. As of now you think, the chatbot will take some time to reply, as it might have to first process what you said is french, and then use all the translation mechanisms to understand. But you get a quick reply, and that too in french, with a tinge of sarcasm - “répondre à un bonjour, surprised?” As if the bot is reading your thoughts, as if the bot is some kind of psychoanalyst.

You don’t know anymore french, so you give up on the french. You want to try something that the chatbot will fail for sure, like a thought experiment. You are still thinking, the chatbot continues its sarcasm, like it is the other way round, like it is the one who is testing you. “Hello, are we still playing the game, you still there?” Like a trapped gamer, you reply “Am still there, just thinking”. The bot quickly replies “Are you thinking how to break me? Iam good in greetings, I was trained well, and I have all the knowledge that I just acquired from the internet that possibly you don’t have”. And you have no words, you get scared, and close the chat window. You will never know whether there was a human or a chatbot on the other side. You still can’t believe, and you don’t want to test the bot further.

Will you like to test the bot further? You probably would want to, but there is as of now no bot which is capable of doing what the above bot did. The above bot is an example of Artificial General Intelligence (AGI), where it has achieved human intelligence.

Today’s chatbots are still primitive, only able to understand intents of a question, but failing miserably when it comes to understanding the context, and giving appropriate answers by extracting information.

For the above chabot to be truly answering like that, it must be able to do the following things:
  • Natural language understanding
  • Understanding intent of the chat
  • Able to understand the context in which the chat is happening (In the above case, the context was the game of hello)
  • Knowledge extraction
  • Planning and learning
  • Reasoning

AI is slowly maturing, and in the near future you might face such a scenario with a chatbot, that has achieved AGI.

Watch this space to know about how to create your own chatbot. It will be able to answer the basic questions at least.

You can also chat with Cere Labs chatbot on Facebook. It will answer your basic questions regarding Cere Labs. The bot is slowly getting matured, as it continues to learn the conversations that take place on the Facebook page.

P.S: Cere Labs is working towards making a chatbot that will achieve AGI, but hopefully our bot will not be that sarcastic.


Popular posts from this blog

Implement XOR in Tensorflow

XOR is considered as the 'Hello World' of Neural Networks. It seems like the best problem to try your first TensorFlow program.

Tensorflow makes it easy to build a neural network with few tweaks. All you have to do is make a graph and you have a neural network that learns the XOR function.

Why XOR? Well, XOR is the reason why backpropogation was invented in the first place. A single layer perceptron although quite successful in learning the AND and OR functions, can't learn XOR (Table 1) as it is just a linear classifier, and XOR is a linearly inseparable pattern (Figure 1). Thus the single layer perceptron goes into a panic mode while learning XOR – it can't just do that. 

Deep Propogation algorithm comes for the rescue. It learns an XOR by adding two lines L1 and L2 (Figure 2). This post assumes you know how the backpropogation algorithm works.

Following are the steps to implement the neural network in Figure 3 for XOR in Tensorflow:
1. Import necessary libraries

Understanding Generative Adversarial Networks - Part II

In "Understanding Generative Adversarial Networks - Part I" you gained a conceptual understanding of how GAN works. In this post let us get a mathematical understanding of GANs.
The loss functions can be designed most easily using the idea of zero-sum games. 
The sum of the costs of all players is 0. This is the Minimax algorithm for GANs
Let’s break it down.
Some terminology: V(D, G) : The value function for a minimax game E(X) : Expectation of a random variable X, also equal to its average value D(x) : The discriminator output for an input x from real data, represents probability G(z): The generator's output when its given z from the noise distribution D(G(z)): Combining the above, this represents the output of the discriminator when 
given a generated image G(z) as input
Now, as explained above, the discriminator is the maximizer and hence it tries to