Vector search example notebooks

The following notebooks show how to use the vector search Python SDK. For reference information, see the Python SDK reference.

LangChain

For more information about using LangChain with Databricks Vector Search, see Databricks vector search integration.

Notebook Description
Vector search with the Python SDK Create a search endpoint, build a delta-sync vector index, run similarity searches, and convert results to LangChain documents.

Use an embedding model

These notebooks show how to configure a Databricks Model Serving endpoint to generate embeddings.

Notebook Description
Use an OpenAI embedding model Use the Python SDK with an external embedding model (OpenAI) to create and query a vector search index.
Use a GTE embedding model Use the GTE foundation embedding model to load a dataset into a Delta table, chunk the text, create a vector search endpoint and delta-sync index, and run similarity searches.
Register and serve an OSS embedding model Download an open source embedding model (e5-small-v2) from Hugging Face, register it to Unity Catalog, and deploy it as a Model Serving endpoint for use with Databricks Vector Search.

Use Vector Search with an OAuth token

Notebook Description
Use Vector Search with an OAuth token Query a Databricks Vector Search endpoint using the Python SDK or direct HTTP requests, authenticated using a service principal OAuth token over the network-optimized path.