Official Code Repository for the paper "PAIREVAL: Open-domain Dialogue Evaluation with Pairwise Comparison" (COLM 2024).
Building a reliable and automated evaluation metric is a necessary but challenging problem for open-domain dialogue systems. Recent studies proposed evaluation metrics that assess generated responses by considering their relevance to previous dialogue histories. Although effective, these metrics evaluate individual responses directly rather than considering their relative quality compared to other responses. To handle this, we propose PAIREVAL, a novel dialogue evaluation metric for assessing responses by comparing their quality against responses in different conversations. PAIREVAL is built on top of open-sourced and moderate-size language models, and we make them specialized in pairwise comparison between dialogue responses. Extensive experiments on multiple benchmarks demonstrate that our metric exhibits a higher correlation with human judgments than baseline metrics. We also find that the proposed comparative metric is more robust in detecting common failures from open-domain dialogue systems, including repetition and speaker insensitivity.
- Install the following packages.
torch
transformers
accelerate
bitsandbytes
scipy
tqdm
-
Download our LoRA checkpoints and datasets from here and locate them on the main directory.
-
Obtain your access to meta-llama/Llama-2-7b-chat-hf.
-
Execute the following code to evaluate PairEval on the preprocessed turn-level FED meta-evaluation dataset released by this paper.
python inference.py
- Check evaluation results on
output/
directory.
- Please reformat your dataset following
data/evaluaton/fed_turn.jsonl
. - change
--eval_data_name
argument inargs.py
.
Please make an issue on this repository or directly contact to [email protected].