cosine_similarity product. \(\frac{\sum_s (x_s*y_s)}{\sqrt{\sum_s (x_s^2)*\sum_s (y_s^2)}}\). It is the cosine of the angle between the two vectors. One or minus one means thaat the vectors are proportionnal, zero that they are orthogonal.
Uses the upgraded type for computations and result