CertSafari
    Databricks Certified Generative AI Engineer Associate· Lessons

    Domain 4 · Lesson 35/56

    Mosaic AI Vector Search: components, index types and query types

    Explain the key concepts and components of Mosaic AI Vector Search

    18 min read
    1.47% of exam
    3 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Explain how Vector Search measures similarity and why cosine similarity requires normalised embeddings
    • Describe how the Vector Search endpoint, the index and the embedding model endpoint relate to each other
    • Choose between a Delta Sync index and a Direct Vector Access index, and between managed and self-managed embeddings
    • Pick ANN, full-text or hybrid queries, and know when to add filters or the reranker

    Key concept

    Vector Search index — A Unity Catalog object built from a source table that holds embeddings plus metadata and answers nearest-neighbour queries. An endpoint serves it. If Databricks computes the embeddings, an embedding model endpoint also feeds it.

    1.What Vector Search does and how it measures similarity

    Mosaic AI Vector Search is the retrieval engine built into Databricks. A RAG application uses it to find the passages that best answer a question. Databricks has since renamed the product Databricks AI Search, so the SDK is databricks-ai-search and the client class is AISearchClient. The concepts and the REST paths (/api/2.0/vector-search/...) are the same.

    The search runs over embeddings. An embedding is a vector of numbers that represents what a piece of text or an image means. Two passages that mean similar things get vectors that lie close together, even if they share no words. A query is embedded the same way, and the search returns the stored vectors nearest to it, together with the documents they came from.

    Similarity has a fixed definition: L2 (Euclidean) distance between the query vector and each indexed vector. There is no setting to pick another metric. Comparing a query against every vector would be too slow at scale, so Vector Search runs an approximate nearest neighbor (ANN) search over a Hierarchical Navigable Small World (HNSW) graph. The trade is a tiny chance of missing the exact nearest vector in return for fast queries over millions of rows.

    Cosine similarity is the one case that needs work from you. If your embedding model expects it, normalise every vector before it reaches the index. For normalised vectors, ranking by L2 distance gives the same order as ranking by cosine, so the results match what the model intended.

    Checkpoint 1 of 9· Check yourself

    A teammate is reviewing your RAG retrieval setup. Which statement correctly describes how Mosaic AI Vector Search finds and ranks the passages it returns?

    Sources1

    2.Endpoint, index and embedding model endpoint

    A working Vector Search setup has two required parts and one conditional part. The endpoint is the compute that serves indexes. It scales up on its own as an index grows or concurrent requests increase, and it scales down when an index is deleted. The index holds the embedded data and metadata. It is built from a Delta Lake table, a streaming table or a managed Iceberg v3+ table, and it is a Unity Catalog object with a three-level name like catalog.schema.index. One endpoint can serve several indexes.

    The third part, an embedding model endpoint, is needed only when Databricks computes the embeddings for you. It can be a pre-configured Foundation Model APIs endpoint or your own model serving endpoint. The index calls it twice in a document's life: once to embed source rows during sync, and again to embed each query text. Which model to choose belongs to Choosing the embedding model for a RAG app. Inside Vector Search it is simply a dependency the index needs to reach. Two settings matter in practice. If the embedding endpoint scales to zero, the first query after an idle period can time out while it warms up. A CPU endpoint can make index initialisation time out on a large dataset, so use CPU only for small datasets and tests.

    Each part has its own access controls. Endpoint create and manage permissions use access control lists. Creating an index needs CREATE TABLE on the target schema. A user who does not own the index needs USE CATALOG, USE SCHEMA and SELECT to query it.

    You choose the endpoint type when you create the endpoint, and that choice limits what its indexes can do. The table lists the differences that change how an index behaves. Sizing an endpoint for a given workload is covered elsewhere.

    Standard and storage-optimized endpoints: properties that constrain their indexes
    PropertyStandard (STANDARD)Storage-optimized (STORAGE_OPTIMIZED)
    Capacity at dimension 768320 million vectorsOver one billion vectors
    Sync modes for Delta Sync indexesContinuous or TriggeredTriggered only
    Source table requirementChange data feed requiredNo change data feed requirement
    Indexing and query speedHigh QPS option available10-20x faster indexing; about 250 ms extra query latency
    Filter syntaxDictionary, e.g. {"status": "active"}SQL-like string, e.g. "status = 'active'"
    Dedicated full-text index (no embeddings)Not supportedSupported (Beta)

    Checkpoint 2 of 9· Check yourself

    Your support-ticket index must reflect new tickets within seconds, and the source Delta table holds about 50 million vectors at dimension 768. Which setup can deliver this?

    Checkpoint 3 of 9· Match them up

    Match each part of a Vector Search setup to its role

    Tap a term, then the definition that fits it.

    Sources123

    3.Delta Sync and Direct Vector Access indexes

    There are two index types, and the difference is who keeps the index up to date. A Delta Sync index follows a source table. When rows in the table change, the index updates incrementally to match, and you never write to the index yourself. A Direct Vector Access index has no source table to follow. Your code writes vectors and metadata into it through the REST API or the Python SDK (upsert, delete-data), and whenever the data changes you have to push the change. You also cannot create a Direct Vector Access index from the UI; only the SDK or REST API can create one.

    If your chunks already land in a Delta table, as they do in most Databricks RAG pipelines, Delta Sync is the right choice. Picking Direct Access in that case means writing and maintaining sync code that Delta Sync gives you for free. Direct Access suits vectors that come from outside any table, written by an application that wants full control over each write.

    Sync mode applies only to Delta Sync indexes. Direct Access has no sync because you are the sync. The SDK sets it with pipeline_type, and there are two modes:

    • Continuous keeps the index within seconds of the source table. A compute cluster stays provisioned to run the streaming pipeline, which costs more. Only standard endpoints support it.
    • Triggered updates the index only when you start a sync with index.sync(), the REST API or the Sync now button. Nothing runs between syncs.
    • On a standard endpoint, both modes process only the rows that changed. On a storage-optimized endpoint, which supports Triggered only, every sync partially rebuilds the index, but managed embeddings for unchanged rows are reused rather than recomputed.

    How to weigh freshness against cost for a given workload is covered in Triggered vs continuous sync. The combinations themselves are fixed. A catalogue that must show a price change within seconds needs a standard endpoint, continuous sync, and change data feed on the source table. A knowledge base reloaded by a nightly batch fits triggered sync: call sync() when the ETL job finishes and pay nothing in between. Storage-optimized endpoints support exactly that pattern.

    Both index types fix their schema at creation. Adding or changing a column in the source table means building a new index, moving traffic to it, and then deleting the old one.

    Checkpoint 4 of 9· Put it in order

    Product wants a new region column added to the source table behind a live Delta Sync index, with no search downtime. Put the steps in the order that makes this work.

    1. 1.Add the new column to the source table
    2. 2.Create a new index from the updated table schema
    3. 3.Delete the original index
    4. 4.Once the new index is ready, switch query traffic to it

    Checkpoint 5 of 9· Exam question

    A data engineering team is building a RAG index over an internal knowledge base that is refreshed only twice a day by a batch ETL job. Cost efficiency matters more than index freshness, and the team does not need a continuously running sync process. Which AI Search endpoint and sync configuration best fits these requirements?

    Checkpoint 6 of 9· Exam question

    An e-commerce team's product catalog table changes dozens of times per minute, and their RAG-based shopping assistant must reflect price and availability updates within seconds of a Delta table write. Which configuration should they choose?

    Sources2

    4.Managed and self-managed embeddings

    A Delta Sync index can get its vectors in one of two ways, and you choose when you create it. With managed embeddings ("Compute embeddings" in the UI), you point the index at a text column with embedding_source_column and at a model with embedding_model_endpoint_name. Databricks embeds each new or changed row during sync and embeds query text at query time. With self-managed embeddings ("Use existing embeddings"), the source table already has a vector column of type array[float]. You name it with embedding_vector_column and give embedding_dimension, and Databricks indexes those vectors without recomputing them.

    A Delta Sync index over precomputed vectors: it still follows the source table, but no embedding model is involvedpython
    index = client.create_delta_sync_index(
      endpoint_name="vector_search_demo_endpoint",
      source_table_name="vector_search_demo.vector_search.en_wiki",
      index_name="vector_search_demo.vector_search.en_wiki_index",
      pipeline_type="TRIGGERED",
      primary_key="id",
      embedding_dimension=1024,
      embedding_vector_column="text_vector"
    )

    Self-managed is the right choice when your vectors come from a model Databricks does not serve, such as a proprietary fine-tuned embedder. You keep that model and still get automatic syncing. The cost is at query time: because the index has no model attached, each query must arrive as a query_vector that you embedded yourself with the same model. A managed index takes plain query_text.

    Managed embeddings come with two extras. Save computed embeddings writes the generated vectors to a Unity Catalog table named after the index with _writeback_table appended. You can query that table but should not modify it, and it is deleted along with the index. model_endpoint_name_for_query lets queries use a separate endpoint serving the same model, so a high-throughput endpoint can handle ingestion while a low-latency one handles queries.

    The embedding source cannot be changed after creation. A self-managed index cannot be converted to a managed one. Switching means creating a new index and recomputing every embedding. A third option skips embeddings entirely: a dedicated full-text index (Beta) is a Delta Sync index with no embedding columns, supports keyword search only, and requires a storage-optimized endpoint with triggered sync.

    Checkpoint 7 of 9· Fill the gap

    Your source Delta table already stores 1024-dimension vectors in a text_vector column, produced by a fine-tuned embedder that Databricks does not serve. You want the index to keep following the table. Which parameter completes this index definition?

    index = client.create_delta_sync_index(
      endpoint_name="vector_search_demo_endpoint",
      source_table_name="vector_search_demo.vector_search.en_wiki",
      index_name="vector_search_demo.vector_search.en_wiki_index",
      pipeline_type="TRIGGERED",
      primary_key="id",
      embedding_dimension=1024,
       ? ="text_vector"
    )

    Checkpoint 8 of 9· Exam question

    A GenAI engineering team has already computed embeddings for their documents using a proprietary fine-tuned embedding model and stores the resulting vectors as a column in a Delta table alongside the document text. They want the index to automatically pick up new rows as the Delta table changes, without Databricks recomputing embeddings. Which index configuration should they use?

    Sources12

    5.ANN, full-text and hybrid queries, with filters and reranking

    You query an index through the Python SDK (similarity_search), the REST API or the SQL vector_search() function. The query_type parameter chooses the retrieval algorithm, and ANN is the default.

    Query types and the workloads each one suits
    query_typeHow it retrievesWins whenStruggles when
    ann (default)Nearest embeddings by L2 distanceQueries are conceptual or use different words from the documentsQueries rely on exact codes, proper nouns or jargon
    FULL_TEXT (Beta)Keyword matching scored with Okapi BM25; up to 10,000 resultsQueries contain identifiers, product names or error codesQueries paraphrase or use synonyms
    hybridANN and full-text in parallel, merged with Reciprocal Rank Fusion; up to 200 resultsThe workload mixes conceptual and keyword-heavy queriesRarely; the recommended starting point

    Pure vector search breaks down on identifiers. To an embedding model, SKU-48213 and SKU-48231 look almost the same, but to a shopper they are different products. Full-text search scans every text column, tokenises at word boundaries, lowercases, strips punctuation, and finds exact hits. Hybrid search runs both searches. RRF then rescores each document by its rank in each result list and merges the two, so a document ranked high by either method rises to the top. Use hybrid whenever the source data contains SKUs, ticket numbers or similar keys that a question might quote word for word.

    Filters narrow any query to rows matching conditions on indexed columns, such as language, product line or date. Only columns that were synced into the index can be filtered on. Standard endpoints take a dictionary such as {"status": "active"}. Storage-optimized endpoints take a SQL-like string such as "language = 'en' AND country = 'us'". If you leave out the query text, vector and query type and pass only filters, you get a filter-only query: matching rows with no retrieval scoring, which also works as a primary-key lookup.

    The reranker is a second, optional pass that runs after any query type. Its theory is covered in Re-ranking in the retrieval pipeline. In Vector Search it is just a query argument. A cross-encoder rescores the retrieved results against the query, typically improving quality by about 10% at the cost of extra latency. That trade suits a RAG chatbot more than a high-throughput search box. columns_to_rerank sets which columns the reranker reads, in order, and it only reads the first 2,000 characters it finds. num_results sets how many results come back and does not change how many the reranker scores.

    A hybrid query with the Databricks reranker reading two context columnspython
    results = index.similarity_search(
        query_text = "How to create an AI Search index",
        columns = ["id", "text", "parent_doc_summary", "date"],
        num_results = 10,
        query_type = "hybrid",
        reranker=DatabricksReranker(columns_to_rerank=["text", "parent_doc_summary", "other_column"])
        )

    Checkpoint 9 of 9· Match them up

    You are tuning retrieval for a support assistant. Pair each Vector Search query option with the job it does best.

    Tap a term, then the definition that fits it.

    Sources312

    Sources

    (3)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Databricks AI Search (formerly Databricks Vector Search)”
      ↩︎ What Vector Search does and how it measures similarity
      “Embeddings are mathematical representations of the semantic content of data, typically text or image data.”
      ↩︎ What Vector Search does and how it measures similarity
      “Hierarchical Navigable Small World (HNSW) algorithm for its approximate nearest neighbor (ANN) searches”
      ↩︎ What Vector Search does and how it measures similarity
      “If you want to use cosine similarity you need to normalize your datapoint embeddings before feeding them into the vector search algorithm.”
      ↩︎ What Vector Search does and how it measures similarity
      “Endpoints scale up automatically to support the size of the index or the number of concurrent requests.”
      ↩︎ Endpoint, index and embedding model endpoint
      “AI Search indexes appear in and are governed by Unity Catalog.”
      ↩︎ Endpoint, index and embedding model endpoint
      “you can use a pre-configured Foundation Model APIs endpoint or create a model serving endpoint to serve the embedding model of your choice”
      ↩︎ Endpoint, index and embedding model endpoint
      “For standard endpoints, the source table must use a change data feed.”
      ↩︎ Endpoint, index and embedding model endpoint
      “Queries on storage-optimized endpoints have a slightly increased latency of about 250msec.”
      ↩︎ Endpoint, index and embedding model endpoint
      “Databricks calculates the embeddings, using a model that you specify, and optionally saves the embeddings to a table in Unity Catalog.”
      ↩︎ Managed and self-managed embeddings
      “It is not possible to convert a self-managed embedding index to a Databricks-managed index.”
      ↩︎ Managed and self-managed embeddings
      “The similarity search and keyword search results are combined using the Reciprocal Rank Fusion (RRF) function.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “where source data has unique keywords such as SKUs or identifiers that are not well suited to pure similarity search”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “With an AI Search index, you can use real-time approximate nearest neighbor (ANN) searches on a source table or view.”
      ↩︎ Key concept
      “the L2 distance metric to measure embedding vector similarity”
      ↩︎ Exam trap 1
      “With this option, you must manually update the index using the REST API when the embeddings table changes.”
      ↩︎ Exam trap 3
      “It is not possible to convert a self-managed embedding index to a Databricks-managed index.”
      ↩︎ Exam trap 4
      “AI Search uses the Hierarchical Navigable Small World (HNSW) algorithm for its approximate nearest neighbor (ANN) searches and the L2 distance metric”
      ↩︎ Checkpoint
      “if you choose to have Databricks compute the embeddings, you can use a pre-configured Foundation Model APIs endpoint”
      ↩︎ Checkpoint
    2. 2.
      “Databricks recommends that you remove the default selection of Scale to zero.”
      ↩︎ Endpoint, index and embedding model endpoint
      “You should only use CPU endpoints for small datasets and tests.”
      ↩︎ Endpoint, index and embedding model endpoint
      “Delta Sync Index automatically syncs with a source table, incrementally updating the index as the underlying data in the source table changes.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “The user is responsible for updating this table using the REST API or the Python SDK.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “This type of index cannot be created using the UI.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “Continuous keeps the index in sync with seconds of latency.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “a compute cluster is provisioned to run the continuous sync streaming pipeline”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “For storage-optimized endpoints, only Triggered sync mode is supported.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “The index schema is fixed at creation time, so any schema changes require creating a new index to take effect.”
      ↩︎ Delta Sync and Direct Vector Access indexes
      “The format of the precomputed embedding column should be array[float].”
      ↩︎ Managed and self-managed embeddings
      “The name of the table is the name of the AI Search index, appended by _writeback_table.”
      ↩︎ Managed and self-managed embeddings
      “Must use Triggered sync mode. Continuous sync is not supported.”
      ↩︎ Managed and self-managed embeddings
      “Only indexed columns can be returned in search results or used as filters.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “For storage-optimized endpoints, only Triggered sync mode is supported.”
      ↩︎ Exam trap 2
      “For storage-optimized endpoints, only Triggered sync mode is supported.”
      ↩︎ Checkpoint
      “After the new index is ready, switch traffic to the new index.”
      ↩︎ Checkpoint
    3. 3.
      “USE SCHEMA on the schema that contains the AI Search index.”
      ↩︎ Endpoint, index and embedding model endpoint
      “The default query type is ann (approximate nearest neighbor).”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “You can only query the AI Search index using the Python SDK, the REST API, or the SQL vector_search() AI function.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “By default, hybrid search includes all text metadata columns and returns a maximum of 200 results.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “A filter-only query returns rows that match a filter without performing vector or keyword retrieval.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “The reranker typically improves quality by approximately 10% but adds latency.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “num_results is the final number of results to return. This does not affect the number of results used for reranking.”
      ↩︎ ANN, full-text and hybrid queries, with filters and reranking
      “Full-text | Keyword search that matches on exact terms. | Queries with specific terms, proper nouns, product IDs, or technical jargon.”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.