Skip to main content
Cosine similarity measures the angular relationship between vectors, ignoring magnitude. It is well suited for text embeddings where semantic meaning matters more than vector length. The following example creates a collection named text_embeddings configured to use cosine similarity as its distance metric.
To confirm the collection was created successfully, call client.collections.get_info("text_embeddings") and check that the status field returns Ready.