Q-TOD is a novel Query-driven Task-Oriented Dialogue system, which consists of three sequential modules: query generator, knowledge retriever, and response generator.
- Query generator extracts the essential information from the dialogue context into a concise query in an unstructured format of the natural language.
- Knowledge retriever is an off-the-shelf retrieval model, which utilizes the generated query to retrieve relevant knowledge records.
- Response generator produces a system response based on the retrieved knowledge records and the dialogue context.
Prepare models and datasets.
bash ./prepare.sh
It downloads six fine-tuned models to ./models
:
- Q-TOD_T5-Large_SMD: the pre-trained T5-Large is fine-tuned with the SMD.
- Q-TOD_T5-Large_CamRest: the pre-trained T5-Large is fine-tuned with the CamRest.
- Q-TOD_T5-Large_MultiWOZ: the pre-trained T5-Large is fine-tuned with the MultiWOZ.
- Q-TOD_T5-3B_SMD: the pre-trained T5-3B is fine-tuned with the SMD.
- Q-TOD_T5-3B_CamRest: the pre-trained T5-3B is fine-tuned with the CamRest.
- Q-TOD_T5-3B_MultiWOZ: the pre-trained T5-3B is fine-tuned with the MultiWOZ.
It also downloads SMD, CamRest and MultiWOZ under the ./data
.
Use fine-tuned model to infer and evaluate the test set.
bash ./infer.sh
After inference and evaluation, you can find results of inference and evaluation score in ./output
.
Please cite the paper if you use Q-TOD in your work:
@article{tian-etal-2022-qtod,
title={Q-TOD: A Query-driven Task-oriented Dialogue System},
author={Tian, Xin and Lin, Yingzhan and Song, Mengfei and Bao, Siqi and Wang, Fan and He, Huang and Sun, Shuqi and Wu, Hua},
journal={arXiv preprint arXiv:2210.07564},
year={2022}
}
For help or issues using Q-TOD, please submit a GitHub issue.