πŸ’» Tilores Studio is now available. Run entity resolution locally on your machine.Download free

← All Tools
Free Tool

Cosine Similarity Calculator

Measure the cosine of the angle between two strings represented as vectors. Used in RAG, recommendation systems, and information retrieval.

Tilores uses cosine similarity in production β€” so you can automate matching with rules you configure.

Try it yourself

Similarity Score
0.9487
Match

How it works

Cosine similarity measures how similar two strings are by converting them into vectors (using character bigrams) and calculating the cosine of the angle between them using the formula cos(ΞΈ) = (AΒ·B) / (|A| Γ— |B|), where A and B are the bigram frequency vectors and |A|, |B| are their magnitudes. A score of 1 means identical, 0 means completely dissimilar. Unlike edit distance metrics, cosine similarity is not sensitive to string length β€” it focuses purely on the direction of the vectors, not their size β€” making it effective for comparing strings of different lengths. It is the core similarity metric used in vector databases and RAG architectures, where document chunks and queries are compared as high-dimensional embeddings.

Use cases in entity resolution

RAG retrieval scoring and vector database search
Document similarity and deduplication
Recommendation systems (identifying similar items)
Natural language processing and text classification
Fuzzy matching for customer record deduplication
Semantic search relevance ranking

Don't implement this yourself

Tilores Studio runs the full matching engine β€” this algorithm plus configurable rules and real-time entity resolution β€” locally on your machine. Free, no account, no cloud. Load your own data and see it working in minutes.