Vector Similarity Playground
Compare numeric vectors with cosine similarity, dot product and Euclidean distance without uploads or silent normalization.
Comparison
Compare to see the selected metric and magnitudes.
Unit tolerance: |magnitude − 1| ≤ 0.000001. Vectors are never silently normalized. Similarity thresholds depend on the embedding model and dataset; these numbers do not establish semantic relevance.
Ready. Enter two vectors or load the sample.
Enable JavaScript to compare locally.
Three metrics, different meanings.
Cosine compares directions, dot product also reflects magnitude, and Euclidean distance measures straight-line separation. For [1, 0] and [0, 1], cosine and dot product are zero; Euclidean distance is approximately 1.414213562. Compare embeddings from the same compatible model and representation.
No universal relevance threshold.
A numerical score is not a relevance verdict. Useful thresholds depend on model, corpus, task and evaluation data. Normalization is an explicit action that replaces the inputs with unit vectors; zero vectors cannot be normalized and have undefined cosine similarity.
Bounded floating-point mathematics.
Accepts non-empty JSON numeric arrays of equal length: at most 4,096 values and 131,072 characters each. Nonzero absolute components must be between 1e-100 and 1e100. IEEE-754 rounding applies; displayed results use ten significant digits, and unit normalization uses an absolute magnitude tolerance of 0.000001. No embeddings, dimensionality reduction or vector-database connection is performed.