feat(cli): Stop hardcode the reranker of choice. Implements #68#85
Conversation
592c08f to
d032c0a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 98.81% 98.93% +0.11%
==========================================
Files 18 21 +3
Lines 1266 1312 +46
==========================================
+ Hits 1251 1298 +47
+ Misses 15 14 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cf49f8b to
119d329
Compare
119d329 to
ed4b3bd
Compare
|
Should be pretty much done here. Still got some clean-up to do, and might try to simplify the |
|
Planning to add a method |
77ad864 to
d61a68a
Compare
…e_similarity` method
d61a68a to
498ec61
Compare
There was a problem hiding this comment.
@ciekawy, any comments on my approach to the extensible rerankers? This base class will simplify the implementation of the reranker by taking care of building final scores for each document/chunk, and you'll only need to implement compute_similarity, which is a lot easier to work with.
EDIT: I should probably make this async, so that it'll work better with API-based reranker.
This PR refactored the reranker module to follow a similar paradigm as the embedding functions in chromadb. Users will now use the
rerankerkey in the JSON config to specify the class (backend) for the reranker, and use thereranker_paramsfield to initialise their chosen reranker class.The original syntax, where users set the reranker model with the
rerankerkey, is still supported, but will throw a warning message in the CLI and be removed in 0.6.0.