Skip to content

Commit

Permalink
fix(retrievers): fix threshold logic in HybridQdrantInMemoryRetriever
Browse files Browse the repository at this point in the history
  • Loading branch information
asajatovic committed Dec 10, 2024
1 parent 837294c commit e6b6f8c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def get_filtered_documents_with_scores(
limit=self._k,
filter=filter,
with_payload=True,
score_threshold=self._threshold,
)
sparse_request = models.SearchRequest(
vector=models.NamedSparseVector(
Expand All @@ -150,7 +149,11 @@ def get_filtered_documents_with_scores(
[dense_request_response, sparse_request_response], limit=self._k
)

return [self._point_to_search_result(point) for point in search_result]
return [
self._point_to_search_result(point)
for point in search_result
if point.score >= self._threshold
]

def get_relevant_documents_with_scores(
self, query: str
Expand Down

0 comments on commit e6b6f8c

Please sign in to comment.