How To Build a Neural Network Based Chatbot With Keras?

Author: Zen and the Art of Computer Programming

1 Introduction

Chatbot (chatbot in Chinese) is a multi-functional automatic assistant based on dialogue system, information extraction and natural language generation technology. It can communicate with users in real time, understand user needs and give corresponding feedback. In recent years, deep learning technology has developed rapidly in the fields of computer vision and natural language processing, and has made breakthrough progress. This article will introduce how to use Keras to build an end-to-end chatbot, and involves some training techniques and considerations. Hope this helps readers better understand how chatbots work.

2. Explanation of basic concepts and terms

  • Intent recognition: In a conversation, an intent is represented by text or voice commands entered by the user. We need to analyze the meaning of a text or voice command in context and then recognize its true intent. For example, "go to eat", "find me tickets to a show", etc. are all intents to find flight passengers.
  • Dialog state management: Dialog state management refers to state tracking between different conversation turns in a dialog. In every session, there are different contexts and information needs. Therefore, it is necessary to determine what to do next based on historical messages (that is, conversation records).
  • Generation model: The generation model is responsible for generating text to reply to the user. Generate appropriate responses by answering users' questions, analyzing conversation history, and combining factors such as knowledge bases.
  • Knowledge base: The knowledge base contains external information required by the dialogue system, such as movie previews, weather forecasts, news, stock market data, music playlists, character introductions, etc. Dialogue systems need to obtain useful information from knowledge bases to respond to users.
  • Dataset (Dataset): A dataset is a collection of multiple training samples, including original sentences, dialogue states, real replies, replies

Guess you like

Origin blog.csdn.net/universsky2015/article/details/132364116