facebookresearch / multihop_dense_retrieval

Multi-hop dense retrieval for question answering
Other
214 stars 22 forks source link

How to Perform the Reranking Step? #21

Closed yangky11 closed 3 years ago

yangky11 commented 3 years ago

Hi,

Thanks for sharing the code! I read from the paper that there is a reranking step before training the reader, but I'm unable to find how is it performed by following the README. Is reranking necessary? How to do it in the current repo? Thank you!

Best regards,

yangky11 commented 3 years ago

Also, are the provided files (data/hotpot/train_retrieval_b100_k100_sp.json and data/hotpot/dev_retrieval_b50_k50_sp.json) with or without reranking?

xwhan commented 3 years ago

Those files are without reranking. The reranking part is inside the reader model. It might not be necessary to add an additional reranking phrase before the reader model. https://github.com/facebookresearch/multihop_dense_retrieval/blob/main/mdr/qa/qa_model.py#L43

yangky11 commented 3 years ago

Thanks!