README.md 1.64 KB
Newer Older
zihanl's avatar
zihanl committed
1
2
3

# Multi-Stage Prompting for Knowledgeable Dialogue Generation

zihanl's avatar
zihanl committed
4
We present the steps to run our multi-stage dialogue prompting (MSDP), as well as the finetuning-based models (i.e., finetuning-based knowledge generation (FKG) and finetuning-based coversation model (FCM)).
zihanl's avatar
zihanl committed
5

zihanl's avatar
zihanl committed
6
7
8
9
10
## Multi-Stage Dialogue Prompting (MSDP)

### Data Preparation
1. Dataset Download: [Wizard of Wikipedia](https://parl.ai/projects/wizard_of_wikipedia/) and [Wizard of Internet](https://parl.ai/projects/sea/)
2. Data Processing: We provide script ```tasks/knwl_dialo/scripts/data_processing.sh``` to process the data.
zihanl's avatar
zihanl committed
11
12

### Knowledge Generation
zihanl's avatar
zihanl committed
13
1. The script ```tasks/knwl_dialo/scripts/prompt_knwl_gen.sh``` provides an example for how to perform the knowledge generation prompting.
zihanl's avatar
zihanl committed
14
2. The F1/FK1 score can be evaluated through ```tasks/knwl_dialo/scripts/eval_generation.sh```. Other automatic metrics (i.e., BLEU, METEOR, and ROUGE-L) follow the [nlg-eval](https://github.com/Maluuba/nlg-eval).
zihanl's avatar
zihanl committed
15
16

### Response Generation
zihanl's avatar
zihanl committed
17
18
19
20
1. Prepare the input file for the response generation (based on the previously generated knowledge file):
2. The script ```tasks/knwl_dialo/scripts/prompt_resp_gen.sh``` provides an example for how to perform the response generation prompting.
3. The automatic evaluations are the same as mentioned aboved for the knowledge generation.

zihanl's avatar
zihanl committed
21
## Finetuning-based Models
zihanl's avatar
zihanl committed
22

zihanl's avatar
zihanl committed
23
24
### FKG
The script ```tasks/knwl_dialo/scripts/finetune_knwl_gen.sh``` provides an example for how to train a finetuning-based knowledge generation (FKG) model.
zihanl's avatar
zihanl committed
25

zihanl's avatar
zihanl committed
26
27
### FCM
The script ```tasks/knwl_dialo/scripts/finetune_resp_gen.sh``` provides an example for how to train a finetuning-based conversational model (FCM).
zihanl's avatar
zihanl committed
28