How This Tool Works
This playground demystifies text embeddings—the mathematical representation of meaning. When you input sentences, the tool doesn't just treat them as strings; it converts each one into a high-dimensional vector (a list of numbers). This process captures semantic context.
We then calculate cosine similarity, which measures the angle between these vectors. A smaller angle (closer to 1) means the sentences are highly similar in meaning, regardless of specific vocabulary. The visualization helps you see this:
- Heatmap: Shows similarity scores instantly.
- PCA Map: Projects the high dimensions onto a 2D plane for visual grouping.
- Pair Comparison: Explicitly flags your most and least similar pairs.
Crucially, all calculations happen entirely in your browser, ensuring that your input data remains fully private.