AmenRa / retriv

A Python Search Engine for Humans 🥸
MIT License
188 stars 22 forks source link

HybridRetriever does not respect cutoff when calling sub-retrievers and the merger #33

Open jacobvsdanniel opened 11 months ago

jacobvsdanniel commented 11 months ago

In HybridRetriever.search:

        sparse_results = self.sparse_retriever.search(query, False, 1_000)
        dense_results = self.dense_retriever.search(query, False, 1_000)
        hybrid_results = self.merger.fuse([sparse_results, dense_results])

cutoff is not passed down.

potential fix:

        sparse_results = self.sparse_retriever.search(query, False, cutoff)
        dense_results = self.dense_retriever.search(query, False, cutoff)
        hybrid_results = self.merger.fuse([sparse_results, dense_results], cutoff)