How you calculate similarity after having the embedding?

#9
by vega6000 - opened

Hi, sorry I am new to this, after your have the phrase embedding do you use:

similatiry = cosine_similarity([sentence_embedding1], [sentence_embedding2])

it supposely gives a value between -1 and 1 what value do you agree beeing similar meaning? >0.5?

thank you for the suppport!

Sentence Transformers org

Cosine similarity indeed, although the output range is between 0 and 1. You can use the cos_sim function if you'd like.
Perhaps >0.7 or >0.8 is quite similar - this is a bit subjective.

I'll close this for now, but feel free to respond if you have questions.

tomaarsen changed discussion status to closed

Sign up or log in to comment