qdrant-client
qdrant-client copied to clipboard
distribution_based_score_function failing when n=1
Hey @joein - realised this fix wasn't sufficient.
When we get len(response) == 1:
- We get a div by zero when calculating variance, as we are using Bessel's correction
- Even without Bessel's correction, we'd get a div by zero later on when scaling the scores
We should instead not use the response when len(response) < 2
Originally posted by @swatts-ci in https://github.com/qdrant/qdrant-client/issues/815#issuecomment-2566468160
@swatts-ci resolved by https://github.com/qdrant/qdrant-client/pull/872
The fix should've been available as of qdrant-client 1.13.0, closing as completed