Distance vs certainty scores


I was wondering what is the difference between distance and certainty?
Initially, I used the default distance metric, which I believe is cosine, when I created the class. Then to get the scores, I tested with both distance and certainty to calculate cosine similarity.
But according to this FAQ, I need to use certainty for that.
On the other hand, I found here that the preferred way is to use distance in favor of certainty.
So, I would like to know if it is possible to calculate the cosine similarity using distance instead of certainty.


1 Like

Hi @YasmineMh

If you are using cosine similarity, the certainty is simply a normalised distance on a scale of 0-1, calculated as: 1-distance/2.

Certainty was historically used in Weaviate, but not all metrics will normalize to 0-1, so we generally use distance now.


Hey @jphwang

Thanks for your response!

It makes sense now. So if I want to calculate the cosine similarity, it’s just 1-distance, right?

Yeah I think that’s right

1 Like