The similarity for any metric — identical to SimpleVectorService.CalculateDistance.
Every metric is normalized to 0-1 except cosine-similarity: cosine maps [-1, 1]
onto [0, 1], while cosine-similarity is the standard cosine in [-1, 1], the score
Pinecone, SQL Server and pgvector report for a cosine index.
The sums of squares are read only by the two cosine metrics; pass 0 for other metrics.
The similarity for any metric — identical to
SimpleVectorService.CalculateDistance. Every metric is normalized to 0-1 exceptcosine-similarity:cosinemaps [-1, 1] onto [0, 1], whilecosine-similarityis the standard cosine in [-1, 1], the score Pinecone, SQL Server and pgvector report for a cosine index. The sums of squares are read only by the two cosine metrics; pass 0 for other metrics.