CP-Rec: Contextual Prompting for Conversational Recommender Systems

Keyu Chen, Shiliang SunAAAI 2023 · DOI

Introduction

Conversational Recommender Systems (CRS) are designed to act as intelligent intermediaries, engaging users in natural dialogue to elicit preferences and provide tailored suggestions. However, modern CRS often struggle with the complexities of "multi-task" dialogues—conversations that fluidly transition between greetings, casual chitchat, preference elicitation, and formal recommendations.

Existing models frequently exhibit two critical deficiencies: poor task planning and weak topic elaboration. In task planning, models may fail to maintain a logical conversational flow, often jumping erratically between topics or losing sight of the recommendation goal. In topic elaboration, even when the correct task is identified (e.g., making a recommendation), the generated responses are frequently generic, repetitive, or contextually disconnected from the preceding dialogue.

An illustration of the challenges in task planning and topic elaboration within a recommendation dialogue.

The CP-Rec Framework

To address these gaps, the authors propose CP-Rec, a framework that decouples the recommendation logic from the conversational generation through a contextual prompting mechanism. The system is divided into two primary components: a Knowledge-Aware Recommender and a Prompt-Based Conversational System.

Knowledge-Aware Recommender System

This component builds a robust user profile by fusing two information streams. A BERT-based Context Encoder processes the immediate dialogue history, while a Knowledge Encoder (utilizing R-GCN) traverses an external Knowledge Graph (DBpedia). This dual approach allows the system to understand both the explicit conversation and the latent relationships between entities, such as recognizing that a preference for a specific actor implies interest in their broader filmography.

Prompt-Based Conversational System

Rather than computationally expensive fine-tuning of a large language model, CP-Rec utilizes a frozen GPT-2 backbone steered by Contextual Prompting. This involves two sub-modules:

  1. Topic Control: This module predicts the next logical subtask (e.g., "Request" or "Recommend") based on the current state of the dialogue.
  2. Prompt Search: This core innovation replaces fixed text templates with learnable, continuous prompting vectors. Using Transformer layers, the system constructs these vectors by integrating dialogue history, the predicted topic, and user preferences. These vectors are then prepended to the GPT-2 input to "steer" the model toward generating a contextually appropriate and purposeful response.
The CP-Rec architecture, detailing the interaction between the Knowledge-Aware Recommender and the Prompt-Based Conversational System.

Experimental Evaluation

CP-Rec was evaluated across five diverse CRS benchmarks: ReDial, DuRecDial, TG-ReDial, OpenDialKG, and INSPIRED. These datasets cover various domains (movies, books, music) and conversational strategies.

Key Results

CP-Rec achieved state-of-the-art (SOTA) performance across all metrics and datasets:

  • Recommendation Accuracy: On the ReDial benchmark, CP-Rec achieved a Hit@10 of 0.229, significantly outperforming established baselines like KGSF (0.176) and TG-ReDial (0.185).
  • Conversation Quality: The model demonstrated substantial improvements in linguistic diversity and overlap. On ReDial, its BLEU score of 0.405 nearly doubled that of a standard Transformer baseline (0.208).
  • Human Evaluation: Blind human testing confirmed that CP-Rec produces responses that are more coherent, fluent, and informative, with graders noting a distinct sense of purpose in the system's dialogue.

Insights and Future Work

The success of CP-Rec highlights the efficacy of continuous prompting over discrete, text-based templates. By keeping the underlying language model frozen, the system maintains general linguistic fluency while the learned prompts provide necessary domain-specific guidance. Ablation studies further emphasized that Topic Control is essential; without strategic planning, the quality of generated text degrades even if the recommendation engine remains accurate.

Future research directions include addressing the computational overhead of the attention-based Prompt Search module and reducing the system's dependency on high-quality, open-source Knowledge Graphs like DBpedia for niche domain applications. Additionally, incorporating more sophisticated long-term memory mechanisms could further enhance performance in multi-session interactions.

Summary updated

BibTeX
@inproceedings{chen2023cp,
  author = {Keyu Chen and Shiliang Sun},
  title = {{CP-Rec: Contextual Prompting for Conversational Recommender Systems}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i11.26487},
}
Figure