How Does Artificial Intelligence Work in a Chatbot?