Skip to content
All tutors

Dot Products and Similarity

Measure how alike two vectors are and see how search and recommendations use it

By Skill Lab Beginner Math for AI New

Your first 3 replies from the tutor are free. Then you can continue the lesson for $4 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Dot Products and Similarity AI tutor following Skill Lab's plan
Student:

My search returns cosine similarities between 0.75 and 0.85 for everything, relevant or not. Is something broken?

Tutor:

Probably not. Many embedding models place most text in a fairly narrow region of the space, so similarities cluster in a band, and the absolute value matters less than the ranking. What you should check: are relevant documents ranked above irrelevant ones? If so, the system works, and any threshold must be tuned for this specific model using labelled examples. If rankings are poor too, look at chunking or the model choice. Try this: take five queries and check whether the top three results are actually relevant.

Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.

What you will be able to do

  • Compute dot products by hand and interpret their sign
  • Relate the dot product to the angle between vectors
  • Calculate cosine similarity and compare it with Euclidean distance
  • Explain how similarity powers semantic search and recommendations
  • Recognise pitfalls of similarity in high dimensions

Lesson plan

6 lessons. Pick one to start there.

  1. 1 Computing a dot product Multiply matching entries and add them up. Start
  2. 2 Angles and direction Interpret the dot product geometrically. Start
  3. 3 Cosine similarity Measure direction only by normalising. Start
  4. 4 Distance versus similarity Compare Euclidean distance with cosine similarity. Start
  5. 5 Similarity in real systems See dot products in search, recommendations and attention. Start
  6. 6 Pitfalls in high dimensions Interpret similarity scores carefully. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

A beginner tutor focused on one of the most useful operations in AI: the dot product. You will compute dot products by hand, see their geometric meaning through angles, build cosine similarity, and compare it with Euclidean distance. Lessons then show where similarity powers real systems: semantic search with embeddings, recommendations and the attention mechanism in transformers, all at an intuitive level. You will also learn the practical details that trip people up, such as normalisation, negative similarities and why similarity in high dimensions behaves differently.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.