Notebooks
W
Weaviate
Similarity Search Embed Multilingual V2.0

Similarity Search Embed Multilingual V2.0

vector-searchvector-databaseretrieval-augmented-generationllm-frameworksweaviate-featuresfunction-callingcohereweaviate-recipesmodel-providersPythongenerative-ai

Open In Colab

Dependencies

[ ]

Connect to Weaviate

[ ]

Create a collection

Collection stores your data and vector embeddings.

[ ]

Import the Data

[ ]

Query Weaviate: Similarity Search (Text objects)

Similarity search options for text objects in Weaviate:

  1. near_text

  2. near_object

  3. near_vector

nearText Example

Find a JeopardyQuestion about "animals in movies". Limit it to only 4 responses.

[ ]

Return vector embeddings.

[ ]

Now, also request the distance for each returned item.

[ ]

nearObject Example

Search through the JeopardyQuestion class to find the top 4 objects closest to id a1dd67f9-bfa7-45e1-b45e-26eb8c52e9a6. (The id was taken from the query above)

[ ]

nearVector Example

Search through the JeopardyQuestion class to find the top 2 objects closest to the query vector [-0.0125526935, -0.021168863, ... ]

[ ]