Let’s Get Certified
Module 11 / 15 · Assembling and deploying applications

Size the index and choose online or batch inference

Balance retrieval freshness, endpoint capacity, latency and inference cost.

Size the index and choose online or batch inference

Work through the decision

A nightly job must label historical notes while an interactive assistant retrieves the latest service bulletins. A single per-request design leaves the batch too expensive and the search index one day stale. Which decisions should be made separately?

Check your reasoning

For the interactive path set a document freshness objective, test Delta Sync behavior and measure retrieval latency at peak load. For historical labels evaluate batch inference through ai_query on a supported endpoint. Preserve input keys and handle failed rows. The correct sync cadence and the correct model serving option depend on different workload characteristics.

Watch the source lesson at 1:22:20

Compare the choices

Delta Sync index
Synchronize a supported Delta source into a searchable index with stable primary keys and compatible embeddings. Validate freshness and deletes.
Foundation Model API
Invoke a supported hosted foundation model with appropriate endpoint access and request schema. Select an appropriate serving mode for traffic.
Batch ai_query
Evaluate a supported model endpoint from SQL across a set of input rows. Record output keys, failures and retry boundaries.
Vector capacity planning
Estimate indexed vectors, dimensions, update cadence, concurrent queries and cost. Benchmark the actual top-k and filtering pattern.

Test the decision

Estimate vector count from chunks, including overlap and versions. Model vector dimensions, endpoint capacity, update traffic and the query rate. Check whether a constrained metadata filter changes recall. Verify a known updated passage after each sync.

Query a governed index

The exam uses the name Vector Search. Current product documentation calls it Databricks AI Search. This SDK example requires a standard endpoint with a managed-embedding index, the listed columns and an identity authorized to read the index. Use an index whose contents are approved for this caller. The edition filter narrows the search to current documents.

Databricks · query an AI Search index

Inspect the first three hybrid matches

from databricks.ai_search.client import AISearchClient

client = AISearchClient()
index = client.get_index(index_name="service.manuals.approved_chunks")
response = index.similarity_search(
    query_text="Which filter fits pump P-82?",
    query_type="hybrid",
    columns=["passage_id", "edition", "text"],
    filters={"edition": "current"},
    num_results=3,
)
print(response["result"]["data_array"])
Check the result

The selected fields allow you to inspect the passage ID, edition and text. Compare hits with approved reference passage IDs. A lower kth score alone cannot tell you whether the evidence is missing.

Practice the guide skills

  1. An index must follow changes in a governed Delta source. Watch 1:22:20 · Continue at 1:25:00 · Continue at 1:25:30
    Check your answer

    Choose a supported Delta Sync index with a stable primary key and appropriate embedding mode. Sync it, query with a representative input, and verify updated and deleted rows are reflected.

  2. Serve interactive requests through a supported Foundation Model API. Watch 1:27:48
    Check your answer

    Select a permitted endpoint and serving option for load and latency, construct a request with the right input schema, and handle errors and limits. Keep secrets in approved identity or secret facilities.

  3. Differentiate vector storage, the index and the endpoint. Watch 1:22:00 · Continue at 1:22:30
    Check your answer

    A document embedding represents text in a vector space. The index supports similarity lookup, and the endpoint supplies serving capacity. Use a compatible encoder when providing query vectors.

  4. A backlog of 200,000 historic notes needs short labels overnight. Watch 1:31:57
    Check your answer

    Evaluate batch inference with ai_query from a SQL job against an authorized supported endpoint. Capture input keys and per-row results, bound concurrency and retry failed rows safely.

  5. Size a vector retrieval service for growth. Watch 1:22:55 · Continue at 1:24:00
    Check your answer

    Estimate chunk and embedding counts, dimension, update frequency, sync mode and concurrent requests. Load-test p95 latency, freshness and cost before selecting capacity.

Official objectives for this lesson

Related lesson · Compute and cluster types

Knowledge check

Size the index and choose online or batch inference quiz

Answer 3 questions. Check each answer for an explanation.