Databricks Generative AI Engineer Associate Practice Exam

Databricks Certified Generative AI Engineer Associate

The Databricks Certified Generative AI Engineer Associate certification validates the skills to design and build LLM-enabled solutions on Databricks, including RAG applications and agents. The exam covers six sections: Design Applications (14%), Data Preparation (14%), Application Development (30%), Assembling and Deploying Apps (22%), Governance (8%) and Evaluation and Monitoring (12%). Questions test chunking and retrieval, Vector Search, tools and agents, Model Serving, Unity Catalog governance, guardrails and MLflow evaluation. This practice exam mirrors that style with scenario-based single-answer and multiple-answer questions.

Question bank updated : questions, answers, explanations and chapters.

Certification Overview

  • Exam name: Generative AI Engineer Associate
  • Vendor: Databricks
  • Duration: 90 minutes
  • Total questions: about 45
  • Our practice exam pass mark: 70%

Who Should Take This Exam?

Generative AI Engineer, Machine Learning Engineer, AI Engineer, Data Scientist, Data Engineer, Solutions Architect, LLM Application Developer, MLOps Engineer

Prerequisites

No formal prerequisite. Databricks recommends six months of hands-on experience with the generative AI solution tasks in the exam guide, and the related training it lists.

Topics Covered

  • Design Applications
  • Data Preparation
  • Application Development
  • Assembling and Deploying Applications
  • Governance
  • Evaluation and Monitoring

Question Types

  • Multiple Choice (Single Answer)
  • Multiple Choice (Multiple Answers)

Generative AI Engineer Associate Practice Questions

Our question bank contains 600+ practice questions for this certification. Sample questions from each exam chapter. Expand a question to see the answer choices. With full access, you get unlimited practice exams with randomized questions from our full question bank.

Design Applications

Through Foundation Model APIs, a chat assistant must keep a fixed support-agent persona no matter what users type. Where should the persona instruction go in the request?
  • A. In an assistant message placed after the user message
  • B. In a system message placed ahead of the user message Correct answer
  • C. In a tool message returned by the first function call
  • D. In the user message, appended after the customer's question

Option B is correct because the system message is the part of a chat request that sets the assistant's role and standing rules, and it is placed ahead of the user turn so it applies to the whole conversation. Option A puts the instruction after the user's text where it reads as a prior reply, option C uses a role meant for function results, and option D leaves the persona inside text the user can contradict.

An agent must answer questions such as 'Is order 5521 eligible for a refund?' The refund window depends on the customer tier stored in an orders Delta table in Unity Catalog, and the rules for each tier are written in policy PDFs already indexed in Mosaic AI Vector Search. The tier is known only after the order lookup. Which design meets these requirements?
  • A. An agent with a Unity Catalog SQL function as an order tool and a retriever tool for policies Correct answer
  • B. A prompt template that pastes the full orders table and policy text ahead of the user question
  • C. A single Vector Search index built from the order table rows and the policy PDF chunks together
  • D. A fixed chain that runs the order lookup and policy retrieval in parallel on the raw question

Option A is correct because the agent needs two different sources chosen in sequence: a Unity Catalog SQL function returns the order's tier, and a retriever tool then fetches the policy text for that tier. Option B cannot fit a whole table and all policies in a prompt, option C mixes structured rows with document chunks in one index, and option D runs retrieval in parallel before the tier is known.

A support assistant answers from product manuals, and a ticketing API parses its reply as JSON with the fields answer and source_url. Retrieval returns the right passages, but replies often wrap the JSON in extra sentences and the API rejects them. Which change addresses this?
  • A. Insert a cross-encoder re-ranker between retriever and prompt
  • B. Add an output parser that enforces a JSON schema after the LLM Correct answer
  • C. Increase top-k so the prompt carries more manual passages
  • D. Switch to an embedding model with a longer input context

Option B is correct because the retrieval is fine and the only fault is free text around the JSON, which an output parser that enforces a JSON schema after the LLM fixes. A re-ranker, a larger top-k or a longer-context embedding model change what is retrieved, not the shape of the reply.

A policy assistant sometimes answers from the model's general knowledge when the retrieved passages do not cover the question, for example by quoting a typical 30-day return window the company never stated. Which TWO prompt changes address this behavior?
  • A. Instruct the model to answer from the passages and to say so when they lack the answer Correct answer
  • B. Increase the maximum output tokens so replies can quote the passages at greater length
  • C. Add 'Be accurate and helpful' at the start of the system prompt as a general reminder
  • D. Increase the number of retrieved passages from 4 to 12 to widen coverage of topics
  • E. Add an example where the passages lack the answer and the reply says it cannot find it Correct answer

Options A and E are correct because they tell the model to rely on the retrieved passages and to admit when they lack the answer, and an example of that refusal shows the behavior. Option B only lengthens replies, option C is a vague reminder that does not restrict the model to the passages, and option D retrieves more passages without stopping the model from using general knowledge.

Data Preparation

Forty-page contracts are being chunked for a RAG application. The embedding model has a context length of 512 tokens, and retrieved clauses are currently cut off mid-sentence. Which chunking approach fixes both problems?
  • A. Split into fixed 2,000-token windows and let the vector index shorten each window
  • B. Split on section and paragraph separators into chunks under 512 tokens with a small overlap Correct answer
  • C. Embed each whole contract as one record and let the model truncate input at 512 tokens
  • D. Split into single sentences of about 15 tokens each, with a zero-token overlap between neighbors

Option B is correct because chunks under the 512-token limit are embedded in full, and splitting on section and paragraph separators with a small overlap keeps clauses from being cut mid-sentence. Option A and option C exceed the embedding model's context length so text is lost, and option D produces tiny fragments that carry too little meaning and, with no overlap, still break ideas apart.

A RAG application retrieves 50 candidate chunks with similarity search. Offline checks show the answering chunk is nearly always among the 50 but often ranks below fifth, and the prompt has room for five chunks. Which change fixes this?
  • A. Raise the retrieval count to 50 and send all 50 chunks to the LLM to sort out
  • B. Cut chunk size in half, rebuild the index and keep retrieving the top five by similarity
  • C. Re-rank the 50 candidates with a cross-encoder and pass its top five chunks to the LLM Correct answer
  • D. Switch to a larger embedding model, re-embed the corpus and keep retrieving the top five

Option C is correct because the answering chunk is already in the 50 candidates, so the problem is ordering, and a cross-encoder re-ranker scores each query and chunk pair together and moves the best chunks into the top five. Option A overflows the prompt and adds cost, and options B and D change how chunks are embedded but still rely on the same similarity ordering, so they do not target the ranking problem.

A Generative AI Engineer creates a Delta Sync vector search index on a Unity Catalog table of chunks, and creation is rejected because the source table cannot report row-level changes. Which table change resolves this?
  • A. Enable change data feed in the table properties Correct answer
  • B. Compact the table's small files using OPTIMIZE
  • C. Cluster the table on the chunk ID with Z-ORDER
  • D. Partition the table by the source document ID

Option A is correct because a Delta Sync index reads the table's change feed to find inserted, updated and deleted rows, so change data feed must be enabled on the source table. OPTIMIZE, Z-ORDER and partitioning change file layout but do not record row-level changes.

A Generative AI Engineer indexes 1,500-token chunks that each cover several subsections. The embedding model accepts 8,192 tokens. Relevant chunks are retrieved, but they rank around sixth to tenth with near-equal similarity scores, and the prompt keeps five chunks. Which TWO changes address the cause?
  • A. Increase top-k from 5 to 15 on the existing chunks
  • B. Chunk by subsection into pieces of about 300 tokens Correct answer
  • C. Rebuild the index from the re-chunked Delta table Correct answer
  • D. Apply a similarity cutoff to the existing chunks
  • E. Switch to an embedding model with a larger input limit

Options B and C are correct. Each chunk covers several subsections, so relevant text is diluted and similarity scores are nearly equal; chunking by subsection into about 300-token pieces gives focused chunks, and the index has to be rebuilt from the re-chunked table for the change to take effect. Options A and D leave the diluted chunks as they are, and option E addresses an input limit that is not the problem.

Application Development

A Generative AI Engineer's chunks average 700 tokens, and citation links in the user interface are tied to those chunk boundaries, so the chunks cannot be re-split. Embedding model X has a 512-token context length and model Y has an 8,192-token context length. Which choice keeps the full text of each chunk in its embedding?
  • A. Embed with model X and accept that the final 188 tokens of each chunk are truncated
  • B. Embed with model X after re-splitting the chunks to 450 tokens before they are embedded
  • C. Embed with whichever model has more output dimensions, since extra dimensions hold longer text
  • D. Embed with model Y because its 8,192-token context length covers the 700-token chunks Correct answer

Option D is correct because the chunks cannot be re-split, and a 700-token chunk fits inside the 8,192-token context length of model Y, so the full text is embedded. Option A keeps model X, which truncates everything beyond 512 tokens, and option B re-splits the chunks, which the citation links forbid. Option C is wrong because the number of output dimensions has no effect on how much input text the model can read.

A bank's customer-facing assistant must not give investment advice, even when the underlying model produces it. Blocked replies should be replaced with a fixed message. Which approach meets this requirement?
  • A. A larger retrieval count so the context holds more of the bank's policy pages on advice limits
  • B. An output guardrail that checks each reply for investment advice and swaps in a fixed message Correct answer
  • C. A system prompt instruction that tells the model to decline any request for investment advice
  • D. A lower temperature setting so the model repeats approved wording more consistently across replies

Option B is correct because an output guardrail inspects each reply after the model generates it and can replace a blocked reply with a fixed message, which enforces the rule even when the model produces advice. Option C is only an instruction the model may ignore, option A adds context but does not stop advice, and option D changes wording consistency without blocking any content.

Bad answers keep coming from a LangChain chain with a retriever and a prompt step, and the engineer needs each step's inputs, outputs and latency while debugging. What should they use?
  • A. Serving endpoint container logs, which print whatever text the chain code writes to standard output
  • B. MLflow metric logging, which stores the final answer score as a single number per run
  • C. MLflow tracing, which captures each chain step as a span with inputs, outputs and timing Correct answer
  • D. Unity Catalog lineage, which draws the tables and models the chain reads at run time

Option C is correct because MLflow tracing records each step of the chain, such as the retriever and the prompt step, as a span with its inputs, outputs and timing, which is exactly what is needed to find where a bad answer starts. Option B stores only a single score per run, option A shows only what the code prints, and option D shows which assets are used but not what happened in a request.

Assembling and Deploying Applications

A table in Unity Catalog with change data feed enabled holds support articles in a text column and receives new rows from a nightly job. The index must stay in sync with no custom upsert code, and no precomputed embeddings exist. Which index setup meets these requirements?
  • A. A Direct Access index that the nightly job updates through the Vector Search upsert API call
  • B. A Delta Sync index on the table, with Databricks computing embeddings from the text column Correct answer
  • C. A Direct Access index loaded once with embeddings created by a Foundation Model API
  • D. A Delta Sync index that reads self-managed embeddings from a precomputed vector column

Option B is correct because a Delta Sync index follows a Delta table that has change data feed enabled and updates itself when rows arrive, and with Databricks-computed embeddings it embeds the text column, so no upsert code or precomputed vectors are needed. Options A and C use a Direct Access index, which needs the job to upsert vectors itself, and option D needs precomputed embeddings that do not exist.

A Generative AI Engineer must classify 2 million product descriptions in a Delta table each night and write the labels to another Delta table at the lowest operational effort. Which approach should they use?
  • A. Run a SQL query that applies ai_query() to the description column and writes labels to a Delta table Correct answer
  • B. Deploy an agent with a classification tool and call it one description at a time from a Databricks App
  • C. Build a Vector Search index on the descriptions and read each label from the nearest stored neighbor
  • D. Loop over the rows in a Python notebook and send one REST request per description to a serving endpoint

Option A is correct because ai_query() lets a SQL query call a model for every row of a table and write the results to a Delta table, which is the lowest-effort way to run a nightly batch over 2 million rows. Options B and D handle one row at a time through external calls and need more code and orchestration, and option C does similarity lookup, which does not produce labels from a model.

A chain that queries a Mosaic AI Vector Search index works in the author's notebook, but after deployment to Mosaic AI Model Serving, requests fail with a permission error on the index. Which change resolves this?
  • A. Grant SELECT on the index's source table to the author's group so the endpoint inherits their access
  • B. Declare the index as a resource when logging the chain so the endpoint is granted access to it Correct answer
  • C. Embed the author's personal access token in the chain code so the endpoint calls as that user
  • D. Register the chain in the same catalog as the index so access passes to the endpoint automatically

Option B is correct because Model Serving does not run the chain as the author, so the logged chain must declare the Vector Search index as a resource, and the endpoint is then given access to it. Option A grants access to the source table, not the index, and not to the endpoint's identity, option C hard-codes a personal credential, which is insecure, and option D is wrong because being in the same catalog does not grant the endpoint any access.

Governance

Support transcripts that contain customers' phone numbers and emails will feed a RAG application. Compliance rules say the vector index, the retrieval logs and the prompts sent to the model must not hold contact details. Which approach meets these rules?
  • A. Mask phone numbers and emails in the text before it is chunked and written to the source table Correct answer
  • B. Limit access to the index to the support group with Unity Catalog privileges on the index
  • C. Tell the model in the system prompt not to repeat contact details found in retrieved chunks
  • D. Redact contact details from generated answers with an output guardrail before users see them

Option A is correct because masking the contact details before chunking means they never reach the source table, the index, the retrieval logs or the prompts, which satisfies all three rules at once. Option B limits who can read the index but the data is still stored there, and options C and D act only on the model or its answers after the data was already retrieved and put into prompts and logs.

A Generative AI Engineer plans to index articles scraped from a news website whose terms of service forbid automated copying. Which action best avoids legal risk?
  • A. Limit retrieval of the articles to internal employees
  • B. Chunk the articles into short passages before indexing
  • C. Obtain a license from the publisher for the content Correct answer
  • D. Strip bylines and site names from the scraped articles

Option C is correct because a license from the publisher is the only action that gives the company the legal right to copy the content when the terms forbid automated copying. Limiting access, chunking and stripping bylines still copy the material, and stripping bylines also hides the source.

A company's document table has a license column. Legal states that documents under non-commercial licenses must not be copied into the vector index at all. Where should a Generative AI Engineer run the license check in the ingestion pipeline?
  • A. In a metadata filter applied to each Vector Search query
  • B. In an output guardrail that removes passages from answers
  • C. In the system prompt that tells the model to skip them
  • D. In a filter on the source table before chunking and embedding Correct answer

Option D is correct because the rule says non-commercial documents must not be copied into the index at all, so the check has to run on the source table before chunking and embedding. Filters at query time, output guardrails and prompt instructions all leave the content in the index.

Evaluation and Monitoring

A Generative AI Engineer is evaluating a RAG application with MLflow judges. The evaluation set holds questions, the chunks the retriever returned and the generated answers, but no expected answers or expected source documents. Which judge can run on this data?
  • A. A judge that compares the generated answer with a reference answer for equivalence
  • B. A judge that checks whether the generated answer is supported by the retrieved chunks Correct answer
  • C. A judge that scores how many key facts from an expected response appear in the answer
  • D. A judge that checks whether the retrieved chunks match a list of expected source documents

Option B is correct because a groundedness judge needs only the generated answer and the retrieved chunks, both of which the evaluation set holds. Options A and C need a reference answer or expected facts, and option D needs a list of expected source documents, so none of these can run on data that lacks expected answers and expected sources.

A RAG endpoint's token bill has doubled. Usage logs show an average of 9,000 input tokens and 300 output tokens per request, because the app passes 20 retrieved chunks of about 450 tokens each. Answer quality is acceptable with the top few chunks. Which change cuts cost the most?
  • A. Re-rank the 20 chunks and pass only the best four chunks to the LLM prompt Correct answer
  • B. Move to a smaller embedding model to shorten the vector stored for each chunk
  • C. Lower the maximum output tokens setting on the endpoint from 300 tokens to 150 tokens
  • D. Add a per-user rate limit of 20 requests per minute on the endpoint for all callers

Option A is correct because the 20 chunks of about 450 tokens make roughly 9,000 input tokens, which is almost all of the cost, and re-ranking to the best four chunks cuts input to about 1,800 tokens while keeping the relevant context. Option C only trims the 300 output tokens, option B changes the stored vector size and not the prompt, and option D limits traffic without lowering the cost of each request.

An agent on a Model Serving endpoint sometimes loops, calling its search tool dozens of times before it answers, and sometimes returns an empty answer after a tool fails. Which TWO metrics should an engineer monitor to catch these two behaviors?
  • A. Sync lag of the Delta Sync index in seconds
  • B. Median time to first token across all requests
  • C. Share of tool spans that end in an error status Correct answer
  • D. Count of tool calls per request trace Correct answer
  • E. Retrieval recall at k on the labeled question set

Options C and D are correct. The count of tool calls per request trace exposes the looping behavior, and the share of tool spans ending in an error status exposes the failing tool that leads to an empty answer. Index sync lag, time to first token and retrieval recall do not measure either behavior.

Free Study Guide

Read the free Databricks Generative AI Engineer Associate study guide: every exam topic explained in plain English, with diagrams, exam tips and the mistakes to avoid.

More Databricks Practice Exams

All Databricks practice exams →

Practice with realistic mock exams to prepare for your Databricks certification.