beir icon indicating copy to clipboard operation
beir copied to clipboard

Introduce `RetrievalModel` abstract base class

Open tstadel opened this issue 2 years ago • 1 comments

Proposed Changes:

  • add RetrievalModel ABC
  • make SparseSearch, BM25Search, DenseRetrievalFaissSearch and DenseRetrievalExactSearch inherit from RetrievalModel
  • EvaluateRetrieval receives RetrievalModel as param
  • rename retriever to retrieval_model in EvaluateRetrieval
  • move score_function param from EvaluateRetrieval to DenseRetrievalFaissSearch and DenseRetrievalExactSearch
  • adjust code that set score_function on EvaluateRetrieval previously

closes https://github.com/beir-cellar/beir/issues/84

tstadel avatar Mar 25 '22 18:03 tstadel

@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.

tstadel avatar Mar 25 '22 18:03 tstadel

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!

thakur-nandan avatar Jul 21 '23 22:07 thakur-nandan