• Decrease Text SizeIncrease Text Size

Cosine Similarity

Cosine similarity measures the angle between two vectors regardless of their magnitudes, computed as the dot product divided by the product of the vector norms. The result ranges from -1 (opposite direction) through 0 (orthogonal) to 1 (identical direction), and is the default similarity metric for most modern text embeddings because it focuses on semantic direction rather than vector magnitude. Models like text-embedding-3, BGE, MiniLM, and Sentence-BERT are typically trained and evaluated with cosine similarity in mind. Cosine similarity is mathematically equivalent to the inner product of L2-normalized vectors, which means many vector databases optimize cosine queries by normalizing vectors at index time and using fast inner-product search. AI governance frameworks treat the choice of similarity metric as a documented architectural decision because switching metrics after deployment requires recomputing all comparisons and revalidating Recall@k. Cosine similarity is particularly robust to differences in vector magnitude that can arise from differences in input length or model temperature, making it the safe default for production RAG systems.

Cosine similarity in Centralpoint: Centralpoint stays model-agnostic across whatever similarity metric your vector backend uses, defaulting to cosine for modern text embeddings while supporting alternatives where they fit better. Tokens are metered per skill and audience, prompts stay local, and similarity-aware chatbots deploy across portals with one line of JavaScript.


Related Keywords:
Cosine Similarity,,