CertSafari

    Free Databricks Certified Generative AI Engineer Associate Sample Questions

    35 free sample questions from our bank of 349+, covering every exam domain, with answers and detailed explanations. Updated November 2026.

    Domain 1: Design Applications

    Subdomain 1.2: Select model tasks to accomplish a given business requirement

    1.A legal operations team wants to pull specific fields (contract start date, renewal term, counterparty name) out of thousands of scanned PDF contracts and load the results into a Delta table with a fixed schema. Which model task should the application be built around?

    1. A.Structured information extraction against a defined schema
    2. B.Open-ended text generation to draft a plain-language summary of each contract
    3. C.Multi-turn chat that lets a user ask follow-up questions about one contract at a time
    4. D.Multi-class classification that assigns each contract to a single category label
    Show answer & explanation

    Correct answer: A — Structured information extraction against a defined schema

    • A. Pulling named fields such as dates, terms, and party names into a fixed schema is exactly what structured information extraction (e.g. `ai_extract`) is designed for, and it maps directly onto a Delta table with fixed columns.
    • B. Generation would produce free-form prose summaries, which do not give the fixed, queryable columns (start date, term, counterparty) the team needs for the Delta table.
    • C. A chat interface answers ad hoc questions interactively but does not batch-produce structured field values across thousands of documents for a table load.
    • D. Classification assigns each document to one of a set of predefined labels, which does not recover the specific field values the team needs to populate table columns.

    Subdomain 1.5: Define and order tools that gather knowledge or take actions for multi-stage reasoning

    2.A generative AI engineer is building a tool-calling agent for a claims-processing use case. The agent has three tools: `lookup_claim_details`, `check_policy_coverage`, and `issue_payment`. Payments must never be issued for claims that fail coverage verification. How should the engineer define and order these tools for the agent's multi-stage reasoning loop?

    1. A.Constrain `issue_payment` so it only runs after `check_policy_coverage` approves the claim, and write tool descriptions that lead the agent to call lookup, then coverage check, then payment in that order.
    2. B.Let the agent call `issue_payment` first as the main objective, then invoke `lookup_claim_details` and `check_policy_coverage` afterward purely to produce an audit log of the completed transaction.
    3. C.Give all three tools identical generic descriptions so the LLM treats them as interchangeable, and let it invoke `issue_payment` and `check_policy_coverage` in parallel to cut latency.
    4. D.Drop `check_policy_coverage` from the tool set entirely and depend on a human reviewer to catch any improperly paid claims after the payment has already settled.
    Show answer & explanation

    Correct answer: A — Constrain `issue_payment` so it only runs after `check_policy_coverage` approves the claim, and write tool descriptions that lead the agent to call lookup, then coverage check, then payment in that order.

    • A. Constraining the payment tool to run only after coverage approval, and describing the tools so the agent naturally sequences lookup, then verification, then action, matches Databricks guidance that consequential actions in a multi-stage reasoning loop should be gated behind the verification step they depend on. This prevents the model from reaching an irreversible action tool before the required check has succeeded.
    • B. Calling the payment tool before verifying coverage defeats the purpose of the coverage check, since the payment would already be issued by the time the audit-log calls run. This ordering allows an unapproved claim to be paid, which is exactly the failure mode the design must prevent.
    • C. Identical generic tool descriptions remove the signal the agent needs to reason about which tool serves which purpose, and running the payment and coverage-check tools in parallel means the payment can complete before the coverage result is even known. This creates a race condition that can pay out non-covered claims.
    • D. Removing the coverage-check tool eliminates the automated gate entirely, so every claim would be paid regardless of eligibility, with correctness pushed onto a reviewer who only sees the claim after money has already moved. This does not satisfy the requirement that payments never occur for claims failing verification.

    Domain 2: Data Preparation

    Subdomain 2.1: Apply a chunking strategy for a given document structure and model constraints

    3.An engineer builds a RAG pipeline over long onboarding guides. During testing, they notice that a key instruction spanning the end of one chunk and the beginning of the next is never retrieved in full: the retriever returns one chunk or the other, but neither chunk alone contains the complete instruction. Which adjustment to the chunking configuration most directly addresses this failure?

    1. A.Configure adjacent chunks to overlap by a set number of tokens so boundary content appears in more than one chunk.
    2. B.Increase the total number of chunks retrieved at query time so the retriever returns more candidate chunks per query.
    3. C.Switch the embedding model to one trained specifically on the onboarding guide's domain vocabulary.
    4. D.Sort the chunks by document order before indexing so neighboring chunks sit next to each other in the vector index.
    Show answer & explanation

    Correct answer: A — Configure adjacent chunks to overlap by a set number of tokens so boundary content appears in more than one chunk.

    • A. Adding overlap between adjacent chunks means content near a boundary is duplicated into both chunks, so an instruction that straddles the boundary will appear in full inside at least one chunk and can be retrieved intact.
    • B. Returning more candidate chunks increases the chance both neighboring chunks are retrieved together, but neither chunk individually contains the complete instruction, so the response context is still fragmented across two partial chunks.
    • C. A domain-tuned embedding model can improve semantic matching for retrieval, but it does not change where chunk boundaries fall, so the instruction would still be split across two chunks.
    • D. Physical storage order in the vector index does not affect which chunks are returned for a similarity search, so this does not help the retriever surface the complete instruction.

    Subdomain 2.4: Define operations and sequence to write given chunked text into Delta Lake tables in Unity Catalog

    4.A team writes new batches of chunked text into their Unity Catalog Delta table once per night via a scheduled job, and they want the AI Search index to refresh once after each nightly batch completes rather than continuously watching the table for changes. Which index configuration achieves this?

    1. A.Create a Delta Sync Index with `pipeline_type="TRIGGERED"` and add a last task to the nightly job that starts an index sync after the write completes, with compute used only during that sync.
    2. B.Create a Delta Sync Index with `pipeline_type="CONTINUOUS"` and let its pipeline pick up each night's committed rows from the table, with sync compute kept running between the nightly batches.
    3. C.Create a Direct Vector Access Index and have the nightly job upsert the new chunks and their embeddings through the index API after the batch write, with no sync pipeline reading from the Delta table.
    4. D.Create a Delta Sync Index with `pipeline_type="TRIGGERED"` and let the index detect the nightly commit by itself, with the pipeline starting a sync whenever the source table version changes.
    Show answer & explanation

    Correct answer: A — Create a Delta Sync Index with `pipeline_type="TRIGGERED"` and add a last task to the nightly job that starts an index sync after the write completes, with compute used only during that sync.

    • A. A triggered Delta Sync Index only syncs when a sync is started. Adding a sync step at the end of the nightly job refreshes the index once after the batch lands, and no sync compute runs between batches.
    • B. A continuous pipeline stays running and applies changes from the source table as they are committed. That is the always-watching behaviour the team wants to avoid, and it keeps compute running through the idle hours between nightly batches.
    • C. A Direct Vector Access Index is not fed from the Delta table. The team would have to produce embeddings and write the upsert calls themselves, instead of letting the index refresh from the chunk table their job already populates.
    • D. A triggered pipeline does not watch the source table or start itself when a new version is committed. It runs only when a sync is started manually or by a job, so with no trigger step the index would not refresh after the nightly batch.

    Subdomain 2.5: Identify needed source documents that provide necessary knowledge and quality for a given RAG application

    5.A team is preparing a source corpus by scraping publicly available community forum posts to supplement an internal knowledge base for a RAG assistant. Some forum posts contain personal contact details and occasional offensive language. Before these documents are added as knowledge sources, what should the team do to protect application quality and safety?

    1. A.Scan the scraped posts with classifiers for personal data and toxic language, and drop flagged content before indexing
    2. B.Index the posts unchanged, and add an output guardrail that masks personal data and toxic language in model responses
    3. C.Split the posts into smaller chunks and cap retrieval at the top three results, so few forum passages reach the prompt
    4. D.Load the posts into a separate index, and rank that index below the internal knowledge base in retrieval results
    Show answer & explanation

    Correct answer: A — Scan the scraped posts with classifiers for personal data and toxic language, and drop flagged content before indexing

    • A. Running classifiers over the scraped posts during source preparation finds personal data and toxic language and removes it before indexing. The sensitive content never becomes a knowledge source, so it cannot be retrieved or repeated, which protects both quality and safety.
    • B. Masking model responses leaves the raw personal data and offensive text in the corpus, where the retriever can still pull it into the model's context. A response-level guardrail is a last line of defense that can miss instances. The risk starts in the source data, so the content has to be cleaned before ingestion.
    • C. Smaller chunks and a lower retrieval cap change retrieval granularity and volume, not what the corpus contains. The personal details and offensive language remain in the stored chunks and can still be retrieved and shown. Nothing is detected or removed before ingestion.
    • D. A separate index with lower ranking only changes how often the forum posts surface. The unfiltered content is still a knowledge source and can still be retrieved when it matches a query. The personal details and offensive language are never detected or removed.

    Subdomain 2.6: Use tools and metrics to evaluate retrieval performance

    6.A technical support search tool must return the single correct troubleshooting article at the very top of the results, since agents only read the first couple of results before acting. Which metric best evaluates this requirement?

    1. A.Precision@3 computed on the top three results, reporting the share of those articles that are relevant
    2. B.Recall@50 computed on the top fifty results, reporting the share of relevant articles that were retrieved
    3. C.Mean relevance score computed on the retrieved candidate set, reporting the average grade of those articles
    4. D.Relevance grade histogram computed on the top fifty results, reporting the count of articles per grade
    Show answer & explanation

    Correct answer: A — Precision@3 computed on the top three results, reporting the share of those articles that are relevant

    • A. Precision at a small cutoff measures how many of the few results an agent actually reads are relevant. That is the quality of the top of the list, which is what the requirement is about.
    • B. Recall at a cutoff of fifty measures how much of the relevant material shows up somewhere in a broad result window. A relevant article at position forty still counts, but agents only read the first couple of results, so it says nothing about the top.
    • C. A mean relevance score over the whole candidate set mixes the top positions with many lower-ranked results that agents never read. Strong results deep in the list can offset a wrong article in first place, so it does not show whether the top result is correct.
    • D. A grade histogram over fifty results shows how many articles fall into each relevance bucket but ignores their positions. It looks identical whether the best article is first or fiftieth, so it cannot confirm that the top results are right.

    Subdomain 2.7: Design retrieval systems using advanced chunking strategies

    7.During evaluation, a RAG engineer notices that answers referencing information near a chunk boundary are frequently incomplete, because the fact needed to answer the question is split across two adjacent chunks. Which change to the chunking configuration best addresses this specific problem?

    1. A.Raise the top-k retrieval setting, so more chunks per query are passed to the language model as context
    2. B.Set a chunk overlap of a few sentences, so the next chunk starts with the closing text of the previous one
    3. C.Replace the paragraph-based splitter with a fixed-character one, so chunks come out at a consistent length
    4. D.Lower the maximum chunk size, so each chunk holds a narrower slice of the source text than it does now
    Show answer & explanation

    Correct answer: B — Set a chunk overlap of a few sentences, so the next chunk starts with the closing text of the previous one

    • A. Top-k is a retrieval setting, not a chunking setting. A larger value may bring in the neighbouring chunk, but only if it ranks high enough. It adds noise and prompt cost, and the stored chunks still cut the fact in two.
    • B. Chunk overlap repeats the last sentences of one chunk at the start of the next. A fact that straddles the join then appears whole in at least one chunk, which directly fixes the incomplete answers at chunk edges.
    • C. A fixed-character splitter gives uniform lengths but adds no continuity between chunks. It cuts at arbitrary character counts, often mid-sentence, so facts are still divided between chunks, just at different points.
    • D. Smaller chunks mean more joins in the document. Each join is another place where a fact can be cut in two, so the problem becomes more likely rather than less.

    Subdomain 2.8: Explain the role of re-ranking in the information retrieval process

    8.During retrieval quality evaluation, an engineer runs the same set of test queries through the pipeline twice — once with the reranker disabled and once with it enabled — and compares DCG@10 scores for each query type. For one query type, enabling the reranker raises DCG@10 significantly with only a modest latency increase; for another query type, it makes almost no difference. What is the most appropriate way to use this evaluation result?

    1. A.Enable the reranker for the query types whose DCG@10 improved clearly, and serve the other types from first-stage ranking, leaving their latency unchanged
    2. B.Enable the reranker for the whole pipeline, and absorb the added latency on the query type that did not benefit to keep a single configuration
    3. C.Leave the reranker disabled for the whole pipeline, and treat the flat result on one query type as the representative outcome for this retrieval stack
    4. D.Set aside the DCG@10 comparison and judge each query type by candidate-set recall instead, enabling the reranker where that recall rises
    Show answer & explanation

    Correct answer: A — Enable the reranker for the query types whose DCG@10 improved clearly, and serve the other types from first-stage ranking, leaving their latency unchanged

    • A. The per-query-type DCG@10 comparison shows where reranking pays off. Using the reranker for the type with a large gain at modest latency, and skipping it for the type with almost no difference, keeps the quality improvement without paying for reranking where it adds nothing.
    • B. A uniform rollout makes the query type with almost no DCG@10 change pay the reranker's extra latency for no quality return. The per-type results already show where the reranker is worth its cost, so ignoring them trades measurable latency for nothing in that segment.
    • C. One flat query type does not describe the whole workload. Another type showed a significant DCG@10 gain at only a modest latency increase, and turning the reranker off for the whole pipeline would give up that measured improvement.
    • D. A reranker reorders a fixed candidate set, so recall of that set does not change and would never show its effect. The gain from reranking appears in rank-order-sensitive metrics such as DCG@10, which is why the evaluation used it; dropping DCG@10 would leave the reranker looking useless everywhere.

    Subdomain 2.2: Filter extraneous content in source documents that degrades quality of a RAG application

    9.A knowledge base built from scraped HTML product pages returns chunks full of navigation menu links, cookie-consent text, and sidebar ads whenever a RAG chatbot answers customer questions. Which data preparation approach best reduces this extraneous content before the pages are chunked for embedding?

    1. A.Run the scraped pages through an HTML content extractor that keeps the main article body and drops menu, banner, and sidebar elements, then chunk the cleaned text.
    2. B.Add a system-prompt instruction telling the chatbot to disregard menu, consent, and ad text in retrieved passages, then chunk the raw page text as scraped.
    3. C.Cut the scraped pages into small fixed-size chunks, then discard the chunks made up only of menu, consent, or ad text before embedding the remaining ones.
    4. D.Chunk and embed the raw page text as scraped, then apply a cross-encoder re-ranker to the retrieved chunks so menu and ad passages fall below the article text.
    Show answer & explanation

    Correct answer: A — Run the scraped pages through an HTML content extractor that keeps the main article body and drops menu, banner, and sidebar elements, then chunk the cleaned text.

    • A. Correct. An HTML content extractor keeps the main article body and drops menu, banner, and sidebar markup before any text is produced. The chunks and embeddings are then built only from article content, so the noise never reaches the vector index.
    • B. Incorrect. A system-prompt instruction acts only at answer time and leaves the raw page text untouched. Menu, consent, and ad text is still chunked and embedded, still competes for retrieval slots and context space, and can still pull irrelevant passages into results.
    • C. Incorrect. Fixed-size splitting ignores the HTML structure, so menu, consent, and ad text often lands in the same chunk as article text. Discarding only chunks made up purely of boilerplate leaves those mixed chunks in the index, still carrying the noise.
    • D. Incorrect. A cross-encoder re-ranker only reorders chunks that were already retrieved. The menu and ad chunks stay in the index with their embeddings, so they can still surface for some queries. This works after retrieval, not by cleaning the pages during data preparation.

    Domain 3: Application Development

    Subdomain 3.1: Select Langchain/similar tools for use in a Generative AI application.

    10.Which Python package provides purpose-built LangChain tool wrappers for Unity Catalog functions, letting a governed UC function be surfaced directly as a LangChain-compatible tool for an agent?

    1. A.databricks-langchain
    2. B.databricks-connect
    3. C.databricks-sdk
    4. D.databricks-feature-engineering
    Show answer & explanation

    Correct answer: A — databricks-langchain

    • A. This package provides the LangChain integrations, including a toolkit that wraps Unity Catalog functions so they can be passed directly into a LangChain agent's tool list.
    • B. This package is a client for running Spark workloads against a remote Databricks cluster from a local environment; it has nothing to do with wrapping UC functions as LangChain tools.
    • C. This package is a general-purpose REST API client for managing Databricks workspace resources such as clusters and jobs, not a LangChain tool integration library.
    • D. This package is used for managing feature tables and feature lookups in the Feature Store, which is unrelated to exposing UC functions as LangChain tools.

    Subdomain 3.2: Qualitatively assess responses to identify common issues such as quality and safety

    11.Which built-in MLflow GenAI judge requires a labeled ground-truth expected response in order to compute its score?

    1. A.Correctness, which scores factual accuracy by comparing the response with a reference answer in the dataset
    2. B.Safety, which scores harmful or toxic content by checking the response text for unsafe material
    3. C.RelevanceToQuery, which scores whether the response addresses the user's intent by reading the query and response
    4. D.RetrievalGroundedness, which scores support for the response's claims by checking the retrieved documents
    Show answer & explanation

    Correct answer: A — Correctness, which scores factual accuracy by comparing the response with a reference answer in the dataset

    • A. Correctness needs a labeled reference answer (expected response or expected facts) supplied with each dataset row. It scores factual accuracy by comparing the generated response with that label, and it cannot be computed without one.
    • B. Safety assesses whether the response contains harmful, offensive or toxic material from the response text alone. It does not need a labeled expected response, so it fails the requirement.
    • C. RelevanceToQuery judges whether the response addresses the user's intent using only the query and the response. No labeled ground truth is involved, so it is not the judge that needs one.
    • D. RetrievalGroundedness checks whether the response's claims are supported by the retrieved documents captured in the trace. Its reference is the retrieved context, not a labeled expected answer, so no ground-truth label is required.

    Subdomain 3.7: Select the best LLM based on the attributes of the application to be developed

    12.A legal team wants to summarize full contracts, some running 50 to 100 pages, in a single prompt without splitting the document into chunks. Which model attribute should be prioritized when selecting an LLM for this application?

    1. A.A model with a long context window, measured in input tokens, that can take a complete contract plus instructions in one request
    2. B.A model with a high maximum output length, measured in generated tokens, that can write long, section-by-section contract summaries
    3. C.A model with low inference latency, measured in tokens per second, that can return summaries quickly even for long contract files
    4. D.A model with strong retrieval support, measured by recall on indexed passages, that can pull the relevant clauses from a stored contract
    Show answer & explanation

    Correct answer: A — A model with a long context window, measured in input tokens, that can take a complete contract plus instructions in one request

    • A. Correct. Context window size sets how much text a model can read in one request. A 50 to 100 page contract is tens of thousands of tokens, so the model needs a window big enough for the whole document and the instructions together. That is what lets the team summarize without splitting the document.
    • B. Output length caps how much text the model can generate, not how much it can read. The bottleneck here is fitting a 50 to 100 page contract into one prompt, and a larger output limit does nothing for that. A model with a small input window would still be unable to take the full document.
    • C. Speed affects how quickly a response comes back, not whether the document fits. A fast model with a small context window still cannot accept a 100 page contract in one prompt. Latency is a secondary concern once the input capacity requirement is met.
    • D. Retrieval depends on indexing the contract and fetching only selected passages. That is a form of splitting the document into chunks, which the team wants to avoid. It also gives the model only the retrieved clauses rather than the whole contract, which risks leaving out parts that belong in the summary.

    Subdomain 3.9: Select a model from a model hub or marketplace for a task based on model metadata/model cards

    13.A team is choosing between two candidate LLMs listed on Databricks Marketplace for a latency-sensitive, high-volume customer support chatbot. Model X has a higher MMLU benchmark score but a much larger parameter count and higher measured serving latency; Model Y has a slightly lower benchmark score, a smaller parameter count, and meets the application's response-time requirement. Based on the model cards, which model should the team select?

    1. A.Model X, because its higher MMLU score signals better answers and extra serving replicas can offset its latency
    2. B.Model Y, because its serving latency meets the chatbot's target and its benchmark score trails Model X's by a small margin
    3. C.Model X, because its larger parameter count gives better support answers, outweighing its higher latency
    4. D.Model Y, because further fine-tuning would raise its parameter count to match Model X's and close the benchmark gap
    Show answer & explanation

    Correct answer: B — Model Y, because its serving latency meets the chatbot's target and its benchmark score trails Model X's by a small margin

    • A. Adding serving replicas raises throughput, but each request still takes as long as the larger model needs. Model X's measured latency already misses the chatbot's response-time requirement, so extra capacity does not fix it. It also adds cost for a high-volume workload, when a smaller model already meets the requirement.
    • B. Model Y meets the chatbot's response-time requirement, and its benchmark score is only slightly below Model X's. Model selection should weigh application constraints such as latency and volume alongside evaluation metrics. It should not maximize one metric, so Model Y is the better fit for this latency-sensitive, high-volume chatbot.
    • C. Parameter count is not a measure of answer quality for a given task. The benchmark scores already capture measured quality, and Model Y's is only slightly lower. Model X's higher serving latency breaks the chatbot's response-time requirement, and better accuracy does not make up for that.
    • D. Fine-tuning adjusts a model's weights but does not add parameters, because parameter count is fixed by the architecture. Even if Model Y could be enlarged to Model X's size, it would bring back the high serving latency that rules Model X out. Model Y's score is already close and its latency already fits, so no such step is needed.

    Subdomain 3.10: Select the best model for a given task based on common metrics generated in experiments

    14.While selecting a foundation model for a support-ticket classification task, an engineer notices that Model X has higher published scores on general-purpose leaderboards than Model Y. However, an MLflow evaluation run on the company's own labeled ticket dataset shows Model Y outperforming Model X for this specific task. Which model should be selected, and why?

    1. A.Select Model X, because its leaderboard scores come from many public datasets and tasks, a broader sample than one internal run on a single ticket set
    2. B.Select Model Y, because a test on the tickets it will actually classify predicts production results better than scores earned on broad public benchmarks
    3. C.Select Model X, because the metrics in its model card come from standardized, documented conditions that one MLflow run on a single dataset does not reproduce
    4. D.Select the smaller of the two models, because lower parameter counts reduce overfitting to broad benchmark data and the internal run covers only one dataset
    Show answer & explanation

    Correct answer: B — Select Model Y, because a test on the tickets it will actually classify predicts production results better than scores earned on broad public benchmarks

    • A. Breadth across many public tasks does not make a score relevant to support-ticket classification. Model Y was measured on labeled tickets like those it will see in production, and it won there, so Model X's wider but less relevant sample should not decide the choice.
    • B. Correct. An evaluation on labeled tickets drawn from the real workload predicts production behavior for this task better than scores from broad public benchmarks. Model Y beat Model X on that evaluation, so Model Y is the better choice.
    • C. Model card metrics describe performance under the publisher's own test conditions, which are not the company's ticket data. The MLflow run used the company's own labeled tickets and favored Model Y, so standardized conditions elsewhere do not outweigh it.
    • D. Parameter count is not a reliable predictor of task performance, and nothing in the scenario says the models differ in size or that either one overfits. Measured results on the company's own tickets are available and show Model Y ahead, so size is the wrong basis for choosing.

    Subdomain 3.11: Utilize MLflow and Agent Framework for developing agentic systems

    15.A developer is prototyping a retrieval tool locally in a notebook before deploying an agent that queries a Databricks-managed vector search index built with Databricks-managed embeddings. They want a LangChain-compatible tool object they can pass directly to their agent with minimal setup. Which option fits this stage of development?

    1. A.Install `databricks-langchain` and create a `VectorSearchRetrieverTool` with `index_name` and `tool_description`, then add it to the agent's tools.
    2. B.Install `databricks-langchain` and create a `DatabricksEmbeddings` object with the `endpoint` parameter, then add it to the agent's tools.
    3. C.Install `databricks-mcp` and connect a `DatabricksMCPClient` to the managed vector search server, then add its tools to the agent's tools.
    4. D.Install `databricks-sdk` and create a Unity Catalog connection to the index, then add a retriever function over it to the agent's tools.
    Show answer & explanation

    Correct answer: A — Install `databricks-langchain` and create a `VectorSearchRetrieverTool` with `index_name` and `tool_description`, then add it to the agent's tools.

    • A. The `databricks-langchain` package provides `VectorSearchRetrieverTool`, which wraps a Databricks vector search index as a LangChain tool. Giving it the index name and a description is enough for a notebook prototype.
    • B. `DatabricksEmbeddings` only turns text into vectors through an embedding endpoint. It does not query the vector search index or return documents, so it is not a retriever tool. The agent would get no retrieval capability from it.
    • C. The MCP route gives governed access to the index, but it needs a server connection and returns MCP tool definitions. These are not a ready-made LangChain tool object. That is more setup than a quick local prototype needs.
    • D. Unity Catalog connections are meant for reaching external services and externally hosted vector stores. An index that Databricks already hosts and embeds does not need one. Writing a custom retriever function also falls well short of a ready-made tool with minimal setup.

    Subdomain 3.13: Enable multi-agent systems to leverage Genie Spaces or conversational API to retrieve data

    16.An agent has already sent a message to a Genie space and received a `message_id`. It now needs to obtain the tabular result of the query Genie generated so it can pass the rows back to the orchestrating agent. What is the correct sequence to follow?

    1. A.Poll `GET .../messages/{message_id}` until it reaches a final status such as COMPLETED, then call `GET .../messages/{message_id}/query-result/{attachment_id}` for the rows.
    2. B.Call `GET .../messages/{message_id}/query-result/{attachment_id}` right after the message is created, then read the rows from that first response.
    3. C.Call `GET .../conversations/{conversation_id}/messages` to list the conversation, then read the rows from the content of the latest message in that list.
    4. D.Re-send the question with `POST .../start-conversation` and check the responses, then take the rows from the first one with a populated result set.
    Show answer & explanation

    Correct answer: A — Poll `GET .../messages/{message_id}` until it reaches a final status such as COMPLETED, then call `GET .../messages/{message_id}/query-result/{attachment_id}` for the rows.

    • A. Genie processes a message asynchronously. The agent has to poll the message until it reaches a final status. Only then does the message carry the query attachment whose ID the query-result endpoint needs to return the rows.
    • B. This is incorrect because a message that has just been created is still being processed. Genie has not yet generated or run the SQL, and the attachment ID is not available until processing finishes. A single immediate call cannot be relied on to return the rows.
    • C. This is incorrect because listing a conversation's messages returns message metadata, such as text and attachment references, and not tabular data. The rows come only from the query-result endpoint, and the latest message may still be processing.
    • D. This is incorrect because each call to start-conversation opens a new conversation and submits a new message. It does not check on the message already sent, and its response describes the new message rather than returning the existing query's rows.

    Subdomain 3.10: Select the best model for a given task based on common metrics generated in experiments

    17.A team is deploying a customer-facing chat agent and has three candidate LLMs, each logged as an MLflow run with a quality judge score, average token latency, and per-1M-token cost recorded as run metrics. The product requirement is sub-second responses at the lowest cost while still clearing a minimum quality bar. Which approach best uses the logged experiment metrics to select the deployment model?

    1. A.Rank the runs by their logged latency and cost combined, then pick the best-ranked run whose logged quality judge score clears the required threshold.
    2. B.Rank the runs by their logged quality judge score, then pick the top-scoring run whose logged latency is under one second, with cost as a tiebreaker.
    3. C.Rank the runs by their logged per-1M-token cost, then pick the cheapest run and confirm its quality and latency after launch using production inference tables.
    4. D.Rank the runs by their logged average token latency, then pick the fastest run and revisit its cost after launch with provisioned throughput.
    Show answer & explanation

    Correct answer: A — Rank the runs by their logged latency and cost combined, then pick the best-ranked run whose logged quality judge score clears the required threshold.

    • A. The quality threshold works as a pass/fail gate, and latency and cost decide among the runs that pass. This uses all three logged metrics and gives the cheapest fast model that is still good enough.
    • B. The target is the lowest cost among models that clear a minimum quality bar, not the highest quality. Taking the top scorer and using cost only to break ties can pick a pricier model when a cheaper candidate also passes the bar.
    • C. The experiment already logged quality and latency for every candidate. Choosing the cheapest run and checking those properties only after launch can put a model in front of customers that fails the quality bar or the sub-second target.
    • D. The fastest run is not guaranteed to clear the minimum quality score or to be the cheapest option. Deferring cost to a post-launch step leaves the cost goal unmet, and the logged quality metric is never used.

    Subdomain 3.5: Create a prompt that adjusts an LLM's response from a baseline to a desired output

    18.A developer needs an LLM step in a pipeline to return machine-readable output so a downstream Python function can parse it without errors. With a plain instruction such as `Extract the product name and price from this review`, the model sometimes returns a sentence like 'The product is a blender priced at $39.99' instead of structured data. Which prompt design change best guarantees the desired structured output?

    1. A.Tell the model to return only a JSON object with the keys `product_name` (string) and `price` (number), such as `{"product_name": "blender", "price": 39.99}`, and add one sample review paired with its expected output in that same format.
    2. B.Tell the model to return only a Markdown table row with the columns `product` and `price`, such as `| blender | 39.99 |`, and add one sample review paired with its expected output in that same format.
    3. C.Tell the model to return only a comma-separated line with the product name first and the price second, such as `blender,39.99`, and add one sample review paired with its expected output in that same format.
    4. D.Tell the model to return only the product name and the price, each wrapped in double underscores, such as `__blender__` and `__39.99__`, and add one sample review paired with its expected output in that same format.
    Show answer & explanation

    Correct answer: A — Tell the model to return only a JSON object with the keys `product_name` (string) and `price` (number), such as `{"product_name": "blender", "price": 39.99}`, and add one sample review paired with its expected output in that same format.

    • A. Correct. Requiring a JSON object with named, typed keys gives the model a precise target and gives the Python function a format that a standard JSON parser reads directly. The sample review with its expected output shows the exact shape, which discourages replies like 'The product is a blender priced at $39.99'.
    • B. Incorrect. A Markdown table row is a presentation format, not a defined data-exchange format. The model may add a header row, a separator line such as `|---|---|`, or a lead-in sentence. A product name containing a pipe character would also shift the columns. Any of these breaks a parser that must work without errors.
    • C. Incorrect. A bare comma-separated line has no field names and no escaping. A product name that contains a comma, such as 'Blender, 600W', splits into extra fields and gives the parser the wrong price. The format has no schema to check the output against, so malformed replies go unnoticed until parsing fails.
    • D. Incorrect. Underscore markers only label where a value starts and ends. They do not define a structure, and the model can still wrap the markers in extra prose or reorder them. The parser has to guess which marked value is the name and which is the price. A product name that itself contains underscores would also confuse the scan.

    Subdomain 3.4: Augment a prompt with additional context from a user's input based on key fields, terms, and intents

    19.A retail chatbot receives: "Can you check if the blue XL hoodie is in stock at my usual store?" The application already has the user's stored preferences, including their default store ID and past purchase history. Which strategy best augments the prompt sent to the LLM so it can answer accurately?

    1. A.Resolve "usual store" to the default store ID held in the user's stored preferences, then add that store ID and the current inventory data for the matching blue XL hoodie SKU at that store to the prompt context sent to the model.
    2. B.Look up the nearest store from the user's IP geolocation and treat it as their usual store, then add that store ID and the current inventory data for the matching blue XL hoodie SKU at that store to the prompt context sent to the model.
    3. C.Add the user's purchase history to the prompt and have the model pick the store they bought from most often as the usual store, then add current inventory data for the matching blue XL hoodie SKU at the store it picked to the prompt context.
    4. D.Run a vector search on the phrase "blue XL hoodie" against the product catalog, then add the top SKU matches and their current inventory data from the retailer's store network to the prompt context and let the model pick the relevant store.
    Show answer & explanation

    Correct answer: A — Resolve "usual store" to the default store ID held in the user's stored preferences, then add that store ID and the current inventory data for the matching blue XL hoodie SKU at that store to the prompt context sent to the model.

    • A. Correct. The application already holds the user's default store ID, so "usual store" can be resolved deterministically from the stored preferences. Adding that store ID together with current inventory for the matching SKU at that store gives the model the specific, user-relevant facts it needs to answer accurately.
    • B. Incorrect. The nearest store by IP geolocation is only an approximation of where the user is right now, and it can differ from the store the user means by "usual store". The stored default store ID is the exact reference, so the inventory data would be for the wrong location and the answer could be wrong.
    • C. Incorrect. Purchase frequency is only a proxy for the usual store, and it can differ from the default store ID the user saved. Leaving the model to infer the store also means the inventory lookup depends on a model-generated choice and an extra step, when the application already holds the exact store ID.
    • D. Incorrect. A semantic product search can find the right hoodie SKU, but it never resolves "usual store". The model receives inventory spread across the store network without being told which location the user means, and it cannot work that out, even though the application has the default store ID.

    Domain 4: Assembling and Deploying Applications

    Subdomain 4.2: Control access to resources from model serving endpoints

    20.A team is deploying an agent whose Unity Catalog table queries must respect each individual end user's own row- and column-level permissions rather than a single shared identity's permissions. Which configuration achieves this on a Model Serving endpoint?

    1. A.Enable on-behalf-of-user authentication, build the client with `ModelServingUserCredentials` inside `predict`, and declare `api_scopes` in an `AuthPolicy` at logging time.
    2. B.Declare the tables as resource dependencies with mlflow.models.resources so the system-generated service principal gets read-only access shared by every caller.
    3. C.Store one service principal's personal access token as a Databricks secret and reference it via `{{secrets/scope/key}}` so all requests authenticate identically.
    4. D.Grant the workspace's default Unity Catalog metastore admin role to the endpoint so it bypasses table-level access checks for every incoming request.
    Show answer & explanation

    Correct answer: A — Enable on-behalf-of-user authentication, build the client with `ModelServingUserCredentials` inside `predict`, and declare `api_scopes` in an `AuthPolicy` at logging time.

    • A. On-behalf-of-user authentication is the feature designed for this scenario: initializing `ModelServingUserCredentials` inside the prediction function (since user identity is only known at request time) and declaring the needed API scopes lets each request enforce that specific user's own Unity Catalog permissions.
    • B. Automatic authentication passthrough with a declared resource grants the same service-principal-level access to every caller of the endpoint, so it cannot differentiate row- or column-level permissions between individual end users.
    • C. Referencing a single service principal's token means every request authenticates as that one identity, which enforces uniform access rather than each end user's individual row- and column-level entitlements.
    • D. Granting a broad metastore admin role bypasses access checks entirely rather than applying each user's own permissions, which is the opposite of enforcing per-user row- and column-level governance.

    Subdomain 4.8: Explain the key concepts and components of Mosaic AI Vector Search

    21.When evaluating AI Search retrieval quality, which metric does Databricks recommend as the primary metric because it weighs highly relevant results more heavily and accounts for their rank position in the result list?

    1. A.Recall@10
    2. B.Precision@10
    3. C.DCG@10
    4. D.MRR
    Show answer & explanation

    Correct answer: C — DCG@10

    • A. Recall@10 measures the fraction of all relevant documents that were retrieved in the top 10 results, but it does not weight results by degree of relevance or by their position within that top 10. It is not the metric Databricks highlights as primary for this reason.
    • B. Precision@10 measures the fraction of the top 10 retrieved results that are relevant, treating all relevance levels and positions within the top 10 equally. It does not capture the graded, position-weighted signal that the recommended metric provides.
    • C. Discounted Cumulative Gain at 10 sums graded relevance scores while discounting results that appear lower in the ranking, so highly relevant documents near the top contribute more than marginally relevant ones further down. This combination of graded relevance and rank-position weighting is why Databricks recommends it as the primary retrieval quality metric.
    • D. Mean Reciprocal Rank only considers the position of the first relevant result and ignores the graded relevance or ranking of any other results in the list. It does not account for multiple relevant documents at varying relevance levels the way the recommended metric does.

    Subdomain 4.3: Code a simple chain according to requirements

    22.A generative AI engineer is assembling a simple chain in LangChain on Databricks that takes a user question, applies a `ChatPromptTemplate`, sends it to a `ChatDatabricks` LLM, and parses the output with a `StrOutputParser`. Which code correctly composes these three components into a single runnable chain using LangChain Expression Language?

    1. A.Build the chain with `prompt | llm | output_parser`, which pipes each step's output into the next as one Runnable.
    2. B.Build the chain with `LLMChain(prompt=prompt, llm=llm, output_parser=output_parser)`, which runs the three steps in order as one chain.
    3. C.Build the chain with `SequentialChain(chains=[prompt, llm, output_parser])`, which passes each step's output to the next step.
    4. D.Build the chain with `RunnableParallel(prompt=prompt, llm=llm, parser=output_parser)`, which wraps the three steps in one Runnable.
    Show answer & explanation

    Correct answer: A — Build the chain with `prompt | llm | output_parser`, which pipes each step's output into the next as one Runnable.

    • A. Correct: the pipe operator is the standard LangChain Expression Language syntax. It builds a RunnableSequence in which the formatted prompt goes to the chat model and the model's message goes to the string parser.
    • B. Incorrect: `LLMChain` is a legacy Chain class, not an LCEL composition. It is deprecated in favour of piping Runnables, so it does not meet the requirement to compose the components with LangChain Expression Language.
    • C. Incorrect: `SequentialChain` links legacy Chain objects through named input and output keys. A prompt template, a chat model and an output parser are Runnables, not Chains, so they cannot be listed in its `chains` parameter.
    • D. Incorrect: `RunnableParallel` is a real LCEL class, but it feeds the same input to every entry at once and returns a dict. The model would not receive the formatted prompt and the parser would not receive the model's output, so no sequential chain is built.

    Subdomain 4.6: Create and query a Vector Search index

    23.An agent's retrieval tool queries a vector search index and needs to combine semantic similarity with exact keyword matching to improve recall for exact product names, while also restricting results to documents where `category` equals `electronics`. Which combination of query call parameters achieves this?

    1. A.Set `query_type="HYBRID"` and pass `filters={"category": "electronics"}` in the retrieval tool's `similarity_search` call.
    2. B.Set `query_type="ANN"` and pass `filters={"category": "electronics"}` in the retrieval tool's `similarity_search` call.
    3. C.Set `query_type="HYBRID"` and pass `columns=["id", "category"]` in the retrieval tool's `similarity_search` call.
    4. D.Set `query_type="FULL_TEXT"` and pass `filters={"category": "electronics"}` in the retrieval tool's `similarity_search` call.
    Show answer & explanation

    Correct answer: A — Set `query_type="HYBRID"` and pass `filters={"category": "electronics"}` in the retrieval tool's `similarity_search` call.

    • A. The HYBRID query type runs vector similarity and keyword matching together, which improves recall for exact product names. The `filters` argument limits results to documents whose `category` is `electronics`. Together they cover both requirements.
    • B. The ANN query type is pure approximate nearest-neighbor vector search, with no keyword scoring. The `category` filter would apply, but exact product names would not get the recall boost the scenario requires.
    • C. HYBRID gives the semantic-plus-keyword retrieval that is needed. However, `columns` only selects which fields come back in each result. It does not limit which documents are searched, so results from other categories would still be returned.
    • D. The FULL_TEXT query type does keyword matching only, with no vector similarity component. The `category` filter would work, but the query would not combine semantic similarity with keyword matching as the scenario requires.

    Subdomain 4.9: Identify batch inference workloads and apply ai_query() appropriately

    24.A batch summarization job calls `ai_query()` against a foundation model endpoint for every article in a table, but the generated summaries are consistently too long and vary unpredictably in style between runs. The team wants shorter, more consistent output without changing the prompt text. Which addition to the `ai_query()` call addresses this?

    1. A.Pass `modelParameters => named_struct('max_tokens', 100, 'temperature', 0.2)` to limit tokens generated and lower sampling randomness.
    2. B.Pass `returnType => 'STRING'` to declare the response type of the endpoint call and keep the model's output text within a fixed size.
    3. C.Pass `responseFormat => '{"type": "json_object"}'` to constrain the model's reply to a defined structure and make its output uniform.
    4. D.Pass `failOnError => false` to return errors as a struct field and make each call's generated output length steadier across runs.
    Show answer & explanation

    Correct answer: A — Pass `modelParameters => named_struct('max_tokens', 100, 'temperature', 0.2)` to limit tokens generated and lower sampling randomness.

    • A. `modelParameters` forwards generation settings such as `max_tokens` and `temperature` to the foundation model endpoint. A token cap bounds how long each summary can get, and a low temperature reduces run-to-run variation. The prompt text stays untouched.
    • B. `returnType` only declares the expected type of the endpoint's response so it can be parsed, and it is mainly relevant to custom endpoints. It does not truncate or cap generated text, so the summaries stay just as long and just as varied.
    • C. `responseFormat` makes the model return output in a structured form such as a JSON object or schema. It shapes the container of the answer, not how many tokens are generated, so summaries stay long. Wording and style still vary between runs.
    • D. `failOnError` only controls whether a failed row aborts the query or comes back as a struct with an error status. It has no effect on the content, length or consistency of successful responses, so the summaries stay long and uneven.

    Subdomain 4.11: Configure a persistent datastore to store and retrieve intermediate memory or structured information.

    25.What is Databricks Lakebase, as used for self-managed agent memory?

    1. A.A fully managed Unity Catalog securable that stores agent memory entries under a scope and path.
    2. B.A fully managed vector index service that stores embeddings for semantic retrieval of agent memory.
    3. C.A fully managed SQL warehouse that runs analytical queries over Delta tables of agent state.
    4. D.A fully managed serverless Postgres OLTP database that stores agent memory as durable state.
    Show answer & explanation

    Correct answer: D — A fully managed serverless Postgres OLTP database that stores agent memory as durable state.

    • A. Memory entries kept in a Unity Catalog securable under a scope and path describe Databricks-managed agent memory, which is a different approach. In self-managed agent memory, Lakebase is a Postgres database that the agent itself writes to and manages. It is not a Unity Catalog securable object.
    • B. Storing embeddings and retrieving them by semantic similarity is what a vector search index does. Lakebase is a relational Postgres database that stores rows, such as checkpoints and conversation history. It is not an embedding index.
    • C. A SQL warehouse runs analytical queries over Delta tables, which is a different workload from agent memory. Lakebase is an operational Postgres database built for low-latency transactional reads and writes. It is not a warehouse for analytics over Delta data.
    • D. Lakebase is Databricks' fully managed, serverless Postgres OLTP database. In self-managed agent memory the agent uses it as a durable store for short-term and long-term state, such as checkpoints and conversation history.

    Subdomain 4.13: Integrate managed, external, and custom MCP servers based on a given application requirements

    26.A team is building an agent that must run governed Unity Catalog SQL functions as predefined tools, without standing up any new infrastructure. The workspace already has the functions registered in a catalog and schema, and the team wants Unity Catalog permissions to govern which users can invoke each function. Which approach best satisfies this requirement?

    1. A.Point the agent at the managed MCP endpoint `/api/2.0/mcp/functions/{catalog}/{schema}`, with EXECUTE grants on each function deciding which users can call it.
    2. B.Deploy a custom MCP server as a Databricks App that wraps each function in an `@mcp.tool()` decorator, with EXECUTE grants on each function deciding which users can call it.
    3. C.Register the schema as an external MCP server through a Unity Catalog connection with managed OAuth, with USE CONNECTION grants deciding which users can call the functions.
    4. D.Have the agent run each function through the SQL Statement Execution API on a SQL warehouse, authenticating as one shared service principal that holds EXECUTE on them.
    Show answer & explanation

    Correct answer: A — Point the agent at the managed MCP endpoint `/api/2.0/mcp/functions/{catalog}/{schema}`, with EXECUTE grants on each function deciding which users can call it.

    • A. Databricks hosts a managed Unity Catalog Functions MCP server at this workspace path. It exposes the functions in a catalog and schema as ready-made tools, so nothing new has to be deployed. Unity Catalog checks EXECUTE on each function for the calling user, so access is governed per function.
    • B. A custom MCP server in a Databricks App could expose the functions as tools, and EXECUTE grants could still apply. But it means building, deploying and running a new app and its wrapper code. The team ruled out new infrastructure, and the managed Unity Catalog Functions server already serves these functions without it.
    • C. Unity Catalog connections to external MCP servers are meant for servers hosted outside Databricks. Functions already registered in a schema in this workspace are served by the managed server, not through a third-party connection. USE CONNECTION is also granted on the connection as a whole, so it cannot decide which users may invoke each individual function.
    • D. Running the functions through the SQL Statement Execution API with one shared service principal means Unity Catalog only ever sees that principal. Every user of the agent gets the same function access, so EXECUTE grants cannot decide which users call each function. The team would also have to hand-build the tool layer that the managed server already provides.

    Subdomain 4.4: Choose the basic elements needed to create a RAG application: model flavor, embedding model, retriever, dependencies, input examples, model signature

    27.A team logs a RAG agent that expects OpenAI-style chat messages as input (a `messages` list with `role`/`content` fields) and needs the resulting endpoint to work correctly with the AI Playground and the review app. They do not want to hand-write the MLflow model signature. What should they do at logging time?

    1. A.Pass a sample chat request with one user turn as the `input_example` argument of `log_model`, so MLflow runs the chain on it and infers the input and output schema from the result.
    2. B.Register the model in Unity Catalog without an `input_example`, so the registry attaches a default chat schema to the new version and the endpoint exposes it to the Playground.
    3. C.Pass an `input_example` holding a single plain-text `question` string to `log_model`, so MLflow runs the chain on that example and infers the input and output schema from the result.
    4. D.Run the chain once with MLflow tracing enabled before logging, so the recorded trace of that call supplies the input and output schema and `log_model` stores it as the signature.
    Show answer & explanation

    Correct answer: A — Pass a sample chat request with one user turn as the `input_example` argument of `log_model`, so MLflow runs the chain on it and infers the input and output schema from the result.

    • A. Correct. When `log_model` receives an input example in the OpenAI chat format, MLflow runs the chain on it and infers a signature from the observed input and output. That gives the logged model a chat-compatible signature, so AI Playground and the review app can use the endpoint, and nobody has to write the signature by hand.
    • B. Incorrect. Unity Catalog does not generate a chat signature for registered models. It requires a signature on every new model version, so registering with no input example and no signature fails, or leaves the version without a schema. AI Playground and the review app need the signature to come from an input example or an explicit definition at logging time.
    • C. Incorrect. An input example is the right mechanism, but a plain-text `question` string produces a signature with a single string input. The agent expects a `messages` list with `role` and `content` fields, and AI Playground and the review app send requests in that format. The inferred schema would not match them, so the endpoint would not work correctly with either tool.
    • D. Incorrect. A trace is observability data stored in the MLflow experiment, and `log_model` does not read it. The trace is never converted into the logged model's signature. The signature still has to come from an input example or an explicit definition passed at logging time, so the endpoint would have no `messages` schema.

    Domain 5: Governance

    Subdomain 5.2: Select guardrail techniques to protect against malicious user inputs to a Gen AI application

    28.When a built-in Unity AI Gateway guardrail detects a policy violation, which two actions can it be configured to take on the flagged content?

    1. A.Block the request or response with an error, or sanitize the flagged content by rewriting it in place.
    2. B.Retry the request with a truncated context window, or send the flagged content to a human reviewer queue.
    3. C.Forward the violation record to an external SIEM tool, or switch the endpoint to a smaller serving model.
    4. D.Store the flagged content for later audit, or throttle the requesting user's rate limit for the session.
    Show answer & explanation

    Correct answer: A — Block the request or response with an error, or sanitize the flagged content by rewriting it in place.

    • A. Built-in guardrails offer two enforcement actions. Blocking rejects the request or response with an error. Sanitizing rewrites the flagged text in place, and the request continues with the cleaned content.
    • B. A guardrail does not retry the call with a shorter context, and it does not hand flagged content to a human review queue. It enforces policy itself by blocking the content or sanitizing it, and it does not route to manual review.
    • C. Sending violation records to an external SIEM tool and moving an endpoint to a smaller model are not guardrail actions on flagged content. A guardrail changes the content itself by blocking or sanitizing it, and it does not change the serving infrastructure.
    • D. Storing flagged content for audit and throttling a user's rate limit are separate concerns from a guardrail's response to a violation. A guardrail's response is to block the content or sanitize it, and it does not apply session-level rate control.

    Subdomain 5.1: Use masking techniques as guard rails to meet a performance objective

    29.A RAG application's retrieval layer queries a claims table where analysts in the `us-team` group should see only rows for the `US` region, while the claim amount values themselves must remain fully visible to every analyst. Which governance control satisfies this requirement?

    1. A.Set a row filter on the claims table that returns only rows where `region` is `US` to `us-team` members, leaving `claim_amount` values as stored.
    2. B.Set a column mask on `region` that returns NULL for rows outside `US` when `us-team` members read the table, leaving `claim_amount` values as stored.
    3. C.Set a column mask on `claim_amount` that returns NULL for rows outside `US` when `us-team` members read the table, leaving `region` values as stored.
    4. D.Set a row filter on the claims table that returns only rows with a `claim_amount` below a limit to `us-team` members, leaving `region` values as stored.
    Show answer & explanation

    Correct answer: A — Set a row filter on the claims table that returns only rows where `region` is `US` to `us-team` members, leaving `claim_amount` values as stored.

    • A. A row filter evaluates a condition per row and returns only the matching rows. Filtering on region = `US` for `us-team` members limits which claims they can see, and the amount column is not altered in the rows that remain.
    • B. A column mask changes the value shown in one column and never removes rows. Masking `region` hides the region label, but the non-US claims, with their amounts, are still returned to `us-team` members, so the row restriction is not met.
    • C. Masking `claim_amount` returns NULL in place of real amounts, which breaks the requirement that amounts stay fully visible to analysts. A mask also leaves every row in the result, so non-US claims are still returned.
    • D. This row filter is keyed to claim size, not region. Non-US claims below the limit would still be returned, and US claims above it would be hidden, so it does not restrict `us-team` members to US rows.

    Subdomain 5.4: Recommend an alternative for problematic text mitigation in a data source feeding a GenAI application

    30.A product team is building a RAG assistant using articles scraped from third-party blogs with unclear reuse terms. Legal flags that the scraped corpus creates copyright and licensing risk for the company. What should the team recommend to mitigate this risk in the data source?

    1. A.Rebuild the index from first-party content and datasets whose licenses permit this use in a RAG assistant
    2. B.Show the author and a source link beside each passage the assistant quotes from the scraped articles
    3. C.Split the scraped articles into smaller chunks before embedding, so answers quote only short excerpts
    4. D.Add a system-prompt statement that responses draw on the scraped articles under a fair-use rationale
    Show answer & explanation

    Correct answer: A — Rebuild the index from first-party content and datasets whose licenses permit this use in a RAG assistant

    • A. Building the index from content the company owns or from datasets whose licenses cover this use removes the problem where it starts. The unclear reuse terms of the scraped blogs are no longer part of the data source.
    • B. Crediting the author and linking the source is good attribution practice, but attribution is not permission. The company still copies and serves blog content whose reuse terms are unclear, so the licensing exposure in the data source stays.
    • C. Smaller chunks only change how much text is retrieved per query. The full scraped articles are still copied, stored and embedded without clear reuse rights, so the licensing problem in the data source is untouched.
    • D. A statement in the system prompt is a claim, not a legal basis. Whether fair use applies is decided by a court, and the prompt text does not change the license status of the scraped articles or the company's exposure.

    Subdomain 5.3: Use legal/licensing requirements for data sources to avoid legal risk

    31.Legal counsel flags that a search feature's embedding model was trained partly on web-scraped user-generated content with unclear rights, and the feature is about to ship to external customers. What is the appropriate remediation before launch?

    1. A.Take the web-scraped content of uncertain provenance out of the training data and substitute data under a confirmed commercial-use license, then retrain the model before launch.
    2. B.Publish a data-provenance notice in the product documentation listing the web-scraped sources and their stated terms, then ship to external customers on the planned date.
    3. C.Retrain the embedding model with differential privacy so individual web-scraped items cannot be traced, then record that result as meeting the legal review before launch.
    4. D.Set up a notice-and-takedown process where rights holders can request their content be dropped from future training, then ship to external customers on the planned date.
    Show answer & explanation

    Correct answer: A — Take the web-scraped content of uncertain provenance out of the training data and substitute data under a confirmed commercial-use license, then retrain the model before launch.

    • A. Correct. The legal exposure comes from training on content whose rights are unclear. Taking that content out of the training data and retraining on data under a confirmed commercial-use license removes the exposure at its source, before the feature reaches external customers.
    • B. Incorrect. A provenance notice tells readers where the data came from, but it does not give the company the right to use that data in a commercial product. The licensing gap remains, and customers would receive a feature built on content with unclear rights.
    • C. Incorrect. Differential privacy limits how much any single training item can be inferred from the model. That is a privacy protection and says nothing about copyright or licensing. Retraining this way still uses the same content without permission, so it cannot be recorded as meeting the legal review.
    • D. Incorrect. A takedown process only reacts after rights holders object and only affects future training. The current model has already been trained on content with unclear rights, and the exposure exists the moment the feature ships. The remediation has to happen before launch.

    Domain 6: Evaluation and Monitoring

    Subdomain 6.8: Use AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent Framework.

    32.A platform team wants to attribute LLM spend on a shared AI Gateway endpoint across several business units, without changing which model or endpoint each unit calls. Which approach lets them break down usage by business unit afterward?

    1. A.Attach custom key-value pairs to each request through the Databricks-Ai-Gateway-Request-Tags header, then group results by the request_tags column in the usage tracking system table.
    2. B.Filter the inference table's status_code column for successful requests, then group the resulting rows by the department field recorded in each request payload and echoed in the response JSON body.
    3. C.Create a separate rate limit group per business unit on the endpoint and read off each group's configured QPM value as its usage total for the billing period in the billing dashboard.
    4. D.Enable Unity Catalog lineage tracking on the serving endpoint and read the upstream table and notebook lineage graph in Catalog Explorer to determine which business unit issued each call.
    Show answer & explanation

    Correct answer: A — Attach custom key-value pairs to each request through the Databricks-Ai-Gateway-Request-Tags header, then group results by the request_tags column in the usage tracking system table.

    • A. Correct. Request tags sent in the `Databricks-Ai-Gateway-Request-Tags` header label each individual request with custom key-value pairs, such as a business unit name. Those tags are recorded in the `request_tags` column of the usage tracking system table, so the team can group usage and cost by business unit without changing which model or endpoint each unit calls.
    • B. Incorrect. The `status_code` column only records the HTTP outcome of a request, so filtering on it selects successful calls but does not attribute them to anyone. A department value is not something the gateway records or returns on its own, so grouping by it would not give a reliable per-business-unit breakdown.
    • C. Incorrect. A rate limit's configured QPM value is a throughput ceiling, not a measurement of what a group actually consumed. Reading it off a billing dashboard would show the configured limit rather than real usage or spend, so it cannot attribute cost to each business unit.
    • D. Incorrect. Unity Catalog lineage shows how tables, notebooks, and models relate to one another, not which caller or business unit sent a given inference request. It therefore cannot provide per-business-unit cost attribution for requests on a shared endpoint.

    Subdomain 6.1: Select an LLM choice (size and architecture) based on a set of quantitative evaluation metrics

    33.A retrieval-augmented question-answering system is being evaluated with two candidate LLMs on the same held-out test set of question-answer pairs. Model A scores 88% on an answer-correctness metric with an average response time of 1.2 seconds. Model B scores 89% on the same metric with an average response time of 4.5 seconds. The application has a strict service-level requirement that responses must return in under 2 seconds. Based on this evaluation data, what is the correct model selection decision?

    1. A.Select Model A, since its 1.2-second average response time is well inside the 2-second target, and its 88% correctness trails Model B by just one point
    2. B.Select Model B, since its 89% correctness is the higher score and its 4.5-second average response time can be brought down later with caching and prompt tuning
    3. C.Select neither model yet, since a one-point correctness gap is too small to separate them and the evaluation must be rerun on a larger test set before choosing
    4. D.Select Model B, since response times measured on a held-out test set do not carry over to production, so correctness is the dependable basis for choosing
    Show answer & explanation

    Correct answer: A — Select Model A, since its 1.2-second average response time is well inside the 2-second target, and its 88% correctness trails Model B by just one point

    • A. Model A's 1.2-second average response time meets the under-2-second service-level requirement, and its correctness is within a point of Model B's. Model B's 4.5-second average response time already fails the requirement, so Model A is the only candidate that can be deployed.
    • B. Optimisations such as caching or prompt tuning are not part of the evaluation data. Nothing shows they could cut a 4.5-second average to under 2 seconds. A one-point correctness edge cannot make up for a measured miss on a strict latency requirement.
    • C. No further testing is needed to decide. Model B's measured 4.5-second average response time disqualifies it whatever the correctness gap, and Model A meets the latency requirement with nearly the same correctness. Rerunning the evaluation would not change the outcome.
    • D. Latency measured on a held-out test set is the standard evidence for expected response time. It is the data this decision is based on. Setting it aside leaves a strict latency requirement unchecked, and a 4.5-second average gives no reason to expect Model B to come in under 2 seconds.

    Subdomain 6.5: Use Databricks features to control LLM costs

    34.A platform team supports five separate agent applications, each tagged with its own cost-center identifier, all routed through a shared Unity Catalog AI Gateway endpoint. Finance wants an email alert the moment any one cost center's monthly spend on that endpoint crosses $2,000, and they want the option to automatically block further requests from that cost center once the threshold is hit. Which Databricks feature should the team configure?

    1. A.Create a budget filtered on the cost-center tag with a monthly dollar threshold, and enable usage blocking at that limit.
    2. B.Apply a tokens-per-minute rate limit on the endpoint, and size it to each cost center's expected monthly volume.
    3. C.Schedule a SQL alert on the billing usage system table, grouped by cost-center tag, and email finance when spend passes $2,000.
    4. D.Grant CAN QUERY on the endpoint to each cost center's group, and revoke it when finance reports a monthly overspend.
    Show answer & explanation

    Correct answer: A — Create a budget filtered on the cost-center tag with a monthly dollar threshold, and enable usage blocking at that limit.

    • A. A Databricks budget can be filtered on custom tags such as cost-center identifiers. It tracks spend against a monthly dollar threshold and sends alerts when the threshold is reached. Its optional usage-blocking setting then stops further requests, so it covers both the per-cost-center alert and the automatic block.
    • B. A tokens-per-minute rate limit controls request throughput, not cumulative dollar spend over a month. Sizing it from expected volume would only approximate cost. It sends no email when a cost center crosses $2,000, and it does not track spend per cost-center tag. It therefore meets neither the alerting requirement nor the spend-based blocking requirement.
    • C. Billing usage data carries custom tags, so a scheduled SQL alert can email finance about per-tag spend. But the alert only runs on its schedule, so it cannot fire the moment the threshold is crossed. It is also notification-only and cannot stop further requests. That fails the requirement for an option to block the cost center automatically.
    • D. Endpoint permissions such as CAN QUERY control which principals may call the endpoint. They measure no spend and raise no alert. The cost-center tags identify applications and are not the principals the permissions are granted to. Revoking access only after finance reports an overspend is a manual response, not an alert at the moment spend crosses $2,000 or an automatic block.

    Subdomain 6.9: Use Databricks custom Scorers for evaluating agents and LLMs

    35.A team writes a custom scorer for a support agent and wants stakeholders reviewing evaluation runs to see not just a numeric score but also a short written reason for that score, attached to each trace. What should the `@scorer`-decorated function return to achieve this?

    1. A.Return a `Feedback` object that sets `value` to the numeric rating and `rationale` to the explanation text
    2. B.Return a `float` rating and record the explanation with `mlflow.log_text` in the same evaluation run
    3. C.Return a `list` of `float` values, one for each scoring criterion, in place of a single overall number
    4. D.Return a `str` that opens with the score and continues with the reason, used as the feedback's single value
    Show answer & explanation

    Correct answer: A — Return a `Feedback` object that sets `value` to the numeric rating and `rationale` to the explanation text

    • A. `Feedback` has separate `value` and `rationale` fields. Returning one stores the numeric score and the written explanation together as an assessment on the trace, so reviewers see both for every trace.
    • B. A `float` is a valid scorer return, but it carries only the number. `mlflow.log_text` saves the text as a run artifact, not as part of the assessment on each trace, so reviewers looking at a trace do not see the reason beside its score.
    • C. A list of floats is not a supported scorer return: scorers return a primitive, a `Feedback`, or a list of `Feedback` objects. Plain numbers, listed or not, have no field for text, so no written reason reaches the trace.
    • D. A returned `str` is stored as the feedback value itself, so the score and the reason are merged into one text value. The result is no longer a numeric score, and the reason has no field of its own, which `Feedback` provides through `rationale`.

    Want the full experience?

    These are just samples. Practice the full Databricks Certified Generative AI Engineer Associate question bank in quiz mode — free, no signup, with domain practice and exam simulation.