AI Search example notebooks
The following notebooks show how to use the AI Search Python SDK. For reference information, see the Python SDK reference.
LangChain
For more information about using LangChain with Databricks AI Search, see Databricks vector search integration.
-
- AI 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.
-
- Use an OpenAI embedding model
- Use the Python SDK with an external embedding model (OpenAI) to create and query an AI 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 an AI 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 AI Search.
Use AI Search with an OAuth token
-
- Use AI Search with an OAuth token
- Query a Databricks AI Search endpoint using the Python SDK or direct HTTP requests, authenticated using a service principal OAuth token over the network-optimized path.