Hacker News new | past | comments | ask | show | jobs | submit login

They use cosine because of performance reasons.

Euclidean distance when used is squared, because even that sqrt is too expensive.




Also note that the embeddings are learned based on which distance metric is used, thus making it important to use the right distance metric with the right embeddings above and beyond wall-clock performance. Other metrics may still work, but less well.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: