Font Size: a A A

Research And Implementation Of Chatbot Based On Pre-training Technology

Posted on:2023-01-24Degree:MasterType:Thesis
Country:ChinaCandidate:T ZhangFull Text:PDF
GTID:2558307145468114Subject:Computer technology
Abstract/Summary:
The popularity of social media has provided a large amount of corpus data for chatbots,making big data-driven models an important mean to build chatbots.From the perspective of implementation,big data-driven chatbots are generally divided into two types: retrieval type and generative type.The former matches responses by contextual similarity,while the latter generates responses based on context.Both methods have their advantages and disadvantages.Retrieval chatbots give better quality response utterances but are limited by the corpus,while generative chatbots do not need to build a specific corpus and can make certain responses to any question.However,the quality of the utterances generated by both is poorer,and the problem of answering the wrong question may occur.In this paper,we take the advantages of retrieval to complement the shortcomings of generation,integrating the retrieval model into the generative model to build a joint model so that the responses of chatbots are richer and have better contextual relevance.The specific work is as follows:First,a generative response model based on BERT and GPT-2(RGBG)is proposed.The model adopts an encoder-decoder structure to generate response statements word by word using BERT for feature extraction of text data and GPT-2 for decoding the semantic vectors.Then,the BERT-based retrieval response model is implemented.Through technologies such as named entity recognition and text similarity calculation,the corresponding replies are retrieved from the constructed corpus to improve the accuracy and richness of chatbot responses.Finally,the generative and retrieval models are fused together by using intent recognition techniques,while the GUI interface of the chatbot is constructed to enable interaction with the chatbot through web pages.The experimental results show that the perplexity score of the RGBG model on the Chinese Douban dataset is 91.29,which is 7.4% higher than the traditional Seq2Seq+Attention model,verifying the effectiveness of the RGBG model.The fusion model scores 1.70/2.0 and 1.58/2.0on sentence quality and contextual relevance through manual evaluation,indicating that the chatbot designed in this paper has good performance on both sentence quality and contextual relevance.
Keywords/Search Tags:Chatbot, BERT, Generative Dialogue, Retrieval Dialogue
Related items