Loading Academy Hub...
Integrate enterprise GenAI into Lakehouse workflows: Databricks Mosaic AI, Vector Search endpoints, Delta Sync vector indexes, foundation model serving, and automated RAG evaluation.
[!NOTE] Databricks Mosaic AI natively bridges enterprise lakehouse data with Large Language Models. Using Databricks Vector Search, data teams create automated vector indexes that continuously synchronize with Delta Lake tables.
Instead of writing custom Python synchronization scripts between Delta Lake and third-party vector databases:
ai_query() SQL Inference & Feature EngineeringContinuous or Triggered) from a Unity Catalog source Delta table—when Silver rows update or delete, vector indexes stay consistent automatically with zero custom Python sync daemons.ai_query(): Run batch classification, entity extraction, and summarization straight inside Databricks SQL or Lakeflow pipelines using ai_query("databricks-meta-llama-3-3-70b-instruct", prompt), leveraging automatic batching, retry throttling, and UC model governance.Review the production code, company interview Q&As, incident traces, and comprehension quiz inside this lesson.
from databricks.vector_search.client import VectorSearchClient
vsc = VectorSearchClient()
# Create or connect to Vector Search compute endpoint
endpoint = vsc.get_endpoint("lakehouse_vector_endpoint")
# Create a Delta Sync index linked directly to Delta table with auto-embedding
index = vsc.create_delta_sync_index(
endpoint_name="lakehouse_vector_endpoint",
index_name="lakehouse_gold.ai.knowledge_base_index",
source_table_name="lakehouse_silver.documents",
pipeline_type="TRIGGERED",
primary_key="doc_id",
embedding_source_column="document_content",
embedding_model_endpoint_name="databricks-bge-large-en"
)
print("Delta Sync Vector Index created successfully.")DatabricksVectorSearchException: Source table 'lakehouse_silver.documents' does not have delta.enableChangeDataFeed enabled.