Notebooks
C
Cohere
What Is Semantic Search

What Is Semantic Search

llmunotebookscohere-developer-experience

What is Semantic Search?

In this notebook, you'll build a semantic search model on a small dataset using Cohere's Embed endpoint.

Read the accompanying blog post here.

Setup

We'll start by installing the tools we'll need and then importing them.

[2]
[3]

Fill in your Cohere API key in the next cell. To do this, begin by signing up to Cohere (for free!) if you haven't yet. Then get your API key here.

[3]

The dataset

[5]

Creating the embedding

[6]

Plotting the embedding in 2D

[7]

Plotting the cosine similarities

[8]
Output

A more complicated example

[9]
[11]
[12]
[13]
Output
[ ]