Skip to content

Latest commit

 

History

History
268 lines (237 loc) · 6.88 KB

README.md

File metadata and controls

268 lines (237 loc) · 6.88 KB

Rethinking the Evaluation for Conversational Recommendation in the Era of Large Language Models

This repo provides the source code & data of our paper: Rethinking the Evaluation for Conversational Recommendation in the Era of Large Language Models (Arxiv 2023).

😀 Overview

Highlights:

  • 1️⃣ We are the first to examine ChatGPT in conversational recommendation systematically, the ability of which is underestimated in traditional evaluation approach.
  • 💡 We propose a new interactive approach that employs LLM-based user simulators for evaluating CRSs.
  • 🔝 The recall@50 metric can be boosted from 0.218 to 0.739 on the redial dataset with our new interactive evaluation approach, even surpassing the currently leading CRS baseline.

we propose an interactive Evaluation approach based on LLMs named iEvaLM that harnesses LLM-based user simulators. We take the ground-truth items from the example as the user preference through the interaction, and use them to set up the persona of the simulated users by LLMs through instructions. To further make a comprehensive evaluation, we consider two types of interaction: attribute-based question answering and free-form chit-chat.

🚀 Quick Start

Requirements

  • python == 3.9.16
  • pytorch == 1.13.1
  • transformers == 4.28.1
  • pyg == 2.3.0
  • accelerate == 0.18.0

Download Models

You can download our fine-tuned models from the link, which include recommendation and conversation models of KBRD, BARCOR and UniCRS. Please put the downloaded model into src/utils/model directory.

Interact with the user simulator

  • dataset: [redial, opendialkg]
  • mode: [ask, chat]
  • model: [kbrd, barcor, unicrs, chatgpt]
cd script
bash {dataset}/cache_item.sh 
bash {dataset}/{mode}_{model}.sh 

You can customize your iEvaLM-CRS by specifying these configs:

  • --api_key: your API key
  • --turn_num: number of conversation turns. We employ five-round interaction in iEvaLM-CRS.

After the execution, you will find detailed interaction information under "save_{turn_num}/{mode}/{model}/{dataset}/".

Evaluate

cd script
bash {dataset}/Rec_eval.sh

You can customize your iEvaLM-CRS by specifying these configs:

  • --turn_num: number of conversation turns.
  • --mode: [ask, chat]

After the execution, you will find evaluation results under "save_{turn_num}/result/{mode}/{model}/{dataset}.json".

🌟 Perfermance

Performance of CRSs and ChatGPT using different evaluation approaches.

Model KBRD BARCOR UniCRS ChatGPT
Evaluation Approach Original iEvaLM(attr) iEvaLM(free) Original iEvaLM(attr) iEvaLM(free) Original iEvaLM(attr) iEvaLM(free) Original iEvaLM(attr) iEvaLM(free)
ReDial R@1 0.028 0.039 0.035 0.031 0.034 0.034 0.050 0.053 0.107 0.037 0.191 0.146
R@10 0.169 0.196 0.198 0.170 0.201 0.190 0.215 0.238 0.317 0.174 0.536 0.440
R@50 0.366 0.436 0.453 0.372 0.427 0.467 0.413 0.520 0.602 - - -
OpenDialKG R@1 0.231 0.131 0.234 0.312 0.264 0.314 0.308 0.180 0.314 0.310 0.299 0.400
R@10 0.423 0.293 0.431 0.453 0.423 0.458 0.513 0.393 0.538 0.539 0.604 0.715
R@50 0.492 0.377 0.509 0.510 0.482 0.530 0.574 0.458 0.609 - - -

Persuasiveness of explanations generated by CRSs and ChatGPT.

Model Evaluation Approach ReDial OpenDialKG
KBRD Original 0.638 0.824
iEvaLM 0.766 0.862
BARCOR Original 0.667 1.149
iEvaLM 0.795 1.211
UniCRS Original 0.685 1.128
iEvaLM 1.015 1.314
ChatGPT Original 0.787 1.221
iEvaLM 1.331 1.513

CRSLab will support this interactive evaluation approach, the results in our paper will be updated soon.

📮 Contact

If you have any questions for our paper or codes, please send an email to txy20010310@163.com.

🐦 Citing

Please cite the following paper if you find our code helpful.

@article{wang2023rethinking,
  title={Rethinking the Evaluation for Conversational Recommendation in the Era of Large Language Models},
  author={Wang, Xiaolei and Tang, Xinyu and Zhao, Wayne Xin and Wang, Jingyuan and Wen, Ji-Rong},
  journal={arXiv preprint arXiv:2305.13112},
  year={2023}
}