Embeddings and similarity · Explore together
What counts as close?
Move a query vector and compare neighbors under distance and cosine similarity.
One person controls the experiment. The other predicts and questions. Swap roles after a trial.
Illustrative 2D vectors · labels are invented, not learned semantics
Scroll across the diagram to compare the vectors.
Find a query whose nearest neighbor changes with the metric. Which metric ignores vector length? Explain using the drawing.
What do the distances measure?
Euclidean distance is the length of the difference vector. Cosine distance is 1 − (q · v)/(|q||v|): it compares direction and is undefined if either vector is zero.
These invented positions demonstrate geometry. They do not show actual semantic relationships between these objects.
Compare your evidence
What can you explain now?
Ask your partner to restate your reasoning. An experiment suggests a pattern; your explanation should say why it holds and when it applies.
- What does Euclidean distance care about that cosine similarity discards?
- What happens if the query has length zero?
- Which notion of closeness would fit a situation you care about?