Dynamic Open-book Prompt for Conversational Recommender System (2023)

Abstract: Conversational Recommender System (CRS) aims to deliver personalized recommendations through interactive dialogues. Recent advances in prompt learning have shed light on this task. However, the performance of existing methods is confined by the limited context within ongoing conversations. Moreover, these methods utilize training samples only for prompt parameter training. The constructed prompt lacks the ability to refer to the training data during inference, which exacerbates the problem of limited context. To solve this problem, we propose a novel Dynamic Open-book Prompt approach, where the open book stores users’ experiences in historical data, and we dynamically construct the prompt to memorize the user’s current utterance and selectively retrieve relevant contexts from the open book. Specifically, we first build an item-recommendation graph from the open book and convolute on the graph to form a base prompt which contains more information besides the finite dialogue. Then, we enhance the representation learning process of the prompt by tailoring similar contexts in the graph into the prompt to meet the user’s current need. This ensures the prompt provides targeted suggestions that are both informed and contextually relevant. Extensive experimental results on the ReDial dataset demonstrate the significant improvements achieved by our proposed model over the state-of-the-art methods. Our code and data are available at https://github.com/NLPWM-WHU/DOP.

## introduction conversational recommender system (crs) @xcite @xcite has emerged as a promising approach for providing personalized recommendations to users through natural language utterances @xcite . in contrast to the traditional recommender system, crs involves two primary participants, i.e., the user seeking recommendations and the recommender providing personalized recommendations based on individual experiences. the recommender performs two closely related subtasks: the item recommendation subtask, which predicts the item that the user might be interested in based on the utterance context, and the response generation subtask, which generates human-like responses in reply to the user's previous utterance. early methods in crs aim to ensure semantic consistency in two subtasks by employing various word-item alignment strategies, such as mutual information maximization @xcite and contrastive learning @xcite . recent advances in pre-trained language models (plms) @xcite @xcite have introduced new insights through prompt learning. this line of work is more data-efficient and flexible. notably, a pioneering work @xcite explores the generation of the prompt by fusing item semantics from external data source and word semantics in an utterance, thereby enabling the transfer of knowledge from plms to crs. despite the remarkable progress in prompt learning-based methods for crs, the current prompt design suffers from a severe challenge, i.e., the limited context within ongoing conversations especially at the inference phase. in the conventional training and testing scenario, the training data is solely used to learn prompt parameters and optimize the probabilities of ground-truth labels, with subsequent evaluation conducted on the testing data without extra information. however, it is hard for such prompt to memorize all training samples and has the risk of forgetting them, thereby exacerbating the problem of limited context. consequently, it hampers the generalization performance in finite dialogues during inference. this limitation can be analogized to studying from a book but experiencing difficulties in recalling learned knowledge during a "closed-book" examination @xcite . to address this limitation, it is worth considering the analogical learning process observed in human cognition. humans have the ability to retrieve relevant skills from deep memory through associative learning, enabling them to solve problems even in situations with limited contextual information. by leveraging the past successful recommendations as an "open-book" knowledge store, the recommender can learn and improve her recommendation strategies through a process akin to copying from a book rather than mere memorization. furthermore, not all knowledge in the store is relevant to current decision. a selective strategy is necessary to effectively activate memory for current recommendation. for instance, in figure 1 , the recommender 758 has successfully suggested the movie "50 first dates" to the user 903 and the movie "the conjuring 2" to the user 752 based on their specific needs within the given context. however, when the user 285 arrives with a preference for a funny movie, only the interaction with the user 903 can be referred to as she shares similar preference with the user 285. motivated by these observations, we propose a novel dynamic open-book prompt method for crs. on one hand, we aim to empower the prompt with historical experiences to enhance its contextual awareness within finite dialogues. on the other hand, we aim to tailor the prompt to fit the target user's needs in the current utterance. specifically, our prompt aggregates the recommender's historical accurate recommendations in the training phase via a global recommender-item graph, serving as an "open-book" knowledge store. furthermore, we incorporate the local utterance-level semantics which memorize the current context and reflect the user's comprehensive needs. to prioritize the target user's needs when forming the prompt, we dynamically retrieve similar contexts from the open-book knowledge store by fine-tuning the prompt's representation learning process which consists of three strategies, i.e., enhancing the node embedding, enhancing the graph structure, and passing the message. in this way, our model enables the prompt to provide informed and contextually relevant suggestions, thus guiding the plm to generate the item-aware representation. extensive experimental results on the redial dataset have shown the effectiveness of our proposed model. ## related work conversational recommender system conversational recommender systems have attracted attention due to recent advances in dialogue systems. @xcite have made substantial contributions by introducing the redial dataset, a basic resource in this field. to bridge the semantic gap between natural language expressions and users' preferences at the item level, researchers have explored various types of external data sources @xcite . another research direction focuses on aligning diverse types of data @xcite . previous approaches to crs have struggled with the integration of the recommendation and conversation module due to their disparate architectures. more recently, prompt learning has emerged as a promising solution to fill this gap. for example, @xcite leverage the knowledgeenhanced prompt based on a fixed pre-trained language model to fulfill both subtasks in a cohesive manner. however, the prompt in @xcite suffers from the limited context within ongoing conversations and has suboptimal performance. to address this issue, we propose to construct a dynamic open-book prompt-based model which explicitly creates an open-book knowledge store and retrieves relevant contexts as references from it, which can enhance the prompt's generalization capabilities during inference. graph learning graph convolutional networks have found extensive applications across various tasks @xcite ) by leveraging their ability to merge vertex features and input graph topology for efficient node embedding learning @xcite . however, the construction of the graph structure, typically performed manually or using the k-nearest neighbors method, is pretty susceptible to noise. hence researchers propose to learn adaptive graphs for facilitating downstream graph-based tasks @xcite @xcite . however, existing crs methods still adopt a fixed graph which is unable to adapt to different conversations. to overcome this limitation, we propose to fine-tune the item-recommendation graph by enhancing the recommender embedding, the graph structure, and the message passing process when constructing the prompt. our enhancement allows for dynamic retrieval of pertinent information from a static openbook knowledge store, satisfying diverse users' needs and evolving conversations. prompt learning prompt learning is a technique that can enhance performance in various tasks by incorporating additional information, known as a prompt, into the generation process of pre-trained language models (plms) @xcite . typically, the prompt is inserted at the beginning of the plm's input to exert better control over its generation @xcite @xcite . initially, the manual design of discrete prompts is a mainstream @xcite @xcite . however, such prompts lack a finetuning process and require extensive experiments, experience, and expertise in language, incurring significant costs. recent studies have paid more attention on automatically optimizing continuous prompts @xcite @xcite . we are also in line with this trend. ## methodology in this section, we present our proposed dynamic open-book prompt (dop) approach for crs. we start by introducing the basic open-book prompt, which leverages users' experiences from training samples to enrich the current context and facilitate decision-making even during inference. next, we design three strategies to incorporate utterancelevel semantics, which allow for dynamic retrieval in the "open-book" knowledge store to meet the specific needs of the target user. following this, we finally describe how the prompt guides the plm when performing the crs subtasks. figure 2 (a) illustrates a typical prompt learning framework for crs. ## experiments this section presents experimental results and the analysis. ## conclusion in this work, we propose an innovative approach to create a dynamic "open-book" prompt for the crs task. specifically, the open book stores historical accurate recommendations as the users' experiences, and the dynamically constructed prompt memorizes the user's current utterance and selectively retrieves relevant contexts from the open book. our objectives are twofold. firstly, we aim to leverage the recommender's successful experiences to enrich the context besides the user's finite dialogue. this enables the prompt to refer to the existing knowledge for decision-making during inference. secondly, we aim to customize the prompt to match the target user's needs. through three strategies to refine the representation learning process, our prompt can provide targeted suggestions that are both informed and contextually relevant. extensive experiments conducted on the redial dataset demonstrate the superiority of our proposed model over the state-of-the-art baselines.