This repository contains the source code for the following paper:
A Comprehensive Assessment of Dialog Evaluation Metrics
We use conda to mangage environments for different metrics.
Each directory in conda_envs holds an environment specification. Please install all of them before starting the next step.
Take the installation of conda_envs/eval_base for example, please run
conda env create -f conda_envs/eval_base/environment.yml
Note that there are some packages could not be installed via this method.
If you want find any packages such as bleurt, nlg-eval, and packages downloaded by spaCy are missing, please install it with official instructions.
We apologize for any inconvenience.
The directory of each qualitiy-annotated data is placed in data, with the data_loader.py for parsing the data.
Please follow the below instructions to downlaod each dataset, place it into corresponding directory, and run the data_loader.py directly to see if you use the correct data.
Download human_rating_scores.txt from https://www.dropbox.com/s/oh1trbos0tjzn7t/dstc6_t2_evaluation.tgz .
Download and Place the data directory https://github.com/ictnlp/DialoFlow/tree/main/FlowScore/data into data/dstc9_data.
Download https://github.com/PlusLabNLP/PredictiveEngagement/blob/master/data/Eng_Scores_queries_gen_gtruth_replies.csv and rename it to engage_all.csv.
Download http://shikib.com/fed_data.json .
Download and place each directory in https://github.com/li3cmz/GRADE/tree/main/evaluation/eval_data as data/grade_data/[convai2|dailydialog|empatheticdialogues].
Also download the human_score.txt in https://github.com/li3cmz/GRADE/tree/main/evaluation/human_score into the corresponding data/grade_data/[convai2|dailydialog|empatheticdialogues].
Download context_data_release.csv and fluency_data_release.csv from https://github.com/alexzhou907/dialogue_evaluation .
Download TopicalChat and PersonaChat data from http://shikib.com/usr
For baselines, we use the nlg-eval. Please folloow the instruction to install it.
For each dialog metrics, please follow the instructions in README in the corresponding directory.
PredictiveEngage, BERT-RUBER and PONE requires the running bert-as-service.
If you want to evaluate them, please install and run bert-as-service following the instrucitons here.
We also provide a script we used to run bert-as-service run_bert_as_service.sh, feel free to use it.
We used a web server for running USR and FED in our experiments.
Please modify path in usr_fed/usr/usr_server.py and usr_fed/fed/fed_server.py to start the server, and modify the path in usr_fed_metric.py.
After you downlaod all datasets, run gen_data.py to transform all datasets into the input format for all metrics. If you only want to evaluate metric metric and dataset dataset, run with gen_data.py --source_data dataset --target_format metric
Modify the path in run_eval.sh as specified in the script, since we need to activate Conda environment when running the script. Run eval_metrics.sh to evaluate all quality-anntoated data.
Some metrics generate the output in its special format. Therefore, we should run read_result.py to read the results of those metrics and transform it into outputs. As step 1, you can specify the metric and data by read_result.py --metric metric --eval_data dataset.
The outputs/METRIC/DATA/results.json holds the prediction score of each metrics (METRIC) and qualitiy-anntoated data (DATA), while running data_loader.py directly in each data directory also generates the corresponding human scores. You can perform any analysis with the data (The jupyter notebook used in our analysis will be released) .
For example, outputs/grade/dstc9_data/results.json could be
'GRADE': # the metric name
[
0.2568123, # the score of the first sample
0.1552132,
...
0.7812346
]
All values are statistically significant to p-value < 0.05, unless marked by *.
| USR-TopicalChat | USR-Pearsonachat | |||||||
| Turn-Level | System-Level | Turn-Level | System-Level | |||||
| P | S | P | S | P | S | P | S | |
| BLEU-4 | 0.216 | 0.296 | 0.874* | 0.900 | 0.135 | 0.090* | 0.841* | 0.800* |
| METEOR | 0.336 | 0.391 | 0.943 | 0.900 | 0.253 | 0.271 | 0.907* | 0.800* |
| ROUGE-L | 0.275 | 0.287 | 0.814* | 0.900 | 0.066* | 0.038* | 0.171* | 0.000* |
| ADEM | -0.060* | -0.061* | 0.202* | 0.700* | -0.141 | -0.085* | 0.523* | 0.400* |
| BERTScore | 0.298 | 0.325 | 0.854* | 0.900 | 0.152 | 0.122* | 0.241* | 0.000* |
| BLEURT | 0.216 | 0.261 | 0.630* | 0.900 | 0.065* | 0.054* | -0.125* | 0.000* |
| QuestEval | 0.300 | 0.338 | 0.943 | 1.000 | 0.176 | 0.236 | 0.885* | 1.000 |
| RUBER | 0.247 | 0.259 | 0.876* | 1.000 | 0.131 | 0.190 | 0.997 | 1.000 |
| BERT-RUBER | 0.342 | 0.348 | 0.992 | 0.900 | 0.266 | 0.248 | 0.958 | 0.200* |
| PONE | 0.271 | 0.274 | 0.893 | 0.500* | 0.373 | 0.375 | 0.979 | 0.800* |
| MAUDE | 0.044* | 0.083* | 0.317* | -0.200* | 0.345 | 0.298 | 0.440* | 0.400* |
| DEB | 0.180 | 0.116 | 0.818* | 0.400* | 0.291 | 0.373 | 0.989 | 1.000 |
| GRADE | 0.200 | 0.217 | 0.553* | 0.100* | 0.358 | 0.352 | 0.811* | 1.000 |
| DynaEval | -0.032* | -0.022* | -0.248* | 0.100* | 0.149 | 0.171 | 0.584* | 0.800* |
| USR | 0.412 | 0.423 | 0.967 | 0.900 | 0.440 | 0.418 | 0.864* | 1.000 |
| USL-H | 0.322 | 0.340 | 0.966 | 0.900 | 0.495 | 0.523 | 0.969 | 0.800* |
| DialogRPT | 0.120 | 0.105* | 0.944 | 0.600* | -0.064* | -0.083* | 0.347* | 0.800* |
| Deep AM-FM | 0.285 | 0.268 | 0.969 | 0.700* | 0.228 | 0.219 | 0.965 | 1.000 |
| HolisticEval | -0.147 | -0.123 | -0.919 | -0.200* | 0.087* | 0.113* | 0.051* | 0.000* |
| PredictiveEngage | 0.222 | 0.310 | 0.870* | 0.900 | -0.003* | 0.033* | 0.683* | 0.200* |
| FED | -0.124 | -0.135 | 0.730* | 0.100* | -0.028* | -0.000* | 0.005* | 0.400* |
| FlowScore | 0.095* | 0.082* | -0.150* | 0.400* | 0.118* | 0.079* | 0.678* | 0.800* |
| FBD | - | - | 0.916 | 0.100* | - | - | 0.644* | 0.800* |
| GRADE-ConvAI2 | GRADE-DailyDialog | GRADE-EmpatheticDialogue | ||||||||||
| Turn-Level | System-Level | Turn-Level | System-Level | Turn-Level | System-Level | |||||||
| P | S | P | S | P | S | P | S | P | S | P | S | |
| BLEU-4 | 0.003* | 0.128 | 0.034* | 0.000* | 0.075* | 0.184 | 1.000* | 1.000 | -0.051* | 0.002* | 1.000* | 1.000 |
| METEOR | 0.145 | 0.181 | 0.781* | 0.600* | 0.096* | 0.010* | -1.000* | -1.000 | 0.118 | 0.055* | 1.000* | 1.000 |
| ROUGE-L | 0.136 | 0.140 | 0.209* | 0.000* | 0.154 | 0.147 | 1.000* | 1.000 | 0.029* | -0.013* | 1.000* | 1.000 |
| ADEM | -0.060* | -0.057* | -0.368* | -0.200* | 0.064* | 0.071* | 1.000* | 1.000 | -0.036* | -0.028* | 1.000* | 1.000 |
| BERTScore | 0.225 | 0.224 | 0.918* | 0.800* | 0.129 | 0.100* | -1.000* | -1.000 | 0.046* | 0.033* | 1.000* | 1.000 |
| BLEURT | 0.125 | 0.120 | -0.777* | -0.400* | 0.176 | 0.133 | 1.000* | 1.000 | 0.087* | 0.051* | 1.000* | 1.000 |
| QuestEval | 0.279 | 0.319 | 0.283* | 0.400* | 0.020* | 0.006* | -1.000* | -1.000 | 0.201 | 0.272 | 1.000* | 1.000 |
| RUBER | -0.027* | -0.042* | -0.458* | -0.400* | -0.084* | -0.094* | -1.000* | -1.000 | -0.078* | -0.039* | 1.000* | 1.000 |
| BERT-RUBER | 0.309 | 0.314 | 0.885* | 1.000 | 0.134 | 0.128 | -1.000* | -1.000 |
$ claude mcp add DialEvalMetrics \
-- python -m otcore.mcp_server <graph>