Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Databricks Certified Generative AI Engineer Associate Databricks-Generative-AI-Engineer-Associate Exam Questions

Last updated: · 11 practice questions with answers and explanations

Page: 1 / 9 Total 90 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Design Applications

Skill tested: Selects prompt structure and output constraints to elicit reliably formatted model responses.

A claims-operations team uses an LLM to classify incoming notes into a downstream JSON workflow. The consumer requires exactly three keys: `category`, `urgency`, and `summary`; `urgency` must be one of `low`, `medium`, or `high`. The model often adds prose before the JSON or invents new urgency labels. The team needs to improve adherence through prompt design, without adding a separate parsing or validation service. Which change is the best first step?

Correct Answer: C. Add explicit instructions defining the exact keys, allowed urgency values, and requirement to return only valid JSON, then provide a representative input-output example.
Explanation:

Explicitly specifying the required keys, permitted enum values, and JSON-only response addresses both the structural and vocabulary failures. A representative example further clarifies the expected format. Concision alone does not constrain the schema, removing a required field violates the consumer contract, and placing a schema after user content without clear instructions may not resolve the behavior. Higher temperature generally increases output variability rather than improving adherence.

Question 2

New Single answer

Topic: Design Applications

Skill tested: Matches a business requirement to an appropriate LLM task and model capability.

A support organization wants to route short customer messages to one of eight existing queue names. It has a labeled set of historical messages, but the production workflow must return one queue label per message, not a drafted response. The team wants low latency and needs to avoid labels outside the approved list. Which application design best matches this requirement?

Correct Answer: D. Use a classification task with the approved queue names as candidate labels and evaluate it on held-out labeled messages.
Explanation:

The requested output is a single class from a known set, so classification directly matches the business task. Evaluating against held-out labeled examples checks whether the labels and routing behavior meet the operational need. A conversational response introduces unnecessary text and a later inference step; embeddings alone do not enforce the fixed label set; and summarization does not perform the required routing.

Question 3

New Multiple answers

Topic: Data Preparation

Skill tested: Chooses document extraction packages and preserves structure needed for effective RAG chunking.

A legal knowledge assistant must index a mixed collection of digitally generated PDFs and DOCX files. The source documents contain headings, paragraphs, and occasional tables. Legal staff need answers to cite the source section, so the ingestion pipeline must retain useful text and structural metadata. Scanned PDFs are explicitly excluded from this phase, and the team prefers familiar Python libraries rather than building format parsers from scratch. Which two approaches are most appropriate? Select TWO.

Correct Answer: B. Use a PDF text-extraction library such as PyMuPDF for PDF content and capture page-level metadata during extraction.; C. Use `python-docx` to read DOCX paragraphs and tables, retaining heading or section context where available.
Explanation:

PyMuPDF can extract text from digitally generated PDFs and expose page context, while `python-docx` can access DOCX paragraphs and tables. Retaining page or section metadata supports useful citations and later chunking. Reading raw binary bytes does not correctly parse either format. OCR is unnecessary for the explicitly excluded scanned PDFs and does not inherently preserve document structure. A CSV parser cannot interpret PDF or DOCX containers.

Question 4

New Multiple answers

Topic: Data Preparation

Skill tested: Applies a document-aware chunking strategy that respects model context and retrieval needs.

An engineering team is preparing long operational manuals for a RAG assistant. Each manual has hierarchical headings, short procedures, and some very long sections. Retrieved passages must remain understandable without the full manual, and the embedding model has a fixed input-token limit. In evaluation, fixed-size chunks sometimes split a procedure between its steps and sometimes combine unrelated sections. Which two changes best address the problem? Select TWO.

Correct Answer: A. Measure chunk size in tokens and keep each chunk within the embedding model's input limit, with a modest overlap where boundary context is useful.; E. Split first at heading and procedure boundaries, then apply recursive size limits within sections that exceed the token budget.
Explanation:

Document-aware splitting preserves coherent procedures and heading context; recursive subdivision handles unusually long sections without violating the model's input limit. Token-based sizing is more appropriate than character count when the limit is expressed in tokens, and modest overlap can preserve context at necessary boundaries. One chunk per manual is likely too large and harms retrieval granularity. Removing headings or splitting randomly discards valuable structure and may separate steps.

Question 5

New Single answer

Topic: Data Preparation

Skill tested: Sequences chunk persistence operations for Unity Catalog Delta tables.

A data engineer has produced cleaned, token-bounded text chunks from a set of product guides. Each chunk needs a stable identifier, its source path, and section metadata so later retrieval results can cite provenance. The chunks must be stored as a managed Delta table in Unity Catalog. Which sequence is the most appropriate?

Correct Answer: D. Create a DataFrame with chunk text, stable IDs, and source metadata; write it as Delta to a fully qualified Unity Catalog table using an appropriate save mode.
Explanation:

The chunk records should be assembled with their text and provenance fields before being persisted as a Delta table registered under the intended Unity Catalog catalog and schema. A fully qualified managed table gives the data a governed, queryable location. Workspace files and temporary tables do not meet the managed-table requirement, while keeping text in driver memory separates it from the governed records and makes it unavailable as durable table data.

Question 6

New Single answer

Topic: Application Development

Skill tested: Builds retrieval tools that query governed data for the user's specific information need.

A service assistant must answer questions about warranty eligibility. The source is a governed Delta table containing product model, purchase date, warranty terms, and a stable source identifier. Users may ask about one product at a time, and responses must cite the source record. The application should retrieve relevant records rather than expose the whole table to the LLM. Which tool design is best?

Correct Answer: D. Create a tool that accepts a product identifier, applies a parameterized query with the required warranty fields, and returns matching records with source identifiers.
Explanation:

A narrowly scoped retrieval tool directly supports the business lookup, limits the information passed to the model, and returns the stable identifier needed for citation. Parameterized inputs and a constrained query are safer and more predictable than unrestricted model-generated SQL. Returning the entire table is inefficient and unnecessarily exposes data. A similarity score alone cannot establish the warranty terms.

Question 7

New Multiple answers

Topic: Application Development

Skill tested: Uses prompt formatting and user-intent fields to retrieve and ground relevant context.

A travel-policy RAG assistant receives questions such as, "Can I book this hotel for the client visit next Tuesday?" Its indexed policy passages are retrieved, but the generator often treats "next Tuesday" as a policy fact and answers without distinguishing the employee's situation from policy text. The application already extracts the user's intent, travel date, and trip purpose. Which two prompt-design changes best improve grounded answers? Select TWO.

Correct Answer: B. Label retrieved passages as reference context, instruct the model to answer policy questions only from that context, and require it to say when the context is insufficient.; E. Pass extracted intent, travel date, and trip purpose as clearly labeled user-context fields, separate from retrieved policy passages.
Explanation:

Separating intent and trip details from retrieved policy text helps the model use those values as the user's situation, not as policy evidence. Explicitly labeling the retrieved passages and requiring an insufficiency response promotes grounded answers and reduces unsupported claims. An unlabeled block blurs provenance. Treating user claims as policy is unsafe, and removing the question prevents the model from applying the retrieved rules to the actual request.

Question 8

New Single answer

Topic: Application Development

Skill tested: Diagnoses RAG response quality by separating retrieval, grounding, and answer-format failures.

A RAG assistant must answer questions about a technical handbook with concise answers and citations. During review, evaluators find that citations point to relevant sections, but several responses contradict the retrieved passages. The retrieval traces show that the correct sections were present in the context window, and the prompt currently asks the model to "answer helpfully." What is the best next change to test?

Correct Answer: C. Add explicit grounding instructions to answer only from the supplied passages, preserve their meaning, and state when they do not support an answer.
Explanation:

The evidence indicates that retrieval is finding relevant material; the observed failure occurs when generating the answer from that material. Clear grounding instructions and an abstention behavior directly address unsupported or contradictory responses. Retrieving more passages may add noise, removing citations does not correct factual fidelity, and replacing retrieval is not justified when the correct sections are already present.

Question 9

New Single answer

Topic: Assembling and Deploying Applications

Skill tested: Implements preprocessing and postprocessing around a chain packaged as an MLflow pyfunc model.

A team is packaging a question-answering chain for Databricks Model Serving. The chain expects a column named `question` and returns a generated string, while callers must submit a column named `query` and receive a column named `answer` with whitespace trimmed. The chain and its dependencies are already available to the model code. Which implementation best satisfies this interface?

Correct Answer: B. Implement an MLflow `PythonModel` that maps `query` to the chain's `question` input in `predict`, then returns the trimmed result under `answer`.
Explanation:

An MLflow pyfunc wrapper can provide the stable serving contract by preprocessing the request into the chain's expected input and postprocessing its result into the required output. This centralizes behavior for all callers. Endpoint permissions control access, not payload field transformations. Registering a prompt does not automatically adapt the chain interface, and delegating transformations to every client risks inconsistent behavior.

Question 10

New Single answer

Topic: Assembling and Deploying Applications

Skill tested: Controls endpoint access through Databricks permissions and least-privilege identities.

A company serves an internal GenAI application from a Databricks model serving endpoint. The application is the only workload that should invoke the endpoint; data scientists may manage the registered model but should not make production inference requests. The endpoint must remain available to the application when individual employees leave. Which access design best meets these requirements?

Correct Answer: B. Grant endpoint access to the application's stable service principal and assign only the permissions needed to invoke it; keep management permissions separate.
Explanation:

A stable service principal gives the application an identity independent of individual employees. Granting only invocation access follows least privilege, while separating endpoint management avoids giving the workload unnecessary administrative rights. Hiding a URL is not an access control. Individual ownership or a creator's personal token creates avoidable access and lifecycle risks and does not meet the requirement to separate inference from management.

Question 11

New Single answer

Topic: Governance

Skill tested: Selects low-latency masking controls that reduce exposure of sensitive user input.

A customer-support assistant logs user prompts for operational review. Some prompts contain payment-card numbers, and the organization requires those values to be concealed before they reach the LLM and before prompt logs are written. A separate external moderation call is not acceptable because it adds latency. The team can apply deterministic pattern-based processing locally. What is the most appropriate control?

Correct Answer: A. Apply local pattern-based detection and masking to the prompt before model invocation and logging, while preserving non-sensitive text.
Explanation:

Local masking before both inference and logging addresses the two exposure paths without adding the external moderation latency the scenario excludes. Deterministic pattern-based handling is suitable for recognizable payment-card formats, subject to validation against the organization's requirements. Masking only the answer is too late because the original value has already reached the model. Deletion after inference and a prompt instruction do not prevent exposure during processing or in logs.