Multi-Stage Prompting for Knowledgeable Dialogue Generation (2022)

Abstract: Existing knowledge-grounded dialogue systems typically use finetuned versions of a pretrained language model (LM) and large-scale knowledge bases. These models typically fail to generalize on topics outside of the knowledge base, and require maintaining separate potentially large checkpoints each time finetuning is needed. In this paper, we aim to address these limitations by leveraging the inherent knowledge stored in the pretrained LM as well as its powerful generation ability. We propose a multi-stage prompting approach to generate knowledgeable responses from a single pretrained LM. We first prompt the LM to generate knowledge based on the dialogue context. Then, we further prompt it to generate responses based on the dialogue context and the previously generated knowledge. Results show that our knowledge generator outperforms the state-of-the-art retrieval-based model by 5.8% when combining knowledge relevance and correctness. In addition, our multi-stage prompting outperforms the finetuning-based dialogue model in terms of response knowledgeability and engagement by up to 10% and 5%, respectively. Furthermore, we scale our model up to 530 billion parameters and demonstrate that larger LMs improve the generation correctness score by up to 10%, and response relevance, knowledgeability and engagement by up to 10%. Our code is available at: https://github.com/NVIDIA/Megatron-LM .

## introduction dialogue systems face the problem of producing bland and generic outputs that are devoid of content @xcite @xcite . recent efforts have been made to address these concerns by grounding dialogue responses on a source of knowledge @xcite , 2018; @xcite @xcite . therefore, building a knowledgeable dialogue system has become one of the key milestone tasks in conversational research. current knowledge-grounded dialogue systems highly rely on a massive external knowledge corpus for a retrieval model to obtain relevant knowledge @xcite @xcite , which inevitably brings several limitations. first, retrieval systems are constrained to the size and domains of the database, and they cannot generalize to out-of-domain topics that are not covered by the database. second, retrieval from a massive corpus takes substantial resources. @xcite show that it is more difficult for the state-of-the-art retrieval model @xcite to retrieve relevant knowledge when the size of the database increases. the larger database increases the chance that an irrelevant document is closer to the query embedding than the relevant document. we aim to address these limitations by using a relatively small database and a pretrained language model (lm) @xcite as an additional source of knowledge to ground a dialogue system. since the lm inherently stores a variety of knowledge @xcite , it can help dialogue systems generalize to out-ofdomain topics that are not explicitly present in the database. we propose a prompt-based approach to directly generate the context-relevant knowledge from the lm. specifically, we select a few dialogue contexts and their associated knowledge from the database to be given as prompts to the lm for the knowledge generation. these samples are chosen such that the dialogue contexts are semantically closer to the current dialogue context. moreover, finetuning lms, which current dialogue systems rely on, could lead to overfitting when the finetuning dataset is relatively small. also, gigantic lms like @xcite and megatron-turing nlg 530b @xcite , may only be available through apis. hence, finetuning them on the dialogue task might not be a feasible solution. to bypass the finetuning process, we propose to further prompt the lm to generate the response based on the dialogue context and previously generated knowledge. we select a few dialogue contexts and corresponding knowledge and responses to be given as prompts to the lm for the response generation. the samples are chosen such that their responses are knowledgeable and highly conditioned on the corresponding knowledge. in summary, we present a novel multi-stage dialogue prompting (msdp) framework, which consists of a first-stage prompting for the knowledge generation and a second-stage prompting for the response generation. our framework does not need any finetuning or updates to the pretrained weights of the lm, can generate relevant and factually correct knowledge, and is effective at producing knowledgeable and engaging responses. our contributions are summarized as follows: ## framework our proposed multi-stage dialogue prompting (msdp) framework is illustrated in figure 1 . it consists of a knowledge generator and a dialogue generator, both using the same pretrained lm. the knowledge generator produces relevant knowledge to the input topic and dialogue history, while the dialogue generator generates engaging and knowledgeable responses based on the dialogue context and the generated knowledge. we denote the input topic as t, the input dialogue history as h, the last dialogue turn as h * , and a database of samples as d. each data sample in d is denoted by d i , and consists of a topic t i , a dialogue history h i with the last turn as h * i , corresponding knowledge k i , and a response r i . ## results in this section, we compare our framework with baselines for the knowledge and response generation. then, we conduct ablation studies to further analyze the effectiveness of our framework. ## conclusion we propose a novel multi-stage dialogue prompting framework which consists of a first-stage prompting for the knowledge generation and a secondstage prompting for the response generation. both automatic metrics and human evaluations show that compared to the state-of-the-art retrieval-based model, our knowledge generator can generate better context-relevant knowledge for both in-domain and out-of-domain dialogue topics. moreover, our framework is able to produce more knowledgeable and engaging responses compared to the finetuningbased dialogue model. additionally, we conduct comprehensive ablation studies to show the effectiveness of our proposed methods. furthermore, we scale the lm up to 530 billion parameters and demonstrate that larger lms consistently improve the generation correctness, and response relevance, knowledgeability, and engagement.