Skip to main content
Cohere
current

Search documentation

Type to search this documentation.

On this pageOverview

Semantic Search with Cohere Embeddings

More

Calculating the Similarity Between a Pair of Embeddings

Section titled “Calculating the Similarity Between a Pair of Embeddings”

Using a simple comparison function, we can calculate a similarity score for two embeddings to figure out whether two texts are talking about similar things.

There are a number of ways to do this, with two of the most common methods being Euclidean distance and Cosine similarity. Let's walk through an example of the latter approach.

First, if you don't already have the SDK installed do that:

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu