Skip to content
Databricks GenAI Mini-Lab

FREE QUESTIONS WITH ANSWERS

Databricks Generative AI Engineer Associate Practice Questions

Work through 36 free Databricks GenAI Engineer practice questions with answers and explanations. Cover concepts, code/API and scenarios across six domains. These are practice exercises in an unofficial resource, with no guarantee of overlap with the exam.

Target certification badge: Databricks Certified Generative AI Engineer Associate

These are the same 36 questions available in public Study mode. Answers are displayed for study. To practise without seeing the answers in advance, open Study mode. Start practice →

14% of the exam

Application Design

Question 1

# 1

Scenario · Select one answer

A warehouse classifier must return exactly `AVAILABLE` when stock is greater than zero and `UNAVAILABLE` otherwise. Which instruction best defines the contract?

  1. Return `AVAILABLE` whenever the message mentions a product.

  2. Return one of the two labels and include a JSON object with the warehouse and reasoning.

  3. Return `UNAVAILABLE` whenever the message contains a quantity.

  4. Given the validated stock quantity, return only `AVAILABLE` if it is greater than zero; otherwise return only `UNAVAILABLE`.

Explained answer: D

The explicit conditional instruction defines the input condition, both permitted labels, and the exact output restriction. The other prompts omit a branch or request extra output.

Question 2

# 2

Scenario · Select one answer

An internal compliance assistant must answer from policies that are revised several times per month. The team wants the smallest maintainable architecture and does not want a training cycle for every revision. Which component set fits?

  1. A retriever, a prompt that inserts retrieved evidence, and a response-generating LLM

  2. A scheduled fine-tuning job that retrains the LLM after every policy revision

  3. A response LLM with prompt instructions but no access to the policy corpus

  4. A multi-agent supervisor and a fine-tuned model even though the task has one fixed retrieval path

Explained answer: A

A simple RAG chain updates knowledge through the indexed corpus. It avoids repeated training and the unnecessary orchestration overhead of an agent for a fixed question-answering flow.

Question 3

# 3

Concept · Select one answer

A reporting service must reduce a multi-paragraph incident narrative to one sentence while preserving the principal event and impact. Which NLP task should guide model selection?

  1. Text-to-text translation

  2. Sentence boundary detection

  3. Topic classification

  4. Summarization

Explained answer: D

Summarization compresses a longer source while retaining its essential meaning. Classification labels the text, segmentation finds boundaries, and translation changes its language.

Question 4

# 4

Scenario · Select one answer

Within the March 2026 exam-guide taxonomy: An enterprise wants one conversational entry point that delegates finance questions to a Genie Agent, policy questions to a Knowledge Assistant, and actions to governed tools. Which Agent Bricks capability fits?

  1. Information Extraction

  2. Supervisor Agent

  3. A single PromptTemplate

  4. A Delta Sync index

Explained answer: B

Supervisor Agent coordinates specialist agents, Genie, Unity Catalog functions, and MCP servers, delegating work and synthesizing results. March 2026 syllabus context: documentation dated October 6 classifies Knowledge Assistant and Supervisor Agent as legacy offerings. For new agents it recommends Genie Agents or Agent Bricks CLI as appropriate.

Question 5

# 5

Code / API · Select 2 answers

A router uses a typed output: class Route(BaseModel): category: Literal["billing", "technical", "cancellation"] route_llm = llm.with_structured_output(Route) Which TWO practices make routing more reliable? (Choose two.)

  1. Add every company document to the routing prompt

  2. Keep a closed Literal set for the permitted categories

  3. Validate the parsed category before invoking the selected branch

  4. Ask for free-form reasoning and parse the last word with split()

  5. Increase temperature so the model can invent new route names

Explained answer: B, C

A closed set and typed validation reduce unexpected outputs and reject categories outside the contract. The user's authorization to execute a branch must be checked separately.

Review this domain in the study guide →

14% of the exam

Data Preparation

Question 6

# 6

Scenario · Select one answer

An AI Search query retrieves 20 candidates, but offline labels show that the most relevant passages often appear below the three positions sent to the LLM. What should the team test first?

  1. Apply a reranker to the candidate set before selecting the final three passages.

  2. Ask the response LLM to reorder passages after the prompt has already discarded seventeen candidates.

  3. Replace the embedding model without first measuring a ranking baseline.

  4. Send every candidate to the generator regardless of context budget.

Explained answer: A

A reranker applies a more precise relevance signal to the retrieved candidate set before the final context is selected. It directly addresses poor ordering without blindly increasing prompt size.

Question 7

# 7

Scenario · Select 2 answers

A corpus produces more chunk rows than the selected index can hold. Which TWO configuration changes reduce the row count without removing source documents? (Choose two.)

  1. Increase the maximum chunk size within the embedding model's supported limit.

  2. Reduce overlap between adjacent chunks while preserving enough boundary context.

  3. Decrease chunk size.

  4. Increase overlap.

  5. Use embeddings with fewer dimensions but keep identical chunk boundaries.

Explained answer: A, B

Larger chunks and less overlap represent the same corpus with fewer rows. Embedding dimension changes vector width and cost, not the number of chunk records.

Question 8

# 8

Scenario · Select one answer

A procurement assistant answers invoice-policy questions but cannot report the current delivery milestone for a particular purchase order. Every request includes `purchase_order_id`. Which source closes the gap?

  1. A vector index containing generic carrier marketing pages.

  2. A governed operational table keyed by `purchase_order_id` with current milestone and estimated arrival.

  3. A fine-tuning set of last year's delivery examples.

  4. A prompt rule that adds a fixed number of days to every order date.

Explained answer: B

The missing fact is current, structured, and order-specific. A deterministic lookup in its system of record is more reliable than static documents, historical training, or an invented estimate.

Question 9

# 9

Code / API · Select one answer

A RAG corpus contains PDFs with headings, tables, lists, and reading order that must be preserved for downstream chunking. Which Databricks function is designed to produce structured document content?

  1. ai_query

  2. ai_parse_document

  3. vector_search

  4. ai_classify

Explained answer: B

`ai_parse_document` extracts document content and structure so downstream chunking can respect elements and reading order.

Question 10

# 10

Concept · Select one answer

A corpus must answer both broad questions about an entire topic and precise questions about individual passages. Which advanced retrieval preparation is designed for multiple abstraction levels?

  1. RAPTOR-style hierarchical summaries

  2. Removing all metadata

  3. One sentence per index

  4. Increasing model temperature

Explained answer: A

A RAPTOR-style hierarchy groups and summarizes content at several levels, supporting retrieval of both global context and specific passages.

Review this domain in the study guide →

30% of the exam

Application Development

Question 11

# 11

Scenario · Select one answer

An ingestion benchmark counts tokens with each candidate's own tokenizer, including required prefixes and special tokens. Document inputs need at most 512 tokens and separately embedded queries at most 90. All candidates meet the quality threshold. Which candidate should be tested first for minimum footprint without truncation?

  1. A 768-dimensional model with a 514-token limit and 0.44 GB footprint.

  2. A 2,560-dimensional model with a 2,048-token limit and 11 GB footprint.

  3. A 4,096-dimensional model with a 32,768-token limit and 14 GB footprint.

  4. A 384-dimensional model with a 512-token limit and 0.13 GB footprint.

Explained answer: D

The full document and query inputs are embedded independently, so their lengths are not added together. The 512-token candidate fits the measured maximum and has the lowest footprint. In practice, count with the actual tokenizer and include preprocessing overhead; this prompt explicitly accounts for both. Confirm runtime cost and latency by measurement.

Question 12

# 12

Concept · Select 2 answers

A chat assistant must retrieve governed reference material and preserve explicit conversation state across turns. Which TWO capabilities directly satisfy those requirements? (Choose two.)

  1. A searchable knowledge store or retriever for the reference material

  2. A conversation-state or checkpoint store scoped to the session

  3. An unrestricted action tool even though no action is required

  4. A document loader used only at runtime in place of an index

  5. A front-end component library

Explained answer: A, B

Retrieval supplies external knowledge, while a state or checkpoint store preserves the conversational context. Tools, loaders, and UI components do not substitute for either requirement.

Question 13

# 13

Scenario · Select one answer

A commercial application must process newly published Spanish medical documents with an open model from a model hub. Which evidence should drive the shortlist before task-specific evaluation?

  1. Membership in a popular model family, regardless of its card.

  2. Download count alone.

  3. Upload date alone.

  4. A model card documenting the task, Spanish and medical-domain evidence, context limits, license, risks, and intended use.

Explained answer: D

A model card provides the evidence needed to assess technical and legal fit. Popularity and recency are weak proxies; shortlisted models must still be compared on representative medical cases.

Question 14

# 14

Concept · Select one answer

A RAG response states facts that are not supported by any retrieved document. Which quality issue should the engineer investigate first?

  1. Groundedness

  2. Throughput

  3. Embedding dimension

  4. Token billing

Explained answer: A

Groundedness checks whether response claims are supported by the context supplied to the model.

Question 15

# 15

Scenario · Select one answer

A team wants to compare paragraph-based chunks with fixed 500-token chunks. What is the soundest experiment?

  1. Change chunking, embedding model, and LLM at the same time

  2. Use the same labeled queries and retrieval metrics while changing only the chunking strategy

  3. Choose whichever produces fewer rows without evaluating answers

  4. Ask one user which option looks better

Explained answer: B

A controlled experiment holds the dataset and other components constant, so any quality difference can be attributed to chunking.

Question 16

# 16

Scenario · Select one answer

A billing tool requires `account_id` and `transaction_id` for every lookup. How should an agent incorporate those values?

  1. Fine-tune the model on historical identifiers so it predicts both fields from the user's wording.

  2. Extract both fields, validate their format and authorization, and pass them explicitly in the governed tool call.

  3. Store the latest identifiers in serving environment variables and reuse them across every user's session.

  4. Retrieve semantically similar billing records first and let the generator infer any missing identifiers.

Explained answer: B

Identifiers are structured tool arguments, not facts for the model to guess. Extraction, validation, authorization, and explicit parameter passing create a deterministic and auditable contract.

Question 17

# 17

Scenario · Select one answer

A model must emit exactly {"priority": "high|medium|low"}. Zero-shot instructions still produce extra prose. What is the best next prompt change?

  1. Add few-shot examples with only valid JSON outputs

  2. Increase temperature

  3. Ask for chain-of-thought

  4. Remove the schema

Explained answer: A

Exact schema examples reinforce both the allowed values and the absence of prose. Higher temperature or chain-of-thought increases variation.

Question 18

# 18

Code / API · Select one answer

A custom agent is built with a third-party framework but must integrate with Databricks tracing, evaluation, deployment, and monitoring. Which MLflow interface is the recommended wrapper?

  1. ResponsesAgent

  2. pandas.DataFrame

  3. PromptTemplate only

  4. AutoMLClassifier

Explained answer: A

ResponsesAgent provides a common interface for agents built with different frameworks and makes them compatible with Databricks GenAI capabilities.

Question 19

# 19

Concept · Select one answer

The same groundedness scorer runs on a fixed regression dataset before release and on sampled live traces afterward. What distinguishes these two uses?

  1. Offline evaluation compares versions on controlled examples; monitoring checks changing live traffic over time.

  2. Using the same scorer makes both runs offline evaluations, regardless of where their examples originate.

  3. Monitoring measures infrastructure only, so a groundedness scorer cannot be used on production traces.

  4. Running evaluation before release removes the need to assess answer quality after deployment.

Explained answer: A

The distinction comes from data, timing and purpose, not a requirement to use different scorers. Controlled evaluation supports comparisons; monitoring detects operational or quality changes in actual use. Useful production failures can later become regression examples.

Question 20

# 20

Code / API · Select one answer

A custom agent must call a Genie Agent and maintain a multi-turn conversation with it. Which integration is appropriate?

  1. The Genie conversation API

  2. Copy every table into the system prompt

  3. OCR the SQL warehouse

  4. A BLEU scorer

Explained answer: A

The conversation API creates conversations, sends messages, and retrieves results while preserving multi-turn context.

Question 21

# 21

Code / API · Select 2 answers

A public chatbot currently returns the raw model response: response = chain.invoke(request) return response Which TWO changes implement an output safety guardrail? (Choose two.)

  1. Store the unsafe response in the system prompt for the next user

  2. Evaluate response with a toxicity or safety classifier before returning it

  3. Block, redact, or replace responses that exceed the configured risk threshold

  4. Increase temperature when toxic text is detected

  5. Apply safety checks only to the user's input

Explained answer: B, C

An output guardrail inspects the draft and takes a safe action before the content reaches the user.

Review this domain in the study guide →

22% of the exam

Assembly and Deployment

Question 22

# 22

Code / API · Select one answer

A current LCEL chain is incomplete: prompt = PromptTemplate.from_template("Explain {topic} in one sentence") chain = prompt | ______ | StrOutputParser() Which replacement completes the runnable prompt → model → parser sequence?

  1. prompt.format(topic='RAG')

  2. StrOutputParser()

  3. AISearchClient()

  4. ChatDatabricks(endpoint='support-llm')

Explained answer: D

LCEL composes a prompt runnable, a chat model, and an output parser in that order. Formatting the prompt early or inserting a search client does not supply the generation step.

Question 23

# 23

Code / API · Select one answer

A notebook uses the current SDK: from databricks.ai_search.client import AISearchClient client = AISearchClient() The source is a Delta table with a text column, and Databricks must compute embeddings and synchronize the index. Which method creates the correct index type?

  1. client.get_index(...)

  2. client.create_delta_sync_index(...)

  3. client.create_direct_access_index(...)

  4. client.similarity_search(...)

Explained answer: B

`create_delta_sync_index` creates an index tied to a Delta source and accepts the text and embedding-model configuration. Direct Vector Access requires the client to own vector updates.

Question 24

# 24

Scenario · Select one answer

A catalog fits both tested AI Search endpoint types. Under the expected concurrency, measured (p95 latency, retrieval quality) is: standard ANN (70 ms, 0.91), standard with reranking (160 ms, 0.96), storage-optimized ANN (260 ms, 0.92). Requirements: quality ≥0.90 and p95 <100 ms. Which deployment fits the evidence?

  1. Standard with reranking, because the highest quality score overrides the latency requirement.

  2. Storage-optimized ANN, because a higher maximum vector capacity always means lower query latency.

  3. Standard ANN, since its measured quality and latency satisfy both mandatory thresholds.

  4. Delay deployment until embeddings are fine-tuned, although the measured standard configuration passes both thresholds.

Explained answer: C

Standard ANN is the only measured candidate meeting both thresholds. Extra ranking stages may improve quality but have a latency cost; fine-tuning is not required when the evaluated candidate already qualifies. These numbers are scenario measurements, not product guarantees or permanent platform limits.

Question 25

# 25

Scenario · Select one answer

A release pipeline must promote an approved prompt from staging to production without copying mutable text into application code, while keeping rollback history. Which mechanism fits?

  1. Keep one unversioned prompt file and overwrite it during every deployment.

  2. Register immutable prompt versions in MLflow and move environment aliases only after evaluation and approval.

  3. Store the production prompt only in a CI runner's temporary directory.

  4. Overwrite a Delta row in place and delete the prior value.

Explained answer: B

Prompt Registry versions preserve history, and aliases provide mutable environment pointers to approved immutable versions. Moving an alias also supports rollback without changing consuming code.

Question 26

# 26

Concept · Select one answer

The March 2026 exam guide refers to Mosaic AI Vector Search, while current Databricks documentation and the product page use Databricks AI Search. How should an engineer interpret these names?

  1. AI Search is a separate replacement product that requires migrating every Vector Search index

  2. Mosaic AI Vector Search is only a generic L2 algorithm, while AI Search is the managed service

  3. AI Search is the endpoint resource and Vector Search is always a separate index product

  4. They are the same Databricks product after a rename; legacy SQL and REST identifiers can still contain vector-search wording

Explained answer: D

Databricks AI Search is the current name; Vector Search and Mosaic AI Vector Search are former names. The rename does not create a separate product or invalidate legacy identifiers such as `vector_search()` and REST paths containing `vector-search`.

Question 27

# 27

Code / API · Select 2 answers

A Delta table must be classified by an existing custom serving endpoint whose input signature requires a structured field named text of type string: SELECT review, ai_query( endpoint => ?, request => ? ) AS label FROM catalog.schema.reviews; Which TWO expressions correctly fill the placeholders? (Choose two.)

  1. 'review-classifier'

  2. named_struct('text', review)

  3. review

  4. current_user()

  5. vector_search(review)

Explained answer: A, B

ai_query receives the endpoint's literal name and a request expression compatible with the served model signature.

Question 28

# 28

Scenario · Select one answer

An agent needs governed retrieval from an existing Databricks AI Search index with minimal operational work. Which MCP integration is preferable?

  1. A new custom server that reimplements AI Search

  2. A browser extension

  3. A prompt-only simulation of search

  4. A Databricks-managed AI Search MCP server

Explained answer: D

The managed MCP server already supplies hosting, authentication, and governance over the AI Search index.

Question 29

# 29

Scenario · Select one answer

An authenticated agent backend correctly restricts retrieval for each employee. A new shared answer cache uses only the question text as its key. Two employees have different document permissions. What must change before enabling the cache?

  1. Keep the shared key because identical wording always implies identical authorized evidence.

  2. Isolate cache entries by verified authorization scope and handle permission changes, or disable shared answer caching.

  3. Check permissions only on cache misses; cached answers are safe because an authorized employee generated them.

  4. Remove document titles from cached answers while retaining all answer content under the shared key.

Explained answer: B

Authorization applies to cached responses too. A correctly protected retriever can still be bypassed by returning an answer produced under another user's broader permissions. Partition cache scope using trusted authorization, account for permission changes, or avoid sharing protected answers.

Review this domain in the study guide →

8% of the exam

Governance

Question 30

# 30

Scenario · Select one answer

Offline traces show that irrelevant inflammatory passages in the indexed source repeatedly reach the prompt and trigger offensive answers. What is the most direct upstream remediation?

  1. Refresh the same uncurated corpus more frequently.

  2. Display a notice explaining that offensive responses are possible.

  3. Reduce the number of users while leaving the harmful passages indexed.

  4. Review, remove, redact, or quarantine the problematic passages before rebuilding the index, then run regression evaluation.

Explained answer: D

The identified cause is source content reaching retrieval, so curation removes that stimulus before generation. Output guardrails remain useful defense in depth, but notices and access volume do not repair the corpus.

Question 31

# 31

Concept · Select one answer

What principle applies when a dataset license permits research use only but the intended assistant is a paid commercial product?

  1. Use it because public download implies commercial permission

  2. Remove the dataset name and continue

  3. Fine-tune the model so the original license no longer applies

  4. Do not use it commercially unless a compatible license or explicit permission is obtained

Explained answer: D

Public availability does not replace a license. The intended use must be expressly permitted before the data is incorporated.

Question 32

# 32

Scenario · Select one answer

A search request includes department='finance', supplied by the browser. The verified employee belongs only to support. The index contains both departments. How should the backend construct the authorization filter?

  1. Trust the requested department because the employee completed sign-in.

  2. Derive the permitted scope from trusted entitlements; reject or intersect incompatible requested filters before retrieval.

  3. Retrieve finance documents and instruct the model to reveal only non-sensitive sentences.

  4. Accept the filter when the employee writes a convincing business reason in the prompt.

Explained answer: B

User input expresses a request, not an access grant. The backend obtains permitted scope from verified identity and trusted entitlements, then ensures requested filters cannot broaden it. Authentication proves who the caller is; authorization decides which data the caller may retrieve.

Review this domain in the study guide →

12% of the exam

Evaluation and Monitoring

Question 33

# 33

Scenario · Select one answer

A multi-step agent sometimes chooses the wrong tool after retrieval. The engineer needs the ordered calls, arguments, outputs, errors, and timing for a failed request. What should be enabled first?

  1. MLflow Tracing for the agent and its components

  2. Only an aggregate final-answer score with no execution spans

  3. Ad hoc print statements that omit nested framework calls

  4. Separate applications for every step before inspecting the current trace

Explained answer: A

MLflow Tracing captures the nested execution as spans, exposing inputs, outputs, tool calls, errors, and latency. That evidence identifies where the behavior diverged before code is restructured.

Question 34

# 34

Scenario · Select one answer

Four subject-matter experts apply different interpretations of 'complete answer' and rate the same agent traces inconsistently. What should happen before treating their labels as benchmark truth?

  1. Replace all experts immediately with an unrubriced LLM judge.

  2. Define observable rubric criteria, calibrate reviewers on shared examples, resolve systematic disagreements, and measure agreement.

  3. Average every score without investigating why reviewers disagree.

  4. Delete every case on which the experts disagree.

Explained answer: B

A shared rubric and calibration align how experts interpret the task, while agreement measurement reveals remaining inconsistency. Averaging or deleting disagreements hides the measurement problem.

Question 35

# 35

Scenario · Select one answer

A support endpoint has both a latency SLO and a response-quality target. Which production metric set is most useful?

  1. Track p50 and p95 latency, errors, throughput, token or cost usage, and sampled quality or user feedback.

  2. Track only average latency, without tail latency, errors, request volume, cost, or any response-quality signal.

  3. Track training loss and parameter count, even though neither reports serving health or quality on production requests.

  4. Track only document file size and ingestion time, regardless of endpoint behavior and generated-answer quality.

Explained answer: A

The SLO and quality target require operational and semantic signals together. Tail latency, failures, load, usage, and sampled quality reveal distinct production failure modes.

Question 36

# 36

Concept · Select one answer

A gateway enforces 60 requests per minute for one caller. The caller stays below that rate but runs continuously for days. What does this control guarantee by itself?

  1. The caller's accumulated monthly spend can never exceed a fixed euro budget.

  2. Request admission is rate-limited; a per-minute limit alone does not impose a total spending cap.

  3. Every admitted response will contain fewer tokens than any response admitted before the limit was set.

  4. The usage dashboard automatically shuts the service down at a user-defined monetary threshold.

Explained answer: B

A rate limit constrains requests or tokens within a time window. Continuous permitted traffic can still accumulate cost. A total budget needs separately supported enforcement or explicit application logic; logging and alerts alone do not reject requests. Verify which paths and identities the configured gateway rule covers.

Review this domain in the study guide →