Negative Prompt Generator
Build a Stable Diffusion negative prompt from the problems you keep getting.
Compare two embedding vectors by cosine similarity, dot product and distance.
Paste JSON arrays, comma-separated or space-separated numbers — straight from an embeddings API response or a vector database row. Both vectors need the same number of dimensions.
The Cosine Similarity Calculator compares two vectors or embeddings and returns cosine similarity and distance, the angle between them, the dot product, Euclidean and Manhattan distance and each vector length, with notes on which metric vector databases use.
Semantic search, recommendation and deduplication all come down to comparing vectors: embed two pieces of text, measure how closely the vectors point in the same direction, and treat that as how closely the meanings match. Cosine similarity is the measure almost everyone uses.
Paste two vectors as JSON arrays, comma-separated or space-separated numbers — straight from an embeddings API response or a vector database row — and get cosine similarity and cosine distance, the angle between the vectors, the dot product, Euclidean and Manhattan distances, the normalised Euclidean distance and the length of each vector, with a scale from opposite to identical.
When both vectors are normalised, the page points out that dot product and cosine similarity are the same number, which is why vector databases can use the cheaper operation. A reference card shows which operator pgvector, Pinecone, Qdrant, FAISS and Chroma use for each metric.
Cosine similarity and distance, angle, dot product, L2, normalised L2 and L1.
JSON arrays, comma-separated or space-separated numbers from an API or database.
Vectors of different lengths are rejected with a clear explanation.
Notes when both vectors are unit length, so dot product equals cosine.
pgvector, Pinecone, Qdrant, FAISS and Chroma metric names side by side.
A JSON array or a list of numbers separated by commas or spaces.
It must have the same number of dimensions and come from the same model.
Cosine similarity runs from -1 for opposite, through 0 for unrelated, to 1 for identical direction.
Dot product and distances are listed for the metric your database uses.
The cosine of the angle between two vectors: their dot product divided by the product of their lengths. It measures direction and ignores magnitude, which suits text embeddings.
It depends on the model. Some embedding models score unrelated text around 0.7 and related text above 0.85, while others spread scores much wider. Compare scores from the same model rather than using a universal threshold.
Cosine distance is one minus cosine similarity. Vector databases often sort by distance, where smaller means more similar.
When both vectors are normalised to length 1. Many embedding APIs return normalised vectors, so the faster dot product gives the same ranking.
Similarity is only defined between vectors in the same space. Different lengths almost always mean the vectors came from different models, and would not be comparable anyway.
What people who use the Cosine Similarity Calculator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Cosine Similarity Calculator. It takes half a minute and no account.
Write the first reviewBuild a Stable Diffusion negative prompt from the problems you keep getting.
Remove markdown from ChatGPT and Claude answers and keep clean plain text.
Generate robots.txt rules to block GPTBot, ClaudeBot, CCBot and other AI crawlers.
Estimate the cost and vector storage of embedding a document corpus for RAG.
Clean up a pasted chat log into a tidy transcript, Q&A pairs, JSON or CSV.
Validate a JSONL file line by line, and check fine-tuning datasets before you upload.
Compare GPT, Claude, Gemini, DeepSeek and Llama by price, context and monthly cost.
Estimate what a fine-tune costs to train and run, and when it pays for itself.