add example scripts for ANN and BM25

This commit is contained in:
PeterGriffinJin
2025-04-07 18:27:55 +00:00
parent ba152349fd
commit 5eccb5fa14
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
file_path=/the/path/you/save/corpus
index_file=$file_path/e5_HNSW64.index
corpus_file=$file_path/wiki-18.jsonl
retriever_name=e5
retriever_path=intfloat/e5-base-v2
python search_r1/search/retrieval_server.py --index_path $index_file \
--corpus_path $corpus_file \
--topk 3 \
--retriever_name $retriever_name \
--retriever_model $retriever_path

View File

@@ -0,0 +1,10 @@
file_path=/the/path/you/save/corpus
index_file=$file_path/bm25
corpus_file=$file_path/wiki-18.jsonl
retriever_name=bm25
python search_r1/search/retrieval_server.py --index_path $index_file \
--corpus_path $corpus_file \
--topk 3 \
--retriever_name $retriever_name