flâneur — a map of the web's best reading

Don't use cosine similarity carelessly

p.migdal.pl · 3,131 words · saved by 1 readers

Cosine similarity - the duct tape of AI. Convenient but often misused. Let's find out how to use it better.

Don't use cosine similarity carelessly 14 Jan 2025 | by Piotr Migdał see Hacker News for the discussion Midas turned everything he touched into gold. Data scientists turn everything into vectors. We do it for a reason — as gold is the language of merchants, vectors are the language of AI. Just as Midas discovered that turning everything to gold wasn’t always helpful, we’ll see that blindly applying cosine similarity to vectors can lead us astray. While embeddings do capture similarities, they often reflect the wrong kind - matching questions to questions rather than questions to answers, or ge

Explore this link on the map →

related reading