SeanLee97 / AnglE

Train and Infer Powerful Sentence Embeddings with AnglE | 🔥 SOTA on STS and MTEB Leaderboard
https://arxiv.org/abs/2309.12871
MIT License
397 stars 30 forks source link

What similarity metric should I use to measure semantic similarity between two sentences? #42

Closed zachares closed 3 months ago

zachares commented 4 months ago

In the paper, at training time, it appears that you treat embeddings as a vectors of real numbers which is used to calculate cosine similarity and also as vectors of complex numbers which is used to calculate the angle between the two vectors to measure similarity. At inference time, what similarity metric should I use measure semantic similarity?

SeanLee97 commented 4 months ago

@zachares hi, you can use cosine or L2 in the inference stage.

zachares commented 4 months ago

Thank you!