All Databricks exams
Free Databricks Certified Generative AI Engineer Associate practice test: 30 questions with answers
30 original questions for Databricks Certified Generative AI Engineer Associate, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
Databricks Certified Generative AI Engineer Associate exam guide: topics, cost and format
All 30 Databricks Certified Generative AI Engineer Associate questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Application Development (5 questions)
Question 1
A vector index was built with one embedding model, and incoming queries are embedded with a different model. What is the most likely result?
- ARetrieval quality degrades because query vectors and document vectors are not in a comparable space
- BThe index re-embeds every document with the query model on each request, so quality stays the same
- CSearch becomes faster because the query model uses fewer dimensions to represent the same text
- DNothing changes, because the embedding model affects only how vectors are stored and not how they are compared
Show answer and explanationHide answer
Correct answer: ASimilarity only means something when documents and queries are embedded with the same model, so mixing models returns poor matches. The index does not re-embed on each query. Fewer dimensions do not make mismatched vectors comparable, and the embedding model determines the vectors that are compared.
Question 2
A downstream service parses the output of an LLM and fails when the model adds extra text around the JSON. Which prompt technique reduces this problem most directly?
- ARaise the temperature so that the model produces more varied and expressive wording in each response
- BGive few-shot examples of the exact JSON shape and state the schema and the no-extra-text rule explicitly
- CUse a longer prompt that describes the business background and asks for a friendly, conversational tone
- DRemove all instructions and let the model choose a format that it finds most natural for each question
Show answer and explanationHide answer
Correct answer: BFew-shot examples plus an explicit schema and a rule against extra text show the model the exact output shape, which makes parsing reliable. Higher temperature increases variation, which works against parsing. Background and tone instructions do not constrain the format, and removing instructions leaves the format to chance.
Question 3
An agent must check an order's status by calling a governed Unity Catalog function. Which implementation is correct?
- ARegister the function as a tool, with a clear description and typed parameters that the agent can call
- BPaste the source code of the function into every prompt so that the model can reason about the logic itself
- CLet the model estimate the order status from earlier conversation turns, and verify the answer after the session
- DCall the function from the browser with the end user's personal access token embedded in the page source
Show answer and explanationHide answer
Correct answer: ARegistering the Unity Catalog function as a tool gives the agent a typed interface, and governance applies to the function itself. Pasting code into prompts is fragile and exposes logic. Estimating status is a guess, and embedding a personal token in a page exposes credentials.
Question 4
A chatbot forgets details from early in long conversations, and token costs grow with every turn. Which change addresses both problems?
- ASummarise older turns into a compact memory and keep the most recent turns verbatim in the context
- BSend the full transcript with every request and raise the context limit so that nothing is ever dropped
- CReset the conversation after every user message, so that each request starts with an empty context
- DIncrease the maximum output tokens to 8,000, so that the model has more room to remember earlier answers
Show answer and explanationHide answer
Correct answer: AA rolling summary of older turns keeps the important facts while recent turns stay exact, which bounds the context size and cost. Sending the whole transcript keeps growing the cost. Resetting removes memory entirely, and a larger output limit does not change what the model receives as input.
Question 5
Users search a product catalogue for exact model codes such as AX-2200-B, which dense embeddings match poorly. Which retrieval method helps most?
- ARandom sampling of catalogue chunks, followed by a reranker that reads them all
- BDense vector search alone, using a larger embedding model with more dimensions
- CA summary sentence for each product code, indexed as a single paragraph of text
- DHybrid search that combines keyword scoring such as BM25 with vector similarity
Show answer and explanationHide answer
Correct answer: DHybrid search adds keyword scoring, which matches exact tokens such as model codes, to the semantic signal. A larger dense model still struggles with exact codes. Summaries lose the codes themselves, and random sampling does not retrieve the matching product.
Assembling and Deploying Apps (5 questions)
Question 6
A RAG application must be deployed as a REST endpoint, with a review app that stakeholders can use to test answers. Which Databricks capability fits this need?
- AA notebook scheduled to run each hour and write its output to a shared dashboard for stakeholders
- BAgent Framework deployment, which creates a Model Serving endpoint and a review app for the agent
- CPublishing the notebook as a read-only dashboard and sharing its link with the stakeholder group
- DUploading the agent's Python file to the workspace as a text file, so that other users can download it
Show answer and explanationHide answer
Correct answer: BAgent Framework deployment creates a Model Serving endpoint for the agent and a review app for stakeholder testing, in one managed step. A scheduled notebook produces batch output, not an interactive REST endpoint. A dashboard and a text file do not serve the agent to applications.
Question 7
A serving endpoint receives traffic in unpredictable bursts, and the team wants to pay nothing while it is idle. Which configuration best meets this requirement?
- AA fixed count of twenty replicas, sized so that the largest expected burst is served without queuing
- BAutoscaling on the serving endpoint with scale-to-zero enabled, so that replicas stop when there is no traffic
- CA dedicated all-purpose cluster running the model continuously, so that the model is always loaded in memory
- DAn endpoint that is disabled by an administrator between 9 AM and 5 PM each day to limit spend
Show answer and explanationHide answer
Correct answer: BAutoscaling with scale-to-zero stops replicas when idle, which removes compute cost during quiet periods and scales up for bursts. A fixed fleet and a continuously running cluster both pay for idle time. Manually disabling the endpoint breaks availability and does not adapt to demand.
Question 8
A team needs the same application deployed to development and production workspaces, with changes made through version control. Which Databricks tool is designed for this?
- AExporting a single notebook folder as an archive and sending it to the production administrator by email
- BManual export of notebooks from the development workspace and import into production through the browser
- CCopying the production workspace folder by folder with the Workspace copy option after each change
- DDatabricks Asset Bundles, which define jobs, pipelines and apps as code and deploy them to each target
Show answer and explanationHide answer
Correct answer: DDatabricks Asset Bundles describe resources as code and deploy the same definition to multiple targets, which keeps environments consistent. Manual exports and copies depend on people and drift over time. An archive emailed to an administrator is not a repeatable deployment path.
Question 9
A new version of a prompt and retrieval configuration must be rolled out to a serving endpoint, with a quick way back to the previous version. Which practice is correct?
- ADeploy whichever notebook revision is most recent, and let the team check its history in version control later
- BOverwrite the prompt in place in the notebook, and keep no record of the earlier wording
- CStore the prompt text in a comment on the endpoint, so that the previous text can be copied back if needed
- DRegister each version in the MLflow or Unity Catalog model registry and point the endpoint at a specific version
Show answer and explanationHide answer
Correct answer: DRegistering each version gives a named, immutable record, and pointing the endpoint at a specific version makes rollback a single change. Overwriting in place or storing text in a comment loses the history needed for rollback. Deploying the latest notebook revision makes each release depend on whatever was saved last.
Question 10
An application calls an external LLM provider and needs an API key. Where should the key be stored so that it is not exposed in code or notebook output?
- AIn a Databricks secret scope, referenced by the deployment configuration
- BAs a string constant in the notebook, marked as hidden in the cell output panel
- CIn the repository README, with a note that the file is private to the project team
- DIn a cluster environment variable that every user of the cluster can read from a notebook
Show answer and explanationHide answer
Correct answer: AA Databricks secret scope stores the key outside code, and the deployment references it so the value is not written in source or outputs. Notebook constants and READMEs expose the key to anyone who reads the code. Cluster environment variables are readable by users of the cluster, so they are not a private store.
Data Preparation (5 questions)
Question 11
Long technical PDFs are split into fixed-size chunks for retrieval. Answers often miss information that spans a section break. Which change is most likely to help?
- AUse chunks that respect section boundaries, with a small overlap between adjacent chunks
- BStore each PDF as a single row and retrieve the entire file for every query, regardless of its length
- CRemove headings and tables from the source documents, because they add tokens that the model does not need
- DSplit on fixed token counts with no overlap, and keep only the first chunk of each section in the index
Show answer and explanationHide answer
Correct answer: ARespecting section boundaries keeps related content together, and a small overlap preserves context that crosses a split. Keeping only the first chunk of a section discards the rest of it. Removing headings and tables throws away the structure that helps retrieval, and retrieving whole files for every query exceeds context limits.
Question 12
A vector index must stay synchronised with a Delta table of documents that change every day. Which Databricks option fits this requirement?
- AA file listing of the storage location, run by a cron job that copies the output into the vector index
- BA Direct Vector Access index that a notebook rebuilds from scratch by hand each time a document changes
- CA Delta Sync index on the source table, with Change Data Feed enabled so that updates flow to the index
- DAn autoscaling policy on the Model Serving endpoint, so that the index grows as the document count rises
Show answer and explanationHide answer
Correct answer: CA Delta Sync index keeps the index in step with a Delta source table, and Change Data Feed carries the changes so the sync can be incremental. A Direct Vector Access index is updated by the application rather than synced from a table. File listing with cron is fragile, and endpoint autoscaling changes compute, not index content.
Question 13
Users should retrieve answers only from documents owned by their own department. Which approach best enforces this during retrieval?
- ATell the model in the system prompt not to use documents from other departments
- BCreate a separate vector index for every individual user in the company
- CFilter vector search results on a governed department metadata column stored with each chunk
- DRemove department names from the document text, so that retrieval cannot match a department
Show answer and explanationHide answer
Correct answer: CFiltering on a metadata column applied in retrieval means documents from other departments are never returned to the model, which is enforcement rather than a request. A prompt instruction can be bypassed by a crafted question. One index per user does not scale, and removing names from text does not stop retrieval from matching content.
Question 14
A corpus contains many copies of the same document, which skew retrieval toward repeated passages. Which step should come first in the ingestion pipeline?
- AAdd more retrieved chunks to each query so that the duplicates are diluted by a larger result set
- BDeduplicate documents on a content hash while writing them into a Delta table
- CIncrease the embedding dimensionality so that near-identical passages are separated in vector space
- DSwitch to a larger generation model, which tends to ignore repeated passages in the retrieved context
Show answer and explanationHide answer
Correct answer: BDeduplicating by content hash at ingestion removes exact copies before they reach the index, which fixes the cause. Retrieving more chunks spreads the duplicates across the results rather than removing them. Changing embedding size or generation model does not change the stored duplicates.
Question 15
A team wants retrieval results to be more accurate for a corpus of web pages and manuals. Which two steps help most? (Choose two.)
- ARemove repeated boilerplate such as navigation menus, headers and footers before chunking the text
- BEmbed only the file names of each document, because names summarise the document content well
- CStore each document as one chunk regardless of its length, so that no content is split across rows
- DAttach the document title, source and version as metadata that retrieval can filter on
- EIncrease the number of retrieved results to one thousand so that the correct passage is always included
Show answer and explanationHide answer
Correct answer: A, DRemoving boilerplate stops navigation text from competing with real content during retrieval, and metadata lets queries be filtered to the right source or version. File names alone lose most of the content. One chunk per document makes very long chunks that dilute relevance, and a thousand results overload the model's context.
Design Applications (5 questions)
Question 16
A company wants one assistant that answers questions about HR policies and a second capability that books meeting rooms through an internal API. Which design is most appropriate?
- AA model fine-tuned on every past booking record, so that it can answer policy questions and make bookings itself
- BOne large prompt that answers policy questions from memory and handles bookings in plain text without any tools
- CA single agent that retrieves policy passages with RAG and calls a booking function registered as a tool
- DA keyword search index over the policy files, with users booking rooms by sending an email to the facilities team
Show answer and explanationHide answer
Correct answer: CDecomposing the problem into retrieval for policy answers and a registered tool for bookings lets each capability be tested and governed separately. A prompt with no tools cannot perform the booking action, and fine-tuning on booking records does not give reliable access to live room availability. Keyword search returns documents rather than answers, and email booking is not an application design.
Question 17
A team must classify two million short support tickets per day into five fixed categories. Latency matters more than open-ended text quality. Which approach is best?
- ASend each ticket to the largest available reasoning model with a long prompt that explains every category
- BTrain a new foundation model from scratch on the ticket history so that the model owns the labels
- CUse a smaller model with a constrained output format, and batch the requests to the serving endpoint
- DAsk an agent with web search to look up the most likely category for each ticket and record its answer
Show answer and explanationHide answer
Correct answer: CA smaller model with a constrained output format and batched requests meets high volume and low latency at lower cost for a fixed label set. The largest reasoning model is slow and expensive at this volume, and training from scratch is far beyond what the task needs. Web-searching agents add latency and do not fit a closed set of labels.
Question 18
A retrieval-augmented assistant gives fluent answers that sometimes add facts not present in the retrieved passages. Which evaluation metric most directly measures this problem?
- AGroundedness of each answer against the retrieved context
- BPerplexity of the model on a general-purpose text corpus
- CAverage latency of the serving endpoint over the last hour
- DNumber of tokens returned in each response to the user
Show answer and explanationHide answer
Correct answer: AGroundedness checks whether each claim in the answer is supported by the retrieved context, which is the failure described. Perplexity measures how well the model predicts text in general and does not check the source. Latency and token counts are operational measures that say nothing about unsupported claims.
Question 19
A team is deciding whether a generative application needs fine-tuning or whether prompting and retrieval are enough. Which two factors most strongly point toward fine-tuning? (Choose two.)
- AThe application must hold a consistent output style or format that prompting does not reliably maintain
- BThe company prefers a particular colour scheme for the application's user interface and logo
- CThe application serves about two thousand users per day, which is a high enough volume to justify training
- DThe domain vocabulary is handled poorly by the base model, and labelled examples of good outputs exist
- EThe application is deployed in a specific cloud region chosen for data residency reasons
Show answer and explanationHide answer
Correct answer: A, DFine-tuning helps when a consistent format or style is hard to hold through prompts alone, and when the base model handles the domain poorly and labelled examples exist. User volume, branding and region do not change whether the model needs to learn new behaviour. Retrieval handles knowledge that changes, so those factors do not favour training.
Question 20
A product team wants a chatbot that answers account questions, looks up live balances, and escalates disputes to a human queue. Which decomposition is most sound?
- AOne prompt that describes all three behaviours, with the balance figures pasted into the prompt by the developer each morning
- BSeparate policy retrieval, a live balance tool and an escalation tool
- CA model fine-tuned on last year's chat transcripts, expected to know current balances and to route disputes correctly
- DA static FAQ page that links users to the bank's website, with disputes handled through the contact form
Show answer and explanationHide answer
Correct answer: BSplitting the work into policy retrieval, a live balance tool and an escalation tool keeps each responsibility testable and lets live data come from the source of truth. Pasting balances into a prompt goes stale within hours, and a fine-tuned model cannot know current balances. A static FAQ page offers no automated handling at all.
Evaluation and Monitoring (5 questions)
Question 21
A team has 500 labelled test questions and wants to measure whether a RAG application's answers are correct and grounded, repeatedly, after each change. Which approach fits best?
- AAsk one reviewer to read a few answers at random each week and record an impression of overall quality
- BRun Mosaic AI Agent Evaluation on the labelled evaluation set and compare the metrics between versions
- CTrack only the average response length, because longer answers are usually more complete and correct
- DCount the tokens in each response, which indicates how much information the model has provided to users
Show answer and explanationHide answer
Correct answer: BAgent Evaluation runs the labelled set through the application and reports metrics such as correctness and groundedness, so versions can be compared repeatedly. Random spot checks are slow and subjective. Length and token counts do not measure correctness.
Question 22
A deployed model's incoming requests have changed over several weeks, and quality scores are slipping. Which Databricks feature helps the team detect this drift on its inference data?
- ANotebook run history, which lists when each notebook was executed by the team in the workspace
- BCluster autoscaling metrics, which show how many workers were added or removed during each hour
- CSpark UI stage timings, which show how long each transformation took during the last batch run
- DLakehouse Monitoring applied to the inference table that records the endpoint's requests and responses
Show answer and explanationHide answer
Correct answer: DLakehouse Monitoring computes profile and drift metrics over the inference table, so changes in request data and output quality are tracked over time. Cluster autoscaling and Spark stage timings describe compute behaviour rather than data drift. Notebook history records activity and not model inputs.
Question 23
Which two signals indicate that a deployed RAG application needs investigation? (Choose two.)
- AA rising share of production answers with groundedness scores below the agreed threshold in the logs
- BLower CPU usage on the training cluster in the development workspace during the last week
- CA falling retrieval relevance score on a sample of recent production queries that are reviewed
- DA notebook was renamed by a team member, which changes its path in the workspace folder
- EA new team member was added to the project, which changes the access list for its workspace
Show answer and explanationHide answer
Correct answer: A, CFalling groundedness and falling retrieval relevance on production traffic are direct quality signals that a change or drift has harmed answers. Training-cluster CPU, a renamed notebook and a new project member do not show anything about answer quality.
Question 24
A team wants to know whether a new prompt improves answers before it is released. The labelled test set has 300 questions. Which evaluation design is most reliable?
- ATest the new prompt on the three questions the developer found most interesting that week, and release it if they improve
- BRun both prompts on the same labelled set, score the answers with the same metrics, and compare the results
- CCompare the average answer length of the old and new prompts, since longer answers tend to be more complete
- DAsk the people who wrote the new prompt to judge whether its answers look better than the old ones
Show answer and explanationHide answer
Correct answer: BRunning both prompts on the same labelled set with the same metrics gives a fair, repeatable comparison. Hand-picked questions and length are biased or irrelevant to correctness. Judgement by the authors of the change is not an independent evaluation.
Question 25
Monitoring shows that answers from a deployed agent are getting slower, and users report long waits. Which metric should the team inspect first to find the cause?
- AThe number of notebooks created by the team in the last month, which indicates the volume of development work
- BPer-step latency in MLflow traces, to see whether retrieval, the model call or a tool call is the slow step
- CThe size of the source repository, which grows over time as the team adds new code and documentation
- DThe total number of pages in the internal wiki, which reflects how much documentation the team has written
Show answer and explanationHide answer
Correct answer: BPer-step latency in traces shows where time is spent in a multi-step agent, which points to the step that slowed down. Notebook counts, repository size and wiki pages describe the team's work rather than request time. They have no bearing on why answers are slow.
Governance (5 questions)
Question 26
A team must show which tables, models and functions feed a deployed RAG application, so that auditors can trace data from source to answer. Which Unity Catalog feature provides this?
- ANotebook revision history
- BCluster event logs
- CData lineage
- DJob run history
Show answer and explanationHide answer
Correct answer: CUnity Catalog lineage records how tables, models and functions are connected, which supports tracing from source data to the deployed application. Cluster logs record compute events, not data flow. Job and notebook histories show runs and edits, not the relationships between governed assets.
Question 27
Personal data in a source table must not appear in answers from a generative application that reads that table. Which control best fits this requirement?
- AEncrypt every generated answer with a password that is shared only with the application's approved users
- BMask or exclude the personal columns with Unity Catalog column controls before the data is indexed or queried
- CRate-limit each user to five queries per day, so that personal data cannot be extracted in bulk
- DAdd a prompt instruction telling the model not to reveal personal data in any answer it generates
Show answer and explanationHide answer
Correct answer: BColumn-level controls and masking remove personal data before the model can see it, which enforces the rule at the data layer. A prompt instruction can be bypassed by a crafted question. Encrypting answers does not stop disclosure to people who have the password, and a rate limit does not stop a single disclosure.
Question 28
A team must restrict which users can query a governed vector index and which can change it. Which approach follows least privilege in Unity Catalog?
- AMake the index readable by all workspace users and rely on a naming convention to tell readers from editors
- BQuery permission for consumers, change permission only for data engineers
- CGrant every user the owner role on the catalog so that nobody is blocked by a permission error during work
- DStore the index in a personal schema of one engineer, and share the engineer's login with the team when needed
Show answer and explanationHide answer
Correct answer: BSeparate grants for query and change, given to different groups, match least privilege and keep the write path with the people who maintain the data. Catalog ownership gives far more than needed. Naming conventions do not enforce anything, and sharing a personal login removes accountability.
Question 29
An auditor asks for evidence of which users and applications accessed sensitive tables that feed a RAG application during the last quarter. Which source provides this?
- AThe dashboard refresh schedule, which shows when reports were last updated for each business team
- BThe cluster driver logs, which list every Spark job that ran on the shared all-purpose cluster
- CUnity Catalog audit logs and system tables
- DThe notebook comments written by developers, which often describe the purpose of each query run
Show answer and explanationHide answer
Correct answer: CUnity Catalog audit logs and system tables record access to governed objects, which is the evidence an auditor needs. Driver logs record Spark execution rather than data access by user. Notebook comments and dashboard schedules do not record who accessed what.
Question 30
Sensitive prompt content must not leave the governed Databricks environment. Which control enforces this requirement for model calls?
- AStore each prompt as a comment on the endpoint, so that the team can review what was sent later
- BAdd a sentence to the system prompt that asks the model not to send any data to outside services
- CEncrypt the prompt text before sending it, and trust the external provider to decrypt it on its side
- DRoute model calls only to endpoints hosted inside the platform, and block external endpoints through policy
Show answer and explanationHide answer
Correct answer: DRestricting calls to in-platform endpoints and blocking external ones through policy enforces the boundary, regardless of what the application does. A system prompt instruction cannot control where data goes. Encrypting a prompt for an external provider still sends the data out, and storing prompts as comments does not limit exposure.