Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to index own corpus #1928

Open
JohannesKroll opened this issue Jul 2, 2024 · 0 comments
Open

Trying to index own corpus #1928

JohannesKroll opened this issue Jul 2, 2024 · 0 comments

Comments

@JohannesKroll
Copy link

Hey there,

I am trying to build a dense vector index on a custom corpus.
Specifically I want to index the hotpot_qa collection (https://dl.fbaipublicfiles.com/mdpr/data/hotpot_index/wiki_id2doc.json from a different RAG eval repo: https://github.com/McGill-NLP/instruct-qa) and some german collection (deutsche-telekom/wikipedia-22-12-de-dpr) using different embeddings:

  • intfloat/multilingual-e5-large
  • facebook/dpr-question_encoder-multiset-base
  • jinaai/jina-embeddings-v2-base-en
  • and some more

I am using pyserini.encode and followed this tutorial: https://github.com/castorini/pyserini/blob/master/docs/usage-index.md#building-a-dense-vector-index
However when testing the generated index with some queries it mostly returns non relevant context.
As a test I did add one of the queries itself to the corpus, which is indexed and it showed up at top 1, but all other returned contexts do not fit the query at all. Also using --l2-norm and mean pooling did not improve the results.

Then I evaluated the embeddings using the nfcorpus experiment (https://github.com/castorini/pyserini/blob/master/docs/experiments-nfcorpus.md). All of the above listed embeddings performed very poorly. The only good one are also the ones returning fitting contexts for my corpora:

  • BAAI/bge-base-en-v1.5
  • castorini/tct_colbert-v2-hnp-msmarco

To summarize, the embeddings mentioned in the pyserini documents work just fine on costum corpora, but other embeddings don't. I am clearly missing something to make those other encoders work, can you help me out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant