Databricks GenAI Engineer study materials
Databricks GenAI Engineer study resources

Databricks GenAI Engineer practice questions

One question at a time. Build your Databricks GenAI Engineer understanding.

First 50 of 200 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.

Continue in the practice tool above to load more questions, 50 at a time.

Question 1Design and build generative AI applications

What is the primary purpose of Databricks Foundation Model APIs?

  1. To train new foundation models from scratch on a Databricks cluster
  2. To store embeddings in Unity Catalog as Delta tables
  3. To call hosted foundation models without managing infrastructure Correct answer.
  4. To convert notebooks into scheduled workflows automatically

Explanation

Foundation Model APIs expose hosted foundation models as serving endpoints that applications can query through an API. The platform manages the model infrastructure, so teams do not provision or patch model servers themselves. These APIs do not train models from scratch or store embeddings.

Question 2Design and build generative AI applications

In an OpenAI-compatible chat completions request, which message role supplies instructions that guide the model's behavior across the conversation?

  1. assistant
  2. user
  3. tool
  4. system Correct answer.

Explanation

The system role carries high-level instructions such as persona, constraints, and response format. The user role supplies requests, the assistant role represents prior model responses, and the tool role carries tool results.

Question 3Design and build generative AI applications

What is an embedding primarily used for in a generative AI application?

  1. Translating a SQL query into natural language
  2. Compressing a prompt to reduce token count before generation
  3. Encrypting sensitive text before storing it in Delta Lake
  4. Representing text as a numeric vector for similarity search Correct answer.

Explanation

An embedding maps text to a numeric vector so that semantically similar content has similar vector representations. Applications use these vectors for retrieval, clustering, and similarity comparison. Embeddings are not an encryption or prompt-compression format.

Question 4Design and build generative AI applications

In a retrieval-augmented generation pipeline, what is the correct high-level order of operations?

  1. Embed the query, retrieve documents, then generate an answer Correct answer.
  2. Embed the query, generate an answer, then retrieve documents
  3. Retrieve documents, generate an answer, then embed the query
  4. Generate an answer, retrieve documents, then construct a prompt

Explanation

A RAG application first embeds the user query, uses that vector to retrieve relevant documents, and then sends the retrieved context with the query to the model. Generation must happen after retrieval so the model can condition on the retrieved content.

Question 5Design and build generative AI applications

Which setting most directly reduces randomness in a chat model's responses for a factual question-answering application?

  1. A high top-p value
  2. A larger max_tokens value
  3. A low temperature value Correct answer.
  4. A longer system prompt

Explanation

Temperature controls sampling randomness, and lower values make token selection more deterministic. Top-p controls the cumulative probability mass considered during sampling, while max_tokens controls response length. Prompt length may influence behavior but does not directly control sampling randomness.

Question 6Design and build generative AI applications

What does the max_tokens parameter control in a chat completions request?

  1. The maximum number of input tokens accepted by the model
  2. The maximum number of tokens generated in the response Correct answer.
  3. The maximum number of documents retrieved for RAG
  4. The maximum number of concurrent requests to an endpoint

Explanation

max_tokens limits the number of tokens the model may generate in its response. It is an output-length control and can affect cost and latency, but it does not set the input limit or retrieval depth.

Question 7Design and build generative AI applications

Which Databricks mechanism should an application use to retrieve an API key stored securely for calling an external model?

  1. Write the key to a Delta table in a public schema
  2. Reference the key through a Databricks secret scope Correct answer.
  3. Include the key in the model's system prompt
  4. Hard-code the key in a notebook widget default value

Explanation

Databricks secret scopes store credentials and expose them to authorized code at runtime without embedding them in source or prompts. Applications should retrieve secrets through the secrets API or secret-backed environment configuration. Hard-coding or prompting exposes credentials.

Question 8Design and build generative AI applications

What is the Databricks SQL ai_query function commonly used for in a generative AI application?

  1. Creating a vector search index from a Delta table
  2. Scheduling a notebook to retrain a custom model
  3. Encrypting columns that contain personally identifiable information
  4. Calling a model endpoint from SQL for each row Correct answer.

Explanation

ai_query invokes a supported model serving endpoint from SQL and returns the model response for each row. This is useful for batch inference and large-scale enrichment directly in a query. It does not create indexes or encrypt data.

Question 9Design and build generative AI applications

A Delta table contains document text and an embedding column. Which Databricks Vector Search capability keeps a vector index updated as new rows are inserted into the table?

  1. A Parquet-backed index that reads files on every query
  2. A manually rebuilt index triggered by a SQL alert
  3. A Delta Sync index that syncs from the source table Correct answer.
  4. A temporary view that recomputes embeddings at query time

Explanation

A Delta Sync vector index is connected to a source Delta table and synchronizes changes so index content stays current. It avoids manual rebuilds for routine inserts and updates. Other storage or view constructs do not provide the managed Vector Search synchronization behavior.

Question 10Design and build generative AI applications

When splitting source documents into chunks for a RAG application, why is overlap between adjacent chunks often used?

  1. It reduces the number of embeddings that must be stored
  2. It guarantees that every query retrieves the same chunks
  3. It helps preserve context that falls near a chunk boundary Correct answer.
  4. It removes the need for a vector search index

Explanation

Overlap repeats some text across neighboring chunks so that sentences or ideas crossing a boundary are not lost from retrieval. This improves the chance that a relevant passage is fully represented in at least one chunk. Overlap increases rather than reduces stored content.

Question 11Design and build generative AI applications

In a LangChain application running on Databricks, which component is designed to call a Databricks Foundation Model API chat endpoint?

  1. The ChatDatabricks chat model class Correct answer.
  2. A Unity Catalog volume
  3. A Spark MLlib transformer
  4. A Delta Live Tables pipeline

Explanation

ChatDatabricks is the LangChain integration for invoking Databricks chat model serving endpoints. It lets LangChain chains and agents use a Databricks-hosted chat model through the standard chat model interface. Delta Live Tables, volumes, and MLlib transformers serve different purposes.

Question 12Design and build generative AI applications

What is the main benefit of enabling MLflow tracing for a retrieval-augmented generation chain?

  1. It increases the model endpoint's provisioned throughput
  2. It records retrieval and model-call steps for debugging Correct answer.
  3. It automatically fine-tunes the embedding model on user queries
  4. It replaces the need to evaluate answer quality

Explanation

MLflow tracing captures spans for steps such as document retrieval, prompt construction, and model invocation, including inputs, outputs, and timing. These traces help diagnose failures and analyze latency or quality issues. Tracing does not tune models or replace evaluation.

Question 13Design and build generative AI applications

An MLflow evaluation uses an LLM judge to score answer correctness. Which input is needed to compare generated answers with known correct answers?

  1. A vector search endpoint with at least two indexes
  2. An evaluation dataset that includes ground-truth responses Correct answer.
  3. A custom Docker image for the model serving endpoint
  4. A larger max_tokens value for the judge model

Explanation

Correctness comparisons require reference answers so the judge or metric has a target to compare against. The evaluation dataset supplies inputs and expected outputs. Larger output limits or additional indexes do not provide ground truth.

Question 14Design and build generative AI applications

You have a Python chain that calls a foundation model and post-processes the response. Which approach deploys it as a Databricks model serving endpoint?

  1. Wrap the chain in an MLflow pyfunc model and serve that model Correct answer.
  2. Register the chain as a Unity Catalog table and query it with SQL
  3. Attach the chain to a notebook and share the notebook URL
  4. Convert the chain into a Delta Live Tables expectation

Explanation

An MLflow pyfunc model packages Python inference logic with its dependencies so Databricks model serving can deploy it behind an endpoint. The endpoint handles request routing and scaling. Tables, pipeline expectations, and notebook sharing do not create model serving endpoints.

Question 15Design and build generative AI applications

A team needs predictable latency and reserved capacity for a high-volume production generative AI application. Which endpoint configuration is most appropriate?

  1. Provisioned throughput on a serving endpoint Correct answer.
  2. A SQL warehouse set to serverless
  3. Pay-per-token Foundation Model APIs
  4. A single-node interactive cluster

Explanation

Provisioned throughput reserves model serving capacity for an endpoint, which is appropriate when latency and volume must be predictable. Pay-per-token access is convenient but can be subject to shared capacity and rate limits. SQL warehouses and interactive clusters are not model serving endpoint capacity options.

Question 16Design and build generative AI applications

What role does AI Gateway play for generative AI applications on Databricks?

  1. It converts vector indexes into relational tables
  2. It trains custom foundation models from Delta tables
  3. It replaces MLflow for experiment tracking
  4. It adds rate limits and usage tracking to endpoints Correct answer.

Explanation

AI Gateway provides governance and monitoring features for model endpoints, including rate limiting and usage tracking. It helps teams control access and observe generative AI traffic. It does not train models, convert indexes, or replace experiment tracking.

Question 17Design and build generative AI applications

An application queries a Databricks Vector Search index. Which Unity Catalog object typically controls whether a user can query the index?

  1. The vector search index's Unity Catalog privileges Correct answer.
  2. The cluster's Spark configuration
  3. The Delta table's retention period
  4. The notebook's default language

Explanation

Vector Search indexes are Unity Catalog securables, so access is governed through privileges on the index and related objects. A user typically needs permission to query the index and may also need access to the underlying source data. Cluster configuration and notebook settings do not grant index access.

Question 18Design and build generative AI applications

What is a Databricks external model endpoint used for?

  1. Serving a model that has no registered MLflow artifact
  2. Running SQL queries against a serverless warehouse
  3. Calling a model hosted outside Databricks through a governed endpoint Correct answer.
  4. Storing embeddings inside a Unity Catalog volume

Explanation

External model endpoints let Databricks applications call supported third-party or externally hosted models while applying Unity Catalog governance and endpoint controls. They proxy requests to the external provider rather than hosting the model weights. They are not a storage or SQL execution feature.

Question 19Design and build generative AI applications

In a tool-calling workflow, what does the application do after the model returns a tool call request?

  1. It retrains the foundation model with the tool definition
  2. It executes the requested tool and sends the result back to the model Correct answer.
  3. It converts the tool call into a vector search index
  4. It ignores the request and returns the raw tool name to the user

Explanation

The application is responsible for executing the requested tool and appending the tool result to the conversation so the model can produce a final answer. The model selects a tool and arguments but does not execute external actions itself. This separation lets the application validate and control tool use.

Question 20Design and build generative AI applications

Which technique best enforces a specific JSON schema for a model's response?

  1. Adding a random suffix to the prompt for each request
  2. Increasing the temperature to encourage format variation
  3. Removing the system message from the conversation
  4. Using response-format constraints with schema validation Correct answer.

Explanation

Response-format or structured-output constraints instruct the model to produce JSON that matches a schema, and application-side validation catches any remaining mismatch. This combination is more reliable than prompt-only formatting instructions. Random variation and removing instructions make format compliance less likely.

Question 21Design and build generative AI applications

A RAG application indexes documents with one embedding model but embeds user queries with a different embedding model. What is the most likely effect?

  1. Similarity scores become unreliable because the vectors are incompatible Correct answer.
  2. The foundation model increases its context window to compensate
  3. Retrieval improves because the two models provide complementary views
  4. The vector index automatically retrains the query model

Explanation

Embedding models define their own vector spaces, so vectors from different models are not directly comparable. Query and document embeddings should come from the same model and compatible version. Mixing models usually degrades retrieval rather than improving it.

Question 22Design and build generative AI applications

An application places untrusted user text directly into the system prompt of a RAG chatbot. Which mitigation most directly reduces prompt injection risk?

  1. Keeping user content in a separate message and validating model/tool outputs Correct answer.
  2. Storing the prompt in a Delta table instead of a notebook
  3. Increasing the model's temperature for creative responses
  4. Using a larger embedding dimension for document chunks

Explanation

Untrusted content should be separated from trusted system instructions and clearly delimited as data. Applications should also validate model outputs and tool calls before acting on them. Prompt injection defenses combine instruction isolation, least-privilege tools, and output checks.

Question 23Design and build generative AI applications

A multi-turn chat application is approaching the model's context window limit. Which approach best preserves useful conversation history while controlling token usage?

  1. Delete all prior turns whenever the limit is reached
  2. Summarize older turns and keep recent turns plus retrieved context Correct answer.
  3. Append every prior turn without modification until the request fails
  4. Increase max_tokens so that the input history is stored in the response

Explanation

Summarizing older conversation history retains key facts while reducing token count, and keeping recent turns preserves local coherence. Relevant retrieved context can be included separately for the current request. Simply appending all history or deleting everything sacrifices reliability or continuity.

Question 24Design and build generative AI applications

A vector-only retriever misses documents containing exact product codes that are semantically similar to many other descriptions. Which enhancement is most appropriate?

  1. Combine vector and keyword search, then rerank results Correct answer.
  2. Remove metadata filters so all documents are always considered
  3. Increase the chunk size until each chunk contains the entire corpus
  4. Lower the embedding dimension to make codes easier to match

Explanation

Hybrid search adds keyword matching for exact terms such as product codes while retaining semantic vector retrieval. Reranking the merged candidates improves the final ordering. Neither reducing dimensions nor removing filters addresses exact-token matching.

Question 25Design and build generative AI applications

When evaluating a RAG retriever, what does recall@k measure?

  1. The share of relevant documents found in the top k results Correct answer.
  2. The model's ability to generate the exact reference answer
  3. The fraction of retrieved documents that are relevant to the query
  4. The average number of tokens in the top k retrieved chunks

Explanation

Recall@k measures how many of all relevant documents are included in the top k retrieved results. Precision, by contrast, measures how many retrieved documents are relevant. Token counts and answer generation quality are separate metrics.

Question 26Design and build generative AI applications

In a chat completions request, what does the top_p (nucleus sampling) parameter control?

  1. It sets the maximum number of tokens the model is allowed to generate.
  2. It controls how many alternative completions are returned for each request.
  3. It limits sampling to the smallest token set whose cumulative probability reaches p. Correct answer.
  4. It scales a penalty applied to tokens that already appear in the text.

Explanation

top_p is a sampling control: the model sorts next-token probabilities and keeps only the smallest group whose cumulative probability reaches p, then samples from that group. Lowering p narrows the candidate pool and makes output more focused. It is independent of length limits and of how many completions are requested.

Question 27Design and build generative AI applications

Why would you include a few input-output examples in a prompt before the real user request?

  1. To remove the need for a system message in the request.
  2. To show the model the desired input-output pattern so it imitates it. Correct answer.
  3. To permanently update the model weights with task-specific knowledge.
  4. To lower the number of billed tokens by pre-filling part of the response.

Explanation

Examples supplied inside the prompt act as in-context demonstrations: the model infers the expected format, tone, and reasoning pattern from them and applies it to the new input. This conditioning happens only for that request. Nothing about the model's parameters changes.

Question 28Design and build generative AI applications

What is the main benefit of requesting a streamed response from a chat model in an interactive application?

  1. It lowers the total cost because partially streamed responses are billed at a reduced rate.
  2. It lets the client render partial output as tokens arrive rather than waiting. Correct answer.
  3. It extends the context window by sending the prompt incrementally.
  4. It guarantees the model returns a response that matches the requested schema.

Explanation

With streaming, the endpoint emits incremental chunks as tokens are produced, so time-to-first-token becomes the user-visible latency instead of the full generation time. Total tokens, total cost, and the context window are unaffected. Schema conformance must still be enforced by prompt design or structured-output settings.

Question 29Design and build generative AI applications

In a retrieval-augmented generation application, why are retrieved passages inserted into the prompt?

  1. They are used to fine-tune the model's weights at request time.
  2. They are recorded for billing reconciliation only.
  3. They remove the need for an embedding model during retrieval.
  4. They give the model source text to condition its answer on. Correct answer.

Explanation

RAG supplies grounding context: the retrieved passages appear in the prompt so the answer can be derived from that source content instead of the model's parametric memory. This is what allows answers to reflect current or private documents. The model itself is unchanged by the request.

Question 30Design and build generative AI applications

A knowledge base consists of long Markdown documents with clear headings, tables, and code blocks. Which chunking approach best preserves meaning for retrieval?

  1. Keep every document as one chunk unless it exceeds the model context window.
  2. Split at every line break so each chunk is as small as possible.
  3. Split each document into fixed-size token windows with no awareness of headings.
  4. Split on structural boundaries such as headings and keep related blocks together. Correct answer.

Explanation

Structure-aware splitting keeps a heading with the content it governs, so each embedded chunk is self-contained and topically coherent. That improves both the embedding's representativeness and the usefulness of the text handed to the model. Fixed windows and per-line splits cut across semantic units, and whole-document chunks dilute the embedding.

Question 31Design and build generative AI applications

A retriever returns 50 candidate passages for each question. Why add a cross-encoder reranking step before calling the model?

  1. It replaces the embedding model with a keyword-only index.
  2. It permanently retrains the embedding model using the user query.
  3. It expands the number of documents stored in the vector index.
  4. It re-scores candidate passages jointly with the query to raise precision. Correct answer.

Explanation

A cross-encoder reads the query and each candidate together, which captures relevance signals that independent embeddings miss, and it reorders the shortlist so only the strongest passages fill the prompt. It runs on a small candidate set, so the extra cost is bounded. It is a scoring step, not an indexing or training step.

Question 32Design and build generative AI applications

A generative AI application intermittently receives HTTP 429 responses from its model endpoint during traffic spikes. Which client-side handling is most appropriate?

  1. Retry with exponential backoff and jitter, honoring any retry-after hint. Correct answer.
  2. Swallow the failures and return an empty answer to the user.
  3. Lower the temperature to zero so that fewer requests need to be sent.
  4. Resend the identical request in a tight loop until one of the attempts finally succeeds.

Explanation

HTTP 429 signals rate limiting rather than a malformed request, so the correct response is to slow down and retry. Exponential backoff with jitter spreads retries out and avoids synchronized retry storms, while honoring retry-after respects the server's stated wait. Persistent failures should eventually surface rather than be hidden.

Question 33Design and build generative AI applications

A request handler issues 30 independent model calls and total latency is too high because they run one after another. Which change most directly reduces wall-clock latency?

  1. Issue the calls concurrently with an async client and gather the results. Correct answer.
  2. Cache the response for one prompt and reuse it for the others.
  3. Increase max_tokens on every call so that each individual request finishes sooner.
  4. Merge all thirty prompts into a single unstructured prompt.

Explanation

Independent calls that do not depend on each other's output can overlap in time, so the total duration approaches the slowest single call rather than the sum. An async client with a gather-style await does exactly that, subject to endpoint rate limits. Combining unrelated prompts degrades output quality and does not preserve per-item structure.

Question 34Design and build generative AI applications

Users ask the same support questions with slightly different wording, and the application repeatedly pays to regenerate near-identical answers. Which approach reduces cost and latency while keeping answers accurate?

  1. Disable retrieval for repeat users so that responses become shorter and cheaper to produce.
  2. Cache answers by embedding similarity so near-duplicate questions reuse a prior response. Correct answer.
  3. Pin the model weights in the driver's memory between requests.
  4. Raise temperature to 1.0 so the model produces more diverse answers.

Explanation

Semantic caching stores responses keyed by an embedding of the question, so a new question that is close in vector space to a cached one can reuse that answer after a similarity threshold is met. This converts repeated generation into a lookup. Accuracy is preserved only if the threshold is tuned and cached entries are invalidated when the underlying source data changes.

Question 35Design and build generative AI applications

A Vector Search index stores a department field alongside each document's embedding. An application must never surface content from departments a user cannot access. Which mechanism enforces this at query time?

  1. Pass a metadata filter on the department field with the vector search query. Correct answer.
  2. Increase k and let the model discard any documents the user is not permitted to see.
  3. Set top_k to one so only a single document can ever be returned.
  4. Rebuild the index nightly with an embedding model per department.

Explanation

Metadata (pre-filtering) restricts the candidate set inside the vector search query, so disallowed documents are never retrieved and cannot leak into the prompt. Relying on the model to discard them exposes restricted text to the model and to logs. Separate indexes per department add cost without being necessary.

Question 36Design and build generative AI applications

A 300-page report must be summarized, but it exceeds the model's context window. Which approach is most appropriate?

  1. Truncate the report to its first N tokens and summarize only that portion.
  2. Summarize each section, then summarize the combined section summaries. Correct answer.
  3. Raise the temperature until the model accepts the longer input.
  4. Ask the model to internally expand its context window for this request.

Explanation

A map-reduce pattern summarizes chunks independently and then summarizes those intermediate summaries, so the entire document is covered using requests that each fit the window. Truncation silently drops content, and sampling settings cannot change the accepted input length. The context window is a fixed model property.

Question 37Design and build generative AI applications

A support assistant must answer from a product catalog whose prices and availability change every day. Which design best keeps the answers current?

  1. Fine-tune the model nightly on the full product catalog.
  2. Retrieve current catalog entries at query time and put them in the prompt. Correct answer.
  3. Raise the temperature so the model recalls recently added items.
  4. Increase max_tokens substantially so the whole catalog fits inside the response.

Explanation

Retrieval keeps volatile facts in an external store that is updated as the catalog changes, and only the relevant entries are injected into each prompt. Fine-tuning bakes facts into weights that immediately begin to age and cannot be updated cheaply. Generation parameters do not affect factual currency.

Question 38Design and build generative AI applications

Several engineers edit the prompts used by a production generative AI application, and regressions appear with no way to tell which prompt version produced a given answer. Which change best addresses this?

  1. Store prompts as versioned prompt objects in a prompt registry that the app loads at runtime. Correct answer.
  2. Keep the prompts in an untracked text file on each developer's laptop.
  3. Bake the prompts into the container image and rebuild for each wording tweak.
  4. Keep the prompts in a shared notebook cell that engineers edit in place.

Explanation

A prompt registry gives each prompt a versioned, tracked object in a governed store, so an application can resolve a specific version at runtime and link that version to evaluation results and logged traces. That traceability is what makes regressions attributable. Editing prompts in place or on local disks destroys the link between prompt version and output.

Question 39Design and build generative AI applications

A routing component must always invoke one of the declared tools instead of replying in plain text. Which request setting enforces that?

  1. Set stream to true so tool calls are delivered as they are produced.
  2. Set temperature to zero so the model always picks the same tool.
  3. Set response_format to json_object so the model can only emit valid JSON text.
  4. Set tool_choice to require, or to the specific function that must run. Correct answer.

Explanation

tool_choice controls whether the model may answer in text or must emit a tool call; the require value (or naming a specific function) removes the plain-text option. response_format constrains the shape of emitted text but does not force a tool invocation. Deterministic sampling and streaming change behavior at the margins, not the tool contract.

Question 40Design and build generative AI applications

A team wants every request and response payload handled by a served generative AI endpoint captured in Delta tables for monitoring and later quality analysis. Which capability provides this?

  1. Unity Catalog grants applied to the serving endpoint.
  2. Inference tables enabled on the model serving endpoint. Correct answer.
  3. Autoscaling with scale-to-zero on the serving endpoint.
  4. Provisioned throughput on the serving endpoint.

Explanation

Inference tables capture the request and response payloads of a served model endpoint into a Delta table, which can then be queried for monitoring, drift checks, and offline evaluation. Provisioned throughput and autoscaling change capacity behavior, and grants control who may invoke the endpoint. Neither of those records payload content.

Question 41Prepare data for retrieval augmented generation (RAG)

Why is a long document split into chunks before embeddings are generated for a RAG application?

  1. To reduce the storage cost of the underlying Delta table
  2. To avoid the need for a vector index
  3. To respect token limits and sharpen retrieval precision Correct answer.
  4. To shorten the embedding vector dimension

Explanation

Embedding models accept a bounded number of tokens, so long documents must be split to fit. Smaller chunks also let retrieval return narrowly relevant passages rather than an entire document. Chunking does not change the vector dimension or remove the need for an index.

Question 42Prepare data for retrieval augmented generation (RAG)

Which Databricks component stores embeddings and serves similarity search queries for a RAG application?

  1. A Mosaic AI Vector Search index Correct answer.
  2. A Delta Live Tables pipeline
  3. A Unity Catalog volume
  4. A Model Serving endpoint for the embedding model

Explanation

Mosaic AI Vector Search builds a vector index over embeddings and answers nearest-neighbor queries; the source Delta table supplies the rows. Delta Live Tables and volumes handle transformation and file storage, and Model Serving hosts models rather than vector indexes.

Question 43Prepare data for retrieval augmented generation (RAG)

For a RAG application that must cite sources, what should be stored in the Delta table alongside each chunk's embedding?

  1. Only the source document identifier, with no chunk text stored
  2. Only the embedding vector and its declared dimension
  3. The chunk text plus source metadata such as file path and page number Correct answer.
  4. The weights of the embedding model so it can be retrained at query time

Explanation

Returning the chunk text together with provenance metadata lets the application cite and display the passage the model used. A vector is not human-readable on its own, and a bare document identifier cannot pinpoint which passage was retrieved.

Question 44Prepare data for retrieval augmented generation (RAG)

Which Delta Lake feature lets a pipeline process only rows inserted or updated since the previous run when refreshing embeddings?

  1. Time travel to previous table versions
  2. OPTIMIZE with file compaction
  3. Change Data Feed Correct answer.
  4. Z-ordering on the ingestion timestamp column

Explanation

Change Data Feed exposes row-level inserts, updates, and deletes so a downstream job can read only what changed since the last processed version. That avoids paying to re-embed the entire corpus on every run.

Question 45Prepare data for retrieval augmented generation (RAG)

What does a text embedding model output for an input chunk?

  1. A fixed-length dense vector of floating-point numbers Correct answer.
  2. A ranked list of extracted keywords
  3. A tokenized string that retains the original vocabulary and casing
  4. A compressed representation of the input text

Explanation

Text embedding models map input text to a fixed-length dense vector positioned in a learned semantic space. Texts with similar meaning land close together, which is what makes similarity search possible.

Question 46Prepare data for retrieval augmented generation (RAG)

Which approach extracts text from PDFs most reliably when building a RAG knowledge base on Databricks?

  1. Store only the PDF file path and embed the file name
  2. Convert each PDF page to an image and embed it with a text embedding model
  3. Extract text with a document parser and persist it to a Delta table Correct answer.
  4. Read the PDF bytes directly into the embedding model

Explanation

PDFs generally require a parsing step to recover text, tables, and layout, and the parsed text must be persisted before chunking and embedding. Databricks provides document parsing functions for exactly this purpose.

Question 47Prepare data for retrieval augmented generation (RAG)

What is the effect of configuring chunk overlap so the stride is smaller than the chunk size?

  1. It preserves context that would otherwise be cut at chunk boundaries Correct answer.
  2. It reduces the storage footprint of the embeddings table by deduplicating rows
  3. It guarantees adjacent chunks receive identical embeddings
  4. It removes the need to store chunk metadata

Explanation

Overlap repeats a small span of text across neighboring chunks so ideas that straddle a boundary are not lost to retrieval. The cost is duplicated text, which increases storage rather than reducing it.

Question 48Prepare data for retrieval augmented generation (RAG)

Where should the Delta table holding chunk text and embeddings be registered so that Unity Catalog permissions and lineage apply to it?

  1. In a notebook-scoped temporary view that lasts for the session
  2. In the DBFS root directory
  3. As a Unity Catalog table in a catalog and schema Correct answer.
  4. In a local file system on the driver node

Explanation

Registering the table in a Unity Catalog catalog and schema gives fine-grained grants, column-level controls, lineage, and cross-workspace discoverability. Local paths, the DBFS root, and session-scoped views lack that governance.

Question 49Prepare data for retrieval augmented generation (RAG)

A team must embed 200 million chunks and re-embed them quarterly. Which consideration most strongly favors a batch or self-hosted embedding approach over a per-request foundation model endpoint?

  1. Throughput and cost per token at very large batch volumes Correct answer.
  2. The choice of similarity metric at query time
  3. The need to return results as a JSON document
  4. The number of columns in the Delta table and their data types

Explanation

At hundreds of millions of chunks, sustained throughput and per-token price dominate the design decision, and batch or self-hosted jobs amortize that cost better. Response format, table shape, and metric choice do not change embedding economics.

Question 50Prepare data for retrieval augmented generation (RAG)

What is the typical trade-off when chunk size is reduced from 2000 tokens to 200 tokens?

  1. Retrieval precision improves but each chunk carries less surrounding context Correct answer.
  2. Retrieval precision decreases while context completeness increases
  3. Embedding quality is unaffected and the per-document ingestion cost stays unchanged
  4. The embedding vector dimension shrinks proportionally

Explanation

Smaller chunks match specific queries more precisely, but each retrieved chunk carries less surrounding context, which can leave the LLM without enough information. Larger chunks preserve context but dilute the embedding and reduce precision.