Skip to content

Commit 41a4210

Browse files
committed
fix: correct _scale_to_unit_interval docstring
1 parent 6e1dc7b commit 41a4210

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • integrations/falkordb/src/haystack_integrations/document_stores/falkordb

integrations/falkordb/src/haystack_integrations/document_stores/falkordb/document_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,10 @@ def _scale_to_unit_interval(self, score: float) -> float:
511511
512512
Uses the following formulas:
513513
- Cosine: `1 - (score / 2)`
514-
- Euclidean: sigmoid `1 / (1 + score)`
514+
- Euclidean: `1 / (1 + score)`
515515
516516
:param score: Raw score returned by the vector index.
517-
:returns: Scaled score in `[0, 2]`.
517+
:returns: Scaled score in `[0, 1]`.
518518
"""
519519
if self.similarity == "cosine":
520520
return 1 - (score / 2)

0 commit comments

Comments
 (0)