Dot product versus cosine similarity. An amber arrow h is compared with four word arrows of different lengths. Turn h with the slider or by dragging. The dot product rewards both direction and length; cosine similarity divides length out. Near 10 to 15 degrees they pick different winners.

Dot product: what the model uses

h · w

Cosine similarity: direction only

(h · w) ÷ (‖h‖ ‖w‖)