When would you choose cosine distance over Euclidean distance for nearest neighbor search?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
Overview: Asks when cosine distance is a better choice than Euclidean distance for nearest neighbor search. It tests whether you can tell when a vector's direction or its length carries the meaning, and how the choice affects text, embeddings and search indexes.