Skip to content

Commit

Permalink
properly calculate score between 0 and 1 (run-llama#7746)
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich authored Sep 20, 2023
1 parent b348a3e commit a8a101f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama_index/vector_stores/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResul

nodes.append(node)

similarity_score = 1.0 - math.exp(-distance)
similarity_score = math.exp(-distance)
similarities.append(similarity_score)

logger.debug(
Expand Down

0 comments on commit a8a101f

Please sign in to comment.