Merging Generated and Retrieved Knowledge for Open-Domain QA
The experiments in the paper were run using python=3.7.0
, torch==1.11.0
and trasnformers==4.26.0
.
To show you how to train the discriminators with silver labels, we will use NaturalQuestion to illustrate.
cd passage_matching
python create_loo_data.py
bash infer_loo.sh
python create_evidentiality_data.py
python create_compatibility_data.py
sbatch train_evidentiality.sh
sbatch train_compatibility.sh
bash submit_infer_compatibility_evidentiality_scores.sh
python merge_infer_scores.py
python build_psg_pairs.py --matching_method {random|compatibility_2stage_optimal} --dataset {nq/tqa/webq}
where compatibility_2stage_optimal
refers to COMBO method in paper.
We modify codes from atlas. Please follow their instructions to set up environments properly.
cd ../training
sbatch scripts/train_simple_merge.sh # for Direct Merging method
sbatch scripts/train_nq_webq_pair.sh # for Random Matching / COMBO method