The measures
- Cosine similarity = A · B / (|A| × |B|), the cosine of the angle between the two vectors. It ignores length and only compares direction. It runs from −1 (opposite) through 0 (unrelated, at right angles) to 1 (same direction).
- Dot product = the sum of ai × bi. For vectors already scaled to length 1, which many embedding models return, it equals the cosine similarity and is quicker to compute.
- Euclidean distance is the straight-line distance between the two points. For length-1 vectors it's √(2 − 2 cos θ), so it ranks results in the same order as cosine similarity.
- Manhattan distance adds up the absolute differences in each dimension.
Reading the numbers
There's no universal threshold for "similar". Each embedding model spreads its scores differently, and with some models even unrelated texts score well above 0. Compare scores from the same model, and judge them by ranking, not by a fixed cut-off. Never compare vectors from two different embedding models: their dimensions mean different things, even when the lengths match.
Real embeddings have hundreds or thousands of dimensions. You can paste them in full, and nothing leaves your browser.