by Vagelis H. 06/22/2020
We have all heard how chatbots are powered by Artificial Intelligence (AI), but what exactly does this mean? AI is a huge domain, and different people use to mean different things.
Chatbots need sophisticated technology to address a few hard problems.
1. The most publicized technology used by chatbots is deep learning. Deep learning uses neural networks to generate suitable output given some input. In chatbots, the input is typically the user’s message and the output is what the chatbot should respond.
A specific deep learning technology used in chatbots is sequence-to-sequence, which uses neural networks that input the history of message exchanges so far to compute the most suitable response. For example, if the input is “how are you doing?”, the output is “I’m fine, and you?” For sequence-to-sequence to work, we need a large training data of chat logs, so the neural networks can learn how messages are related to responses.
2. Another technology used by chatbots is Information Extraction (IE). Here, instead of trying to automatically generate the response, we just try to identify (extract) what information the user’s message contains. For example, if the user says “I can come tomorrow to Riverside”, IE can be used to extract: date=10/24/2018 (assuming today is 10/23/2018) and location=Riverside, CA. This information can be used by the branching logic of the chatbot to decide what to do next.
3. Text matching is used to determine if two messages are similar enough to be considered semantically equivalent. For example, in an FAQ chatbot, when a user types question “What is the cost?”, and an existing question is “How much is it?”, text matching can be used to determine that these two questions are the same. The most recent techniques to achieve accurate text matching are based on deep learning, and specifically on computing the similarity between document-to-vector embeddings.