Skip to content

yggdrasil.databricks.ai.vector_search.service

service

Databricks Vector Search service.

client.ai.vector_search.endpoint("rag") and client.ai.vector_search.index("main.rag.docs") are the two most-used entry points. The service holds a :class:VectorSearchDefaults so callers can set endpoint_name / endpoint_type / embedding_model_endpoint_name once and stop repeating them on every call.

VectorSearch

VectorSearch(client=None, defaults: Optional[VectorSearchDefaults] = None)

Bases: DatabricksService

High-level wrapper around Databricks Vector Search APIs.

Attributes

defaults :class:VectorSearchDefaults — service-wide configuration. Replace via client.ai.vector_search.defaults = replace(...) the same way :class:~yggdrasil.databricks.genie.Genie does.

wheels property

wheels: 'Wheels'

Wheel registry service (shorthand for client.wheels).

environments property

environments: 'Environments'

Base-environment service (shorthand for client.environments).

tables property

tables: 'Tables'

Collection-level Unity Catalog table service (shorthand for client.tables).

views property

views: 'Tables'

Alias for :attr:tables — :class:Table covers both managed/external tables and view-shaped securables.

catalogs property

catalogs: 'Catalogs'

Collection-level Unity Catalog hierarchy service (shorthand for client.catalogs).

schemas property

schemas: 'Schemas'

Collection-level Unity Catalog schema service (shorthand for client.schemas).

volumes property

volumes: 'Volumes'

Collection-level Unity Catalog volume service (shorthand for client.volumes).

genie property

genie: 'Genie'

Genie service (shorthand for client.genie).

ai property

ai: 'DatabricksAI'

Databricks AI umbrella service (shorthand for client.ai).

endpoint

endpoint(endpoint_name: Optional[str] = None) -> VectorSearchEndpoint

Return a :class:VectorSearchEndpoint handle.

endpoint_name defaults to :attr:VectorSearchDefaults.endpoint_name.

list_endpoints

list_endpoints() -> Iterator[VectorSearchEndpoint]

Iterate over vector-search endpoints visible in this workspace.

find_endpoint

find_endpoint(*, name: Optional[str] = None) -> Optional[VectorSearchEndpoint]

Return the endpoint with this name, or None when missing.

index

index(
    index_name: str, *, endpoint_name: Optional[str] = None
) -> VectorSearchIndex

Return a :class:VectorSearchIndex handle.

endpoint_name resolves to the explicit arg, then :attr:VectorSearchDefaults.endpoint_name, then the value carried by the cached :class:VectorIndex infos on first :meth:VectorSearchIndex.refresh.

list_indexes

list_indexes(
    *, endpoint_name: Optional[str] = None
) -> Iterator[VectorSearchIndex]

Iterate over indexes hosted on a given endpoint.

default_tags

default_tags(update: bool = True) -> dict[str, str]

Return default resource tags for Databricks assets.

Returns:

Type Description
dict[str, str]

A dict of default tags.