What is cosine similarity in recommendation systems?

Updated May 16, 2026

Short answer

Cosine similarity measures similarity between vectors based on angle.

Deep explanation

It computes similarity between user or item vectors by measuring the cosine of the angle between them, ignoring magnitude and focusing on direction.

Real-world example

Finding similar movies based on genre vectors.

Common mistakes

  • Confusing cosine similarity with Euclidean distance.

Follow-up questions

  • Why is it used?
  • What is limitation?

More Recommendation Systems interview questions

View all →