BM25 is following anserini, and ANN is following ANCE.
First, get the msmarco-docs.tsv and msmarco-docdev-queries.tsv, and preprocess msmarco-docs.tsv to jsonl format. {'id': doc_id, 'contents': doc} for each line, save it to collections/msmarco/msmarco-docs.jsonl.
Then build BM25 index and search:
./bm25_retriever/bin/IndexCollection -collection JsonCollection -input ./collections/msmarco -index index-msmarco -generator LuceneDocumentGenerator -threads 8 -storePositions -storeDocvectors -storeRawDocs
./bm25_retriever/bin/SearchCollection -index index-msmarco -topicreader TsvString -topics msmarco-docdev-queries.tsv -bm25 -output msmarco-doc.txt
The guides of ANCE training and inference are available at ance.
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》