Home / Databricks Certified Generative AI Engineer Associate / Mock exam
Databricks Certified Generative AI Engineer Associate Exam-style mock test

Databricks Generative AI Engineer Associate Practice Exams|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Designing GenAI Applications (prompt engineering, model selection, chains)
A B2B SaaS analytics vendor is building an in-app assistant that answers short product-usage questions for thousands of concurrent users. Responses must return in under two seconds, costs must stay low, and the questions are relatively simple. Which model selection strategy best fits these requirements?
✓Choose a small, instruction-tuned foundation model that meets the quality bar for simple questions while keeping per-token cost and latency low
Correct. A smaller instruction-tuned model that still clears the quality bar for simple questions minimizes latency and cost, matching the stated requirements.
・Choose the largest available frontier model so that answer quality is maximized regardless of the per-request latency and token cost implications
Incorrect. The largest frontier model maximizes quality but typically increases latency and per-token cost, violating the sub-two-second and low-cost constraints.
・Route every request through two large models and compare their outputs, returning the answer that both models agree on to maximize correctness
Incorrect. Running two large models per request roughly doubles cost and adds latency, which directly conflicts with the requirements.
・Fine-tune a model on the entire product documentation corpus so it memorizes answers and never needs any retrieval at request time
Incorrect. Fine-tuning to memorize docs is expensive, brittle to content changes, and unnecessary for simple questions that a small model can answer.
Explanation
Model selection is a tradeoff: match model size to task difficulty. Simple, high-volume, latency-sensitive tasks favor a smaller instruction-tuned model rather than the largest or most redundant option.
Example2 · Data Preparation and Retrieval (RAG, chunking, embeddings, vector search)
A B2B SaaS company is building a RAG assistant over its product knowledge base, which consists of long technical help articles with clear markdown headings for each feature. Retrieval often returns chunks that mix unrelated features, confusing the model. Which chunking approach best addresses this?
・Split each article into fixed 2,000-character chunks with no overlap so every chunk is exactly the same size for the embedding model to process uniformly across the entire corpus
Incorrect. Arbitrary fixed-size splits ignore the document's semantic structure and will still cut across feature boundaries, which is the exact cause of the mixed-feature chunks.
✓Split along the markdown heading structure so each chunk maps to one feature section, with a small overlap
Correct. Structure-aware (heading-based) chunking keeps each feature section intact so retrieved chunks stay topically coherent, and light overlap preserves cross-boundary context.
・Embed each full article as a single chunk regardless of length
Incorrect. Whole-article chunks are too large, dilute relevance, and can exceed embedding token limits while retrieving unrelated features together.
・Split every article into one chunk per sentence
Incorrect. Sentence-level chunks are too granular, fragmenting a feature's explanation and hurting retrieval of complete answers.
Explanation
Chunking should respect the document's natural structure; heading-based splitting aligns chunk boundaries with semantic units, directly solving the mixed-topic retrieval problem.
Example3 · Application Development (LangChain, tools, agents, guardrails)
A B2B SaaS company is building a support-answering app on Databricks. An engineer must wire together a retriever over the product-docs vector index, a prompt that injects the retrieved passages, and a chat model, so one call takes a user question and returns a grounded answer. Using LangChain Expression Language (LCEL), which composition correctly produces this behavior?
・Call the chat model first on the raw question, then pass its output into the retriever and finally into the prompt template to format the final answer for the user
Incorrect. Calling the model before retrieval means the answer is generated without the grounding passages, so retrieval adds nothing.
✓Build a RunnableParallel that fetches context from the retriever and passes the question through, feed both into the prompt, then into the chat model
Correct. Running the retriever and the pass-through question in parallel, merging them into the prompt, then invoking the model is the standard LCEL RAG chain that grounds the answer.
・Invoke the retriever and the chat model as two completely separate, unconnected calls and concatenate their string outputs
Incorrect. Unconnected calls never inject retrieved context into the model prompt, so the model answers without grounding.
・Put the prompt template at the very start so it formats the question, then send that directly to the retriever to generate the answer text
Incorrect. A retriever consumes a query to fetch documents; it does not generate answer text from a formatted prompt.
Explanation
A grounded RAG chain must fetch context and merge it with the question into the prompt before the model runs; RunnableParallel plus prompt plus model is the canonical LCEL pattern.
Example4 · Assembling and Deploying (Model Serving, MLflow, Mosaic AI)
A healthcare services firm has registered a clinical-summary RAG chain in Unity Catalog and wants to expose it as a real-time REST API for its patient-portal app. Which Databricks capability should the engineer use to serve this chain behind a scalable HTTPS endpoint?
✓Mosaic AI Model Serving, which deploys the registered Unity Catalog model to a managed, autoscaling REST endpoint
Correct. Mosaic AI Model Serving takes a model registered in Unity Catalog and hosts it on a managed, autoscaling REST endpoint, which is exactly how a RAG chain is exposed for real-time app calls.
・Delta Live Tables, configured to stream the chain outputs into a materialized gold table for the app
Incorrect. Delta Live Tables builds batch and streaming data pipelines into tables; it does not provide a low-latency REST serving endpoint for a model.
・Databricks SQL Warehouse, by wrapping the chain in a SQL user-defined function queried by the app
Incorrect. A SQL Warehouse executes analytic SQL and cannot host a GenAI chain as a real-time HTTPS inference endpoint for an app.
・A Databricks Job, scheduled to run the chain on a cron trigger and write predictions to a volume
Incorrect. A scheduled Job runs batch workloads on a timer and cannot satisfy the real-time request/response pattern the patient portal requires.
Explanation
Real-time serving of a registered GenAI model or chain is the job of Mosaic AI Model Serving, which provides a managed autoscaling REST endpoint.
Example5 · Governance, Evaluation, and Monitoring (Unity Catalog, evaluation, safety)
A healthcare services firm builds a RAG assistant that retrieves from a vector index of de-identified patient discharge notes. Compliance requires that only members of the clinical-support group can query the underlying source table, while data engineers must not read its rows. Which Unity Catalog approach enforces this most directly?
✓Grant SELECT on the source table to the clinical-support group only, and withhold SELECT from the data-engineering group so row access follows the catalog's privilege model.
Correct. Unity Catalog governs access through object privileges, so granting SELECT to the clinical-support group and not granting it to data engineers enforces the requirement at the data layer.
・Store the discharge notes in a DBFS folder and manage access by distributing a shared access token to the clinical-support group members through a secret scope.
Incorrect. DBFS folders with shared tokens bypass Unity Catalog's privilege model and provide no per-group row governance for the table.
・Make the table publicly readable within the workspace and rely on the application layer to filter which users are allowed to issue retrieval calls.
Incorrect. Relying on the application layer leaves the table itself readable, so the governance control is not enforced where the data lives.
・Export the notes into a separate workspace and give the data-engineering group a read-only mount of that workspace's object storage.
Incorrect. Copying data to another workspace multiplies the governed surface and still exposes rows to data engineers via the mount.
Explanation
Unity Catalog enforces access via GRANT/REVOKE on securable objects; granting SELECT only to the authorized group is the direct, catalog-native control.
Example6 · Designing GenAI Applications (prompt engineering, model selection, chains)
A healthcare services firm is building a patient-message triage assistant that must summarize incoming portal messages and run on Databricks with strict PHI handling, low per-message latency, and a tight cost ceiling for high volume. The summaries are short and the task is well-defined. Which model selection best fits these requirements?
✓A small, instruction-tuned foundation model served on Databricks Model Serving, because the task is narrow and benefits from low latency and low cost
Correct. A small instruction-tuned model matches a narrow, well-defined summarization task while meeting the latency and cost constraints, and serving it on Databricks keeps PHI within the governed environment.
・A large general-purpose frontier model accessed through an external provider endpoint, because larger models always produce the most reliable clinical summaries regardless of the task scope
Incorrect. Routing PHI to an external provider and assuming a larger model is always better ignores the cost, latency, and data-governance requirements that drive this selection.
・The largest available open model fine-tuned on general web text, since broad knowledge guarantees the best triage outcome
Incorrect. Picking the largest model purely for broad knowledge does not fit a narrow task and violates the cost and latency ceilings.
・A text-to-image diffusion model configured for summarization
Incorrect. A diffusion model generates images and cannot perform text summarization.
Explanation
Model selection must map task scope and non-functional requirements (latency, cost, governance) to the model; a narrow summarization task under cost and PHI constraints favors a small instruction-tuned model served in-platform.
Example7 · Designing GenAI Applications (prompt engineering, model selection, chains)
UrbanThread, an online apparel retailer, is building a feature that auto-generates short, on-brand product blurbs for thousands of new SKUs uploaded each day. The team needs high throughput and the lowest possible per-request cost, and the blurbs are short and formulaic. Which model-selection approach best fits these requirements?
・Pick the largest available frontier reasoning model so every blurb has maximum writing quality regardless of the recurring token cost across the daily SKU batches
Incorrect. A frontier reasoning model maximizes cost and latency, which directly conflicts with the high-throughput, lowest-cost requirement for short formulaic text.
✓Use a smaller, cheaper instruction-tuned model and validate blurb quality on a sample before the full batch run
Correct. For short, formulaic, high-volume text, a smaller instruction-tuned model minimizes cost and latency, and sampling validates that quality is acceptable before scaling.
・Route each SKU to a different random model so the catalog shows varied writing styles across all the product pages
Incorrect. Random model routing adds inconsistency and uncontrolled cost without addressing throughput or brand consistency.
・Disable any model and have the merchandising team hand-write every blurb to guarantee perfect quality
Incorrect. Manual authoring cannot scale to thousands of daily SKUs and defeats the purpose of a GenAI feature.
Explanation
Model selection balances capability against cost and latency; a simple, high-volume task is best served by the smallest model that passes a quality sample.
Example8 · Designing GenAI Applications (prompt engineering, model selection, chains)
UrbanThread needs its product-tagging LLM to return structured output that a downstream parser can reliably ingest as JSON with keys 'category' and 'fabric'. Occasionally the model wraps its answer in prose. What is the most effective prompt-engineering change to make the output reliably parseable?
・Raise the temperature so the model explores more varied phrasings and eventually settles on clean JSON across repeated retries for every product
Incorrect. Higher temperature increases output variability, making structured JSON less reliable, not more.
✓Instruct the model to respond with only a JSON object using the exact keys and show a one-shot example of the expected JSON
Correct. Explicitly specifying the schema keys plus a one-shot example strongly constrains the format and is the standard technique for reliable structured output.
・Append the word 'JSON' to the end of the user question and hope the model infers the format
Incorrect. Merely appending 'JSON' gives no schema or example and leaves formatting to chance.
・Switch to a larger model and keep the same loosely worded prompt
Incorrect. A larger model does not fix an underspecified prompt; the format instruction is the real gap.
Explanation
Reliable structured output comes from explicit schema instructions and examples, not from model size or temperature changes.
Example9 · Designing GenAI Applications (prompt engineering, model selection, chains)
UrbanThread wants to turn raw customer reviews into a weekly summary that first extracts complaints, then clusters them by theme, then drafts an executive paragraph. A single giant prompt produces inconsistent results. How should the engineer restructure this as a chain?
・Keep one prompt but make it much longer and add many more instructions describing every extraction, clustering, and drafting rule in a single pass over the reviews
Incorrect. A single longer prompt still forces the model to juggle everything at once, which is the source of the inconsistency.
✓Split the task into sequential steps where each step's output feeds the next step's input
Correct. Decomposing into sequential steps where each output feeds the next is the core chaining pattern that improves reliability on complex tasks.
・Run three independent prompts on the same reviews and concatenate their raw outputs with no ordering
Incorrect. Running independent prompts with no ordering loses the dependency between extraction, clustering, and drafting.
・Ask the model to do all three tasks but only read the final paragraph
Incorrect. Ignoring intermediate outputs discards the structure that makes chaining valuable and does not fix inconsistency.
Explanation
Chaining decomposes a complex task into ordered steps whose intermediate outputs become inputs to later steps, improving control and reliability.
Example10 · Designing GenAI Applications (prompt engineering, model selection, chains)
A financial services firm is building an assistant that must classify customer complaints into one of six regulatory categories. Early tests show the model drifts toward free-form summaries instead of a single category label. Which prompt engineering adjustment most directly fixes this?
✓Add a few labeled examples that each map a complaint to exactly one category, and instruct the model to reply with only the category name
Correct. Few-shot examples plus an explicit output-format instruction constrain the model to emit a single category label, directly countering the free-form drift.
・Raise the temperature so the model explores more category phrasings before settling on its final answer for each complaint
Incorrect. Raising temperature increases output variability, making the model more likely to produce inconsistent free-form text rather than a fixed label.
・Prepend the firm's entire complaints policy document to every request so the model always has the full regulatory context available
Incorrect. Dumping the full policy adds context cost and noise without constraining the output format that is causing the drift.
・Ask the model to think step by step and produce a detailed paragraph explaining its reasoning for each complaint it reviews
Incorrect. Asking for a detailed reasoning paragraph encourages exactly the free-form verbosity you want to eliminate.
Explanation
Constraining the output with few-shot label examples and a format instruction is the targeted fix for classification drift.
Example11 · Designing GenAI Applications (prompt engineering, model selection, chains)
A bank needs a real-time chat assistant for branch tellers that answers simple account FAQs under 300 ms per turn at very high volume, with a tight per-request budget. Which model selection approach best fits these constraints?
・Select the largest available frontier model because its superior reasoning will improve every answer the tellers receive
Incorrect. The largest frontier model typically has higher latency and cost, violating the sub-300 ms and tight-budget constraints.
✓Pick a smaller, faster instruction-tuned model sized to the FAQ task and benchmark its latency and cost
Correct. For simple FAQs under strict latency and cost limits, a smaller fast model benchmarked against the targets is the right fit.
・Route every teller request through an ensemble of three large models and return the majority answer to maximize accuracy
Incorrect. An ensemble of three large models multiplies latency and cost, which is the opposite of what the constraints demand.
・Fine-tune a large model on the FAQ data so it memorizes answers and no model selection is required later
Incorrect. Fine-tuning a large model still leaves you serving a slow, expensive model and does not address the latency budget.
Explanation
Matching model size to a simple task while benchmarking latency and cost satisfies the real-time, high-volume, low-budget requirements.
Example12 · Designing GenAI Applications (prompt engineering, model selection, chains)
A manufacturing distributor builds a chatbot that lets warehouse staff ask short questions about part availability. Responses must return in under one second during peak order hours, and the task is simple factual lookup with light phrasing. Which model-selection approach best fits these requirements?
✓Pick a smaller, faster foundation model served on Databricks that meets the quality bar for simple lookups at low latency
Correct. For a simple, latency-sensitive lookup task, a smaller fast model that still clears the quality threshold is the right trade-off.
・Choose the largest available frontier model to guarantee the highest possible answer quality for every single staff question
Incorrect. The largest frontier model adds latency and cost that a simple sub-second lookup task does not justify.
・Route every request through two large models and compare outputs so the system can always return the most accurate possible response
Incorrect. Running two large models per request multiplies latency and cost, violating the sub-second requirement.
・Fine-tune a very large model on the full parts catalog so it memorizes all part numbers before answering any query
Incorrect. Fine-tuning a very large model is unnecessary overhead for a lookup that retrieval or a small model handles faster.
Explanation
Model selection balances latency, cost, and quality; a simple low-latency task favors a smaller fast model that meets the quality bar rather than the largest or most redundant option.
Example13 · Designing GenAI Applications (prompt engineering, model selection, chains)
A distributor wants a model to extract shipment fields (carrier, tracking number, ETA) from free-text emails and return them so a downstream pipeline can parse them reliably. Which prompt change most directly improves machine-parseable output?
✓Instruct the model to respond only with a JSON object containing the exact keys carrier, tracking_number, and eta
Correct. Demanding a strict JSON object with fixed keys gives the downstream parser a predictable, machine-readable structure.
・Tell the model to write a friendly paragraph summarizing the shipment details for the operations team to read
Incorrect. A free-form paragraph is hard to parse reliably and defeats structured extraction.
・Ask the model to be as detailed and thorough as it possibly can when describing everything about the shipment
Incorrect. Maximizing verbosity adds noise and unpredictability, hurting reliable field parsing.
・Raise the temperature so the model produces more varied and creative phrasing for each extracted email
Incorrect. Higher temperature increases variability, which is the opposite of what structured extraction needs.
Explanation
Constraining output to a strict JSON schema with named keys is the standard prompt technique for reliable downstream parsing.
Example14 · Designing GenAI Applications (prompt engineering, model selection, chains)
A telecom operator is building a chatbot that classifies inbound SMS support messages into one of eight intent labels. Traffic peaks at thousands of messages per minute, the task is simple, and leadership wants to minimize per-call cost and latency on Databricks Model Serving. Which model selection approach best fits these requirements?
・Choose the largest available frontier chat model so that classification accuracy is maximized regardless of inference cost
Incorrect. A frontier model maximizes capability but adds unnecessary latency and cost for a simple eight-label classification task that a smaller model handles well.
✓Select a small instruction-tuned model sized to the classification task, validating accuracy on a labeled sample
Correct. For a narrow, high-volume classification task, a small instruction-tuned model minimizes latency and cost while a labeled sample confirms accuracy is acceptable.
・Route every message through two different large models and compare their outputs before returning a label
Incorrect. Calling two large models per message multiplies cost and latency, directly conflicting with the stated low-cost, low-latency goals.
・Use an embedding-only model and apply a nearest-neighbor lookup against stored message vectors for every request
Incorrect. Embedding plus nearest-neighbor can classify but adds a vector store dependency and tuning overhead that a direct small instruction model avoids here.
Explanation
Model selection balances capability against cost and latency. A simple, high-throughput classification task should use the smallest model that meets an accuracy bar validated on labeled data, not an oversized frontier model.
Example15 · Designing GenAI Applications (prompt engineering, model selection, chains)
A telecom operator's billing assistant must return answers strictly as JSON with the keys account_id, balance_due, and due_date so a downstream service can parse them. The model currently returns conversational prose. Which prompt engineering change most reliably produces parseable structured output?
・Raise the temperature parameter so the model explores more diverse phrasings of the billing answer
Incorrect. Higher temperature increases output variability, which makes format adherence less reliable, not more.
・Append the phrase please be accurate to the end of every user question submitted
Incorrect. Vague accuracy requests do not constrain output structure and will not stop the model from returning prose.
✓Instruct the model to output only a JSON object with those exact keys and provide one example of the expected format
Correct. Explicit format instructions naming the exact keys plus a concrete example are a standard, reliable way to elicit parseable structured output.
・Increase the maximum token limit so the model has room to add explanatory sentences around the JSON
Incorrect. Raising the token limit gives room for more prose and does not constrain the response to a parseable JSON object.
Explanation
Structured output is best obtained by explicitly specifying the schema and showing an example in the prompt. Tuning temperature or token limits does not enforce format.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)