langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch¶
class langchain_community.vectorstores.databricks_vector_search.DatabricksVectorSearch(index: VectorSearchIndex, *, embedding: Optional[Embeddings] = None, text_column: Optional[str] = None, columns: Optional[List[str]] = None)[source]¶
Databricks Vector Search vector store.
To use, you should have the databricks-vectorsearch python package installed.
Example
from langchain_community.vectorstores import DatabricksVectorSearch
from databricks.vector_search.client import VectorSearchClient
vs_client = VectorSearchClient()
vs_index = vs_client.get_index(
  endpoint_name="vs_endpoint",
  index_name="ml.llm.index"
)
vectorstore = DatabricksVectorSearch(vs_index)
Parameters
index – A Databricks Vector Search index object.
embedding – The embedding model.
Required for direct-access index or delta-sync index
with self-managed embeddings.
text_column – The name of the text column to use for the embeddings.
Required for direct-access index or delta-sync index
with self-managed embeddings.
Make sure the text column specified is in the index.
columns – The list of column names to get when doing the search.
Defaults to [primary_key, text_column].
Delta-sync index with Databricks-managed embeddings manages the ingestion, deletion,
and embedding for you.
Manually ingestion/deletion of the documents/texts is not supported for delta-sync
index.
If you want to use a delta-sync index with self-managed embeddings, you need to
provide the embedding model and text column name to use for the embeddings.
Example
from langchain_community.vectorstores import DatabricksVectorSearch
from databricks.vector_search.client import VectorSearchClient
from langchain_community.embeddings.openai import OpenAIEmbeddings