Assembling and Deploying Applications · Topic 2 of 4

Vector Search Indexes and Endpoints

Databricks GenAI Engineer: Vector Search concepts, Delta Sync vs Direct Vector Access, standard vs storage optimized endpoints, create and query an index.

  • 5 min
  • Includes a diagram
In a nutshell
  • An endpoint serves queries; an index holds vectors; one endpoint can host several indexes.
  • Delta Sync indexes follow a source Delta table; Direct Vector Access indexes are written through the API.
  • Triggered sync is cheaper; continuous sync is fresher and runs only on standard endpoints.

What it is

Mosaic AI Vector Search stores embeddings of your chunks and returns the closest ones to a query. It is the retriever behind most RAG applications on Databricks. It is called Databricks AI Search in newer docs; the exam guide keeps the Vector Search name.

It has two building blocks: an endpoint, the compute that serves queries, and an index, the searchable copy of your vectors, governed in Unity Catalog with a catalog.schema.index name.

Delta tablechunkssyncIndexvectorsEndpointserves queriesRetrievertop k chunks

How it works

Index types

Vector Search index types: a Delta Sync index syncs from a source Delta table with Change Data Feed on, in triggered or continuous mode, with managed or self managed embeddings; a Direct Vector Access index has no automatic sync and application code upserts and deletes vectors through the API.

IndexHow it is updatedPick it when
Delta Sync, managed embeddingsSyncs from a source Delta table; Databricks computes embeddings from a text columnYou want the least code and data already lives in Delta
Delta Sync, self managed embeddingsSyncs from a Delta table that already holds vectorsYou compute embeddings yourself
Direct Vector AccessYou write and delete vectors through the APIUpdates come from an application, not a table

A Delta Sync index needs Change Data Feed on the source table for standard endpoints (a table with row tracking enabled uses it automatically). It runs in triggered mode, where you start each sync, or continuous mode, which keeps the index close to real time at higher cost. A Direct Vector Access index never syncs by itself; your code upserts rows.

Endpoint types

StandardStorage optimized
ScaleHundreds of millions of vectorsOver a billion vectors
Query latencyLowerAbout 250 ms higher
Indexing speedBaselineMuch faster
Cost at large scaleHigherLower
Continuous syncSupportedNot supported
High query rateSupportedNot available

Choose by the requirement the scenario states. Very large corpora and cost pressure point to storage optimized; tight latency, a high query rate or continuous freshness point to standard.

Creating an index

You create an endpoint, then an index on it. With managed embeddings you name the source column and the embedding endpoint.

index = client.create_delta_sync_index(
    endpoint_name="docs_endpoint",
    source_table_name="main.docs.chunks",
    index_name="main.docs.chunks_index",
    pipeline_type="TRIGGERED",
    primary_key="chunk_id",
    embedding_source_column="text",
    embedding_model_endpoint_name="databricks-qwen3-embedding-0-6b")

Here client is a VectorSearchClient from databricks.vector_search.client. That package is now a deprecated alias of the renamed SDK, which keeps the same method names. A triggered index is refreshed with index.sync(); a Direct Vector Access index is created with create_direct_access_index and written with index.upsert([...]).

Querying an index

index = client.get_index(index_name="main.docs.chunks_index")
results = index.similarity_search(
    query_text="How do I enable Change Data Feed?",
    columns=["chunk_id", "text", "source_url"],
    num_results=5,
    filters={"product": "Delta Lake"})

With managed embeddings you pass query_text and the index embeds it with the same model. With self managed embeddings you pass query_vector yourself. columns chooses what comes back, and filters narrows results by metadata columns: a dictionary on standard endpoints, a SQL like string on storage optimized ones.

Hybrid search and re ranking

query_type="hybrid" runs vector and keyword (full text) search together and merges the two rankings, which helps with exact terms such as product codes or error IDs. A re ranker then rescores a small candidate set: a cross encoder reads the query and each passage together, which is more accurate than vector distance but too slow to run on the whole index.

QueryHybrid searchvector plus keywordTop candidatesRe rankerquery and passage togetherBest chunks to LLM

How the exam asks about this

  • "Documents land in a Delta table nightly and the index must reflect them each morning at the lowest cost." Use a Delta Sync index in triggered mode and run sync() after the load.
  • "An application streams new vectors that are not stored in any table." Use a Direct Vector Access index and upsert.
  • "Two billion embeddings, cost matters, a little extra latency is acceptable." Use a storage optimized endpoint.

What to remember for the exam

  • An endpoint serves queries; an index holds vectors; one endpoint can host several indexes.
  • Delta Sync indexes follow a source Delta table; Direct Vector Access indexes are written through the API.
  • Triggered sync is cheaper; continuous sync is fresher and runs only on standard endpoints.
  • Managed embeddings let you query with plain text through query_text.
  • Storage optimized endpoints trade some latency for scale and lower cost.
  • Hybrid search catches exact keywords; a re ranker improves the order of a small candidate set.
Watch out

You cannot build a Vector Search index on a table that has row filters or column masks, so the index never inherits them. Restrict what each user sees with the filters argument or with separate indexes.

Common mistakes

Expecting a Direct Vector Access index to follow a table. It has no source table, so nothing syncs. If the data lives in Delta, a Delta Sync index is the simpler answer.

Choosing continuous sync for daily data. Continuous mode keeps compute running for freshness nobody asked for. Triggered sync after each load meets a daily requirement at lower cost.

Running a re ranker over the whole corpus. Cross encoders score pairs one at a time. They belong after retrieval, on the top few dozen candidates.

Check yourself

  • When should you choose a Direct Vector Access index over a Delta Sync index?

    When vectors are produced and updated by an application through the API rather than stored in a source Delta table.

  • What does Change Data Feed do for a Delta Sync index?

    It lets the index read only the rows that changed in the source table, so each sync applies incremental updates.

  • Why use hybrid search for a support bot that receives error codes?

    Keyword scoring matches exact strings such as error codes that pure vector similarity can rank poorly.

Topic 2 of 4 in Assembling and Deploying Applications

Test yourself on Assembling and Deploying Applications

The full Databricks Generative AI Engineer Associate question bank has 600 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Databricks. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.