Search, recommendations, and retrieval all lean on one idea: represent items as vectors, then measure the angle between them. Cosine similarity does exactly that — it divides the dot product by the product of the magnitudes, giving a number from minus one to one that says how alike two directions are, regardless of their lengths. Real embeddings have hundreds of dimensions and come from trained models, but the mathematics is identical for two dimensions, which is why this demo uses small vectors you supply yourself. Compute the similarity, see the dot product and magnitudes behind it, and the core operation of semantic search stops being a black box and becomes arithmetic you can check.
Quick Answer: Enter vectors [1, 0] and [0, 1] and the tool returns cosine similarity 0.0000, exactly perpendicular.
Free Online Tool
Embedding Similarity Demo
Compute cosine similarity between two small vectors you supply — the real math behind embedding search, shown step by step.
Cosine similarity runs from -1 (opposite) through 0 (unrelated) to 1 (identical direction). Real embeddings have hundreds of dimensions; the math is the same.
How to Use the Embedding Similarity Demo
- Enter your input in the tool above — for example, vectors [1, 0] and [0, 1].
- Choose any options the tool offers, such as the conversion direction or the settings that fit your case.
- Click the main button to run the tool and read the result it displays.
- Check the result against what you expected, then adjust the input and run it again if needed.
- Copy the output into your own document, code, or configuration wherever you need it.
Worked Example
Try it with vectors [1, 0] and [0, 1]: the tool returns cosine similarity 0.0000, exactly perpendicular. That example is a good first test whenever you use the tool, because it confirms you entered the input in the expected format before you trust it with your real values. This tool is built for learning the math behind embedding search and recommendations, and the worked example shows the shape of a correct result so you can recognize a wrong one at a glance.
Key Features
- Runs entirely in your browser — nothing you type is uploaded anywhere.
- Built for learning the math behind embedding search and recommendations, with the result shown immediately and in full.
- No account, no sign-up, and no software to install.
- Clear error messages when an input is incomplete or in the wrong format.
- Free to use as often as you like, for study, work, or checking homework.
Best Practices and Tips
- Start with the worked example in the guide, then substitute your own values.
- Double-check units and formats before trusting a result — most tool errors are input errors.
- Keep a note of the exact inputs that produced a result you rely on, so you can reproduce it.
- For anything important, cross-check with a second method or a known test value.
- Bookmark the tool if you use it regularly, so the same workflow is always one click away.
Common Mistakes to Avoid
- Feeding a zero vector, which has no direction and makes similarity undefined.
- Comparing vectors of different lengths, which is meaningless without alignment.
- Copying a result without checking it against a known example first.
- Assuming the tool knows your context — it only sees the values you enter.
When This Tool Helps — and When It Doesn’t
This tool helps most when you need a fast, checkable answer for learning the math behind embedding search and recommendations and you can verify the result against a known example. It does not replace professional judgment: for decisions with real consequences, treat the output as one input among several, verify it independently, and remember that the tool can only work with exactly what you enter. Used that way — quick check, verified result, human decision — it saves time without creating false confidence.
Frequently Asked Questions
Why cosine instead of plain distance?
Because direction matters more than magnitude for meaning: two long documents on the same topic should score alike even if one is longer. Cosine ignores length and compares direction alone.
What do the values mean?
One means identical direction, zero means unrelated (perpendicular), and minus one means opposite. In practice, text embeddings rarely go negative, so most useful scores fall between zero and one.
Are these real embeddings?
No — you supply the vectors. Real embeddings come from embedding models. This demo teaches the similarity math that those models outputs are then compared with.
Related Tools
- AI Prompt Builder – Assemble a structured prompt from role, task, context, constraints, and output format
- AI Prompt Enhancer – Rewrite a rough prompt by applying template rules: role, constraints, format, and examples
- Prompt Token Estimator – Heuristic, clearly labeled approximate token estimate for pasted text
