How to search the Wikipedia knowledge base using DPR? #1583
Unanswered
FutureForMe
asked this question in
Q&A
Replies: 2 comments 5 replies
-
That's an index built with DPR, so you need to use the DPR encoders: https://github.com/castorini/pyserini/blob/master/pyserini/encode/_dpr.py @manveertamber can you provide more information? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This code will work for you. It uses a DprQueryEncoder trained on Natural Questions to encode the query and then searches the corresponding Wikipedia passage 'wikipedia-dpr-100w.dpr-single-nq' dense index using faiss.
And you can get the passage text like this.
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi~
I want to use DPR to search Wikipedia, but when I use the following code, an error occurred. I would like to ask, if someone can share with me a code that uses DPR to retrieve WIkipedia, thank you very very very much.
Beta Was this translation helpful? Give feedback.
All reactions