beir
beir copied to clipboard
Introduce `RetrievalModel` abstract base class
Proposed Changes:
- add
RetrievalModel
ABC - make
SparseSearch
,BM25Search
,DenseRetrievalFaissSearch
andDenseRetrievalExactSearch
inherit fromRetrievalModel
-
EvaluateRetrieval
receivesRetrievalModel
as param - rename
retriever
toretrieval_model
inEvaluateRetrieval
- move
score_function
param fromEvaluateRetrieval
toDenseRetrievalFaissSearch
andDenseRetrievalExactSearch
- adjust code that set
score_function
onEvaluateRetrieval
previously
closes https://github.com/beir-cellar/beir/issues/84
@NThakur20 I'm happy to receive your comments about this draft. Let me know if moving score_function
is too intrusive. I just thought it makes more sense to have it only where you actually need it.
Hi @tstadel, thanks for the PR. I implemented the abstract base class in the latest revamping. I did not want to change the score function as users have always been using it in a particular way and I wish to change the functions as minimally as possible.
Thanks!