8000 GitHub - DCRS-project/DCRS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DCRS-project/DCRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Broadening the View: Demonstration-augmented Prompt Learning for Conversational Recommendation

This repo contains code and data for the paper: "Broadening the View: Demonstration-augmented Prompt Learning for Conversational Recommendation".

1. Setup

Please install libraries, packages listed in the conv/requirements.txt file. Make sure that you are using CUDA 11.6. Otherwise, some unexpected behaviors might happen.

2. Data Preprocessing

You can download the processed data (including conv, rec, and retrieval data) from the following link.

For a fair comparison, we adopted the code from VRICR and UNICRS to process data for the recommendation engine and dialogue module respectively.

3. Training Retrieval Module:

We build our retrieval module based on SimCSE . First, you need to generate data which is utilized to train our retrieval model.

python gen_data_for_retrieval.py

To train our retrieval module, please run

cd retrieval
sh run_unsup_example.sh

To generate retrieval data, please run

python test.py

4. Training Response Generation Model

For the ReDial dataset, to train our response generation model, please run:

cd conv
sh scripts/train_conv_retrieval_redial.sh

To produce generated responses, please run the following command:

sh scripts/infer_retrieval.sh

5. Training Recommendation Engine

To train our recommendation engine, you need to first pre-train neural embeddings of demonstrations.

cd rec
sh scripts/pretrain.sh

To finetune our recommendation engine, please following commands:

sh scripts/train_rec.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0