From c1bd4e05bcd180a36ba7b5d89ca2b5ce4f1e5d4a Mon Sep 17 00:00:00 2001 From: Chengzu Ou Date: Fri, 16 Aug 2024 13:24:30 -0700 Subject: [PATCH] docs: fix Databricks Vector Search demo notebook (#25504) **Description:** This PR fixes an issue in the demo notebook of Databricks Vector Search in "Work with Delta Sync Index" section. **Issue:** N/A **Dependencies:** N/A --------- Co-authored-by: Chengzu Ou Co-authored-by: Erick Friis --- .../vectorstores/databricks_vector_search.ipynb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb index 8509b506910ba..dad7b5d0c7449 100644 --- a/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb +++ b/docs/docs/integrations/vectorstores/databricks_vector_search.ipynb @@ -122,7 +122,7 @@ "outputs": [], "source": [ "vector_search_endpoint_name = \"vector_search_demo_endpoint\"\n", - "index_name = \"ml.llm.demo_index\"\n", + "index_name = \"vector_search_demo.vector_search.state_of_the_union_index\"\n", "\n", "index = vsc.create_direct_access_index(\n", " endpoint_name=vector_search_endpoint_name,\n", @@ -206,7 +206,16 @@ "metadata": {}, "outputs": [], "source": [ - "dvs_delta_sync = DatabricksVectorSearch(\"catalog_name.schema_name.delta_sync_index\")\n", + "delta_sync_index = vsc.create_delta_sync_index(\n", + " endpoint_name=vector_search_endpoint_name,\n", + " source_table_name=\"vector_search_demo.vector_search.state_of_the_union\",\n", + " index_name=\"vector_search_demo.vector_search.state_of_the_union_index\",\n", + " pipeline_type=\"TRIGGERED\",\n", + " primary_key=\"id\",\n", + " embedding_source_column=\"text\",\n", + " embedding_model_endpoint_name=\"e5-small-v2\",\n", + ")\n", + "dvs_delta_sync = DatabricksVectorSearch(delta_sync_index)\n", "dvs_delta_sync.similarity_search(query)" ] }