2 packs: 15% off with code BUY2. 3 or more: 20% off with code BUY3.

Free Databricks Generative AI Engineer Associate Practice Questions

27 free Databricks Generative AI Engineer Associate practice questions from the CertStash pack of 109, each with the correct answer and a full explanation. The rule is the same for every exam: ten free on the product page, 27 free here, all 123 in the pack, and each step includes the one before it.

Question 1

A Generative AI Engineer has been asked to build an LLM-based question-answering application. The application should take into account new documents that are frequently published. The engineer wants to build this application with the least cost and least development effort and have it operate at the lowest cost possible. Which combination of chaining components and configuration meets these requirements?

  1. For the application a prompt, a retriever, and an LLM are required. The retriever output is inserted into the prompt which is given to the LLM to generate answers.
  2. The LLM needs to be frequently with the new documents in order to provide most up-to-date answers.
  3. For the question-answering application, prompt engineering and an LLM are required to generate answers.
  4. For the application a prompt, an agent and a fine-tuned LLM are required. The agent is used by the LLM to retrieve relevant content that is inserted into the prompt which is given to the LLM to generate answers.
Show answer and explanation

Correct answer: A. For the application a prompt, a retriever, and an LLM are required. The retriever output is inserted into the prompt which is given to the LLM to generate answers.

Option A describes the core RAG (Retrieval-Augmented Generation) pattern: a retriever component fetches relevant documents, which are then inserted into a prompt for the LLM. This approach requires minimal development effort, achieves low operational cost by avoiding fine-tuning, and handles frequently updated documents naturally since the retriever simply fetches current content from the document store. The combination of prompt, retriever, and LLM is the industry-standard solution for this use case.

Why the other options are wrong

  • B. Fine-tuning an LLM with new documents is expensive, requires retraining cycles, and doesn't scale well with frequent updates.
  • C. Prompt engineering alone cannot access new documents; the system has no mechanism to incorporate external knowledge sources.
  • D. Fine-tuning a custom LLM is costly in both development and operational expenses and is unnecessary when a retriever can dynamically fetch relevant content.

Question 2

A Generative AI Engineer is creating an agent-based LLM system for their favorite monster truck team. The system can answer text based questions about the monster truck team, lookup event dates via an API call, or query tables on the team’s latest standings. How could the Generative AI Engineer best design these capabilities into their system?

  1. Ingest PDF documents about the monster truck team into a vector store and query it in a RAG architecture.
  2. Write a system prompt for the agent listing available tools and bundle it into an agent system that runs a number of calls to solve a query.
  3. Instruct the LLM to respond with “RAG”, “API”, or “TABLE” depending on the query, then use text parsing and conditional statements to resolve the query.
  4. Build a system prompt with all possible event dates and table information in the system prompt. Use a RAG architecture to lookup generic text questions and otherwise leverage the information in the system prompt.
Show answer and explanation

Correct answer: B. Write a system prompt for the agent listing available tools and bundle it into an agent system that runs a number of calls to solve a query.

Option B describes an agent-based system where the LLM decides which tools to use based on a system prompt listing available capabilities (text search, API calls, table queries). This is the proper agent design pattern that allows the system to route different query types to different tools, the LLM acts as a reasoning engine to select appropriate actions. The system prompt declares the tools, and the agent orchestrates their use across multiple calls to solve complex queries.

Why the other options are wrong

  • A. RAG alone cannot handle API calls or table queries; it only retrieves text from vector stores and is insufficient for multi-tool scenarios.
  • C. Explicit text parsing and conditional logic creates brittle, hard-coded decision trees that don't leverage the LLM's reasoning capabilities and don't scale well.
  • D. Embedding all event dates and table data in the system prompt violates best practices, wastes context window tokens, creates maintenance overhead, and doesn't use tools appropriately.

Question 3

A Generative AI Engineer has been asked to design an LLM-based application that accomplishes the following business objective: answer employee HR questions using HR PDF documentation. Which set of high level tasks should the Generative AI Engineer's system perform?

  1. Calculate averaged embeddings for each HR document, compare embeddings to user query to find the best document. Pass the best document with the user query into an LLM with a large context window to generate a response to the employee.
  2. Use an LLM to summarize HR documentation. Provide summaries of documentation and user query into an LLM with a large context window to generate a response to the user.
  3. Create an interaction matrix of historical employee questions and HR documentation. Use ALS to factorize the matrix and create embeddings. Calculate the embeddings of new queries and use them to find the best HR documentation. Use an LLM to generate a response to the employee question based upon the documentation retrieved.
  4. Split HR documentation into chunks and embed into a vector store. Use the employee question to retrieve best matched chunks of documentation, and use the LLM to generate a response to the employee based upon the documentation retrieved.
Show answer and explanation

Correct answer: D. Split HR documentation into chunks and embed into a vector store. Use the employee question to retrieve best matched chunks of documentation, and use the LLM to generate a response to the employee based upon the documentation retrieved.

Option D describes the standard RAG pipeline for document-based QA: split documents into chunks, embed them into a vector store, retrieve relevant chunks using semantic similarity to the user query, and pass the retrieved context to the LLM for answer generation. This approach is scalable, maintainable, and effective for HR documentation scenarios where precise retrieval and grounding in source documents is essential.

Why the other options are wrong

  • A. While document-level retrieval can work, averaging embeddings at the document level loses granularity and relevance compared to chunk-level retrieval, reducing answer quality.
  • B. Pre-summarizing documents creates information loss and reduces the ability to ground answers in original source material; summaries are less precise than original chunks.
  • C. Using ALS matrix factorization on historical questions adds unnecessary complexity, requires substantial historical data that may not exist, and doesn't adapt well to new question patterns compared to semantic embedding methods.

Question 4

Generative AI Engineer at an electronics company just deployed a RAG application for customers to ask questions about products that the company carries. However, they received feedback that the RAG response often returns information about an irrelevant product. What can the engineer do to improve the relevance of the RAG’s response?

  1. Assess the quality of the retrieved context
  2. Implement caching for frequently asked questions
  3. Use a different LLM to improve the generated response
  4. Use a different semantic similarity search algorithm
Show answer and explanation

Correct answer: A. Assess the quality of the retrieved context

When a RAG system returns irrelevant products, the root cause typically lies in the retrieval stage, either poor chunk quality, suboptimal chunking strategy, or inadequate embedding quality. Assessing the quality of retrieved context directly addresses the problem by identifying whether chunks are properly formatted, relevant, and well-separated. This allows engineers to improve retriever configuration, chunking strategies, or embedding models. The LLM generation quality is secondary if the retrieved context itself is poor.

Why the other options are wrong

  • B. Caching frequent questions doesn't solve the core retrieval relevance problem and only masks the issue for repeated queries.
  • C. Changing the LLM won't improve relevance if poor context is being provided; the LLM cannot generate good answers from bad source material.
  • D. While semantic search algorithms can be optimized, assessing retrieved context quality is the first diagnostic step to identify whether the issue is retrieval-based or not before attempting algorithmic changes.

Question 5

A Generative AI Engineer is developing a chatbot designed to assist users with insurance-related queries. The chatbot is built on a large language model (LLM) and is conversational. However, to maintain the chatbot’s focus and to comply with company policy, it must not provide responses to questions about politics. Instead, when presented with political inquiries, the chatbot should respond with a standard message: “Sorry, I cannot answer that. I am a chatbot that can only answer questions around insurance.” Which framework type should be implemented to solve this?

  1. Safety Guardrail
  2. Security Guardrail
  3. Contextual Guardrail
  4. Compliance Guardrail
Show answer and explanation

Correct answer: A. Safety Guardrail

Option A identifies this as a Safety Guardrail. Safety guardrails are designed to prevent the LLM from generating harmful, inappropriate, or out-of-scope content by filtering inputs and outputs. The requirement to refuse political questions and redirect users aligns with safety controls that maintain appropriate system behavior. This is fundamentally about preventing unsafe or policy-violating responses.

Why the other options are wrong

  • B. Security guardrails protect against adversarial attacks and unauthorized access; this scenario is about content appropriateness, not system security.
  • C. Contextual guardrails adjust behavior based on conversation context or user information; this is a fixed policy applied uniformly regardless of context.
  • D. Compliance guardrails address regulatory requirements and legal obligations; while compliance is involved, the primary framework type for preventing out-of-scope content generation is safety-focused rather than compliance-focused.

Question 6

A small and cost-conscious startup in the cancer research field wants to build a RAG application using Foundation Model APIs. Which strategy would allow the startup to build a good-quality RAG application while being cost-conscious and able to cater to customer needs?

  1. Limit the number of relevant documents available for the RAG application to retrieve from
  2. Pick a smaller LLM that is domain-specific
  3. Limit the number of queries a customer can send per day
  4. Use the largest LLM possible because that gives the best performance for any general queries
Show answer and explanation

Correct answer: B. Pick a smaller LLM that is domain-specific

A smaller, domain-specific LLM is optimally suited for a cost-conscious startup building a RAG application in cancer research. Domain-specific models are fine-tuned for specialized topics, delivering high-quality results without the expense of larger general-purpose models. This approach balances performance with cost efficiency while meeting the startup's need to serve customer queries effectively. Limiting documents (A) would degrade RAG quality, limiting queries (C) restricts service availability, and using the largest model (D) contradicts the cost-conscious requirement.

Why the other options are wrong

  • A. Limiting document retrieval reduces the knowledge base quality and defeats the purpose of RAG.
  • C. Limiting query volume frustrates users and doesn't address cost optimization of the model itself.
  • D. Larger models cost significantly more to run, conflicting with the startup's cost-consciousness requirement.

Question 7

A Generative Al Engineer is responsible for developing a chatbot to enable their company’s internal HelpDesk Call Center team to more quickly find related tickets and provide resolution. While creating the GenAI application work breakdown tasks for this project, they realize they need to start planning which data sources (either Unity Catalog volume or Delta table) they could choose for this application. They have collected several candidate data sources for consideration: call_rep_history: a Delta table with primary keys representative_id, call_id. This table is maintained to calculate representatives’ call resolution from fields call_duration and call start_time. transcript Volume: a Unity Catalog Volume of all recordings as a *.wav files, but also a text transcript as *.txt files. call_cust_history: a Delta table with primary keys customer_id, cal1_id. This table is maintained to calculate how much internal customers use the HelpDesk to make sure that the charge back model is consistent with actual service use. call_detail: a Delta table that includes a snapshot of all call details updated hourly. It includes root_cause and resolution fields, but those fields may be empty for calls that are still active. maintenance_schedule, a Delta table that includes a listing of both HelpDesk application outages as well as planned upcoming maintenance downtimes. They need sources that could add context to best identify ticket root cause and resolution. Which TWO sources do that? (Choose two.)

  1. call_cust_history
  2. maintenance_schedule
  3. call_rep_history
  4. call_detail
  5. transcript Volume
Show answer and explanation

Correct answer: D, E. call_detail; transcript Volume

The call_detail Delta table contains the root_cause and resolution fields that directly provide context for identifying ticket root causes and resolutions, making it essential for the chatbot's core functionality. The transcript Volume contains actual call recordings and text transcripts, providing rich contextual information about what happened during each call that can help determine root causes and resolutions. Together, these sources supply the semantic content and structured resolution data needed for effective ticket analysis. The other sources support operational metrics (call_rep_history for performance tracking, call_cust_history for billing, maintenance_schedule for context) but don't directly target root cause and resolution identification.

Why the other options are wrong

  • A. call_cust_history tracks service usage for billing purposes, not root cause or resolution data.
  • B. maintenance_schedule provides context about system downtime but not specific ticket root causes or resolutions.
  • C. call_rep_history measures representative performance metrics, not the content needed to identify ticket root causes or resolutions.

Question 8

What is the most suitable library for building a multi-step LLM-based workflow?

  1. Pandas
  2. TensorFlow
  3. PySpark
  4. LangChain
Show answer and explanation

Correct answer: D. LangChain

LangChain is the most suitable library for building multi-step LLM-based workflows. It provides abstractions for chaining LLM calls together, managing prompts, handling memory, integrating with external tools and data sources, and orchestrating complex sequences of operations. Pandas (A) is for data manipulation, TensorFlow (B) is for building neural networks, and PySpark (C) is for distributed data processing, none are designed for composing multi-step LLM workflows.

Why the other options are wrong

  • A. Pandas is a data manipulation library focused on tabular data, not LLM workflow orchestration.
  • B. TensorFlow is for building and training neural networks, not for chaining LLM operations together.
  • C. PySpark is for distributed big data processing, not for orchestrating multi-step LLM interactions.

Question 9

When developing an LLM application, it’s crucial to ensure that the data used for training the model complies with licensing requirements to avoid legal risks. Which action is NOT appropriate to avoid legal risks?

  1. Reach out to the data curators directly before you have started using the trained model to let them know.
  2. Use any available data you personally created which is completely original and you can decide what license to use.
  3. Only use data explicitly labeled with an open license and ensure the license terms are followed.
  4. Reach out to the data curators directly after you have started using the trained model to let them know.
Show answer and explanation

Correct answer: D. Reach out to the data curators directly after you have started using the trained model to let them know.

Reaching out to data curators after already deploying a trained model is inappropriate because it occurs after potential legal violations have already occurred and the model is actively in use. Proper compliance requires proactive verification before using data. Option A is appropriate as it shows due diligence before deployment. Option B is appropriate because personally created original data where you hold all rights can be used under any license you choose. Option C is appropriate as explicitly labeled open-licensed data with terms followed ensures compliance. Only option D represents a reactive and insufficient approach to legal risk mitigation.

Why the other options are wrong

  • A. Proactively contacting data curators before deployment demonstrates appropriate due diligence and is a responsible practice.
  • B. Using your own original data where you hold full rights and control licensing is completely appropriate.
  • C. Using only explicitly open-licensed data and respecting license terms is the gold standard for compliance.

Question 10

A Generative Al Engineer is creating an LLM system that will retrieve news articles from the year 1918 and related to a user's query and summarize them. The engineer has noticed that the summaries are generated well but often also include an explanation of how the summary was generated, which is undesirable. Which change could the Generative Al Engineer perform to mitigate this issue?

  1. Split the LLM output by newline characters to truncate away the summarization explanation.
  2. Tune the chunk size of news articles or experiment with different embedding models.
  3. Revisit their document ingestion logic, ensuring that the news articles are being ingested properly.
  4. Provide few shot examples of desired output format to the system and/or user prompt.
Show answer and explanation

Correct answer: D. Provide few shot examples of desired output format to the system and/or user prompt.

Providing few-shot examples of desired output format directly addresses the problem by teaching the LLM what the expected output should look like. Few-shot prompting is a proven technique for controlling LLM behavior and formatting without modifying the underlying system architecture. This approach ensures the model generates only summaries without explanations of the summarization process. Option A is brittle string manipulation. Option B addresses document chunking and embeddings, which don't cause explanation generation. Option C checks data ingestion but the problem is in generation, not ingestion.

Why the other options are wrong

  • A. String splitting by newlines is a fragile workaround that won't reliably remove explanations from all outputs.
  • B. Chunk size and embedding models affect retrieval quality, not whether the model generates meta-explanations of its process.
  • C. Ingestion logic affects what documents are stored, not what explanations the LLM generates during summarization.

What people say about the full Generative AI Engineer Associate pack 5.0 from 1

The Databricks-Generative-AI-Engineer-Associate file didn’t feel too heavy or complicated. Each topic was short but meaningful, which helped me stay focused through the week without losing motivation halfway.
Wilder JamesGenerative AI Engineer Associate

Question 11

A Generative AI Engineer is building a Generative AI system that suggests the best matched employee team member to newly scoped projects. The team member is selected from a very large team. The match should be based upon project date availability and how well their employee profile matches the project scope. Both the employee profile and project scope are unstructured text. How should the Generative Al Engineer architect their system?

  1. Create a tool for finding available team members given project dates. Embed all project scopes into a vector store, perform a retrieval using team member profiles to find the best team member.
  2. Create a tool for finding team member availability given project dates, and another tool that uses an LLM to extract keywords from project scopes. Iterate through available team members’ profiles and perform keyword matching to find the best available team member.
  3. Create a tool to find available team members given project dates. Create a second tool that can calculate a similarity score for a combination of team member profile and the project scope. Iterate through the team members and rank by best score to select a team member.
  4. Create a tool for finding available team members given project dates. Embed team profiles into a vector store and use the project scope and filtering to perform retrieval to find the available best matched team members.
Show answer and explanation

Correct answer: D. Create a tool for finding available team members given project dates. Embed team profiles into a vector store and use the project scope and filtering to perform retrieval to find the available best matched team members.

Option D provides the optimal architecture by creating two specialized tools: one to filter available team members by project dates, and another to calculate similarity scores between team member profiles and project scopes using embeddings. This approach leverages vector embeddings to handle the unstructured text matching problem efficiently across a large team. By embedding team profiles into a vector store and using project scope as a retrieval query with availability filtering, the system can efficiently rank and identify the best available match without iterating through all candidates. Option A embeds project scopes instead of profiles, making retrieval less intuitive. Option B uses keyword extraction, which loses semantic information compared to embeddings. Option C requires iterating through all team members with similarity calculations, which is less efficient than vector search on a large team.

Why the other options are wrong

  • A. Embedding project scopes and retrieving with team profiles reverses the logical flow; it is more efficient to embed profiles and query with project scope.
  • B. Keyword matching on extracted terms loses semantic similarity information that embeddings would preserve, reducing match quality.
  • C. Iterating through all team members to calculate similarity scores is computationally inefficient for very large teams compared to vector search.

Question 12

A Generative AI Engineer is developing an LLM application that users can use to generate personalized birthday poems based on their names. Which technique would be most effective in safeguarding the application, given the potential for malicious user inputs?

  1. Implement a safety filter that detects any harmful inputs and ask the LLM to respond that it is unable to assist
  2. Reduce the time that the users can interact with the LLM
  3. Ask the LLM to remind the user that the input is malicious but continue the conversation with the user
  4. Increase the amount of compute that powers the LLM to process input faster
Show answer and explanation

Correct answer: A. Implement a safety filter that detects any harmful inputs and ask the LLM to respond that it is unable to assist

Implementing a safety filter that detects harmful inputs and instructs the LLM to decline assistance is the most effective safeguarding technique. This approach prevents malicious prompts from being processed by the LLM in the first place, blocking prompt injection attacks and preventing the generation of harmful content. The filter acts as a gatekeeper, ensuring the application remains safe and maintains its intended behavior of generating birthday poems.

Why the other options are wrong

  • B. Reducing interaction time doesn't address the root cause of malicious input threats.
  • C. Continuing conversation after identifying malicious input defeats the purpose of safety measures and allows harmful requests to proceed.
  • D. Increasing compute power has no bearing on input safety or malicious input prevention.

Question 13

A Generative AI Engineer has a provisioned throughput model serving endpoint as part of a RAG application and would like to monitor the serving endpoint’s incoming requests and outgoing responses. The current approach is to include a micro-service in between the endpoint and the user interface to write logs to a remote server. Which Databricks feature should they use instead which will perform the same task?

  1. Vector Search
  2. Lakeview
  3. DBSQL
  4. Inference Tables
Show answer and explanation

Correct answer: D. Inference Tables

Inference Tables is the Databricks feature that automatically captures and logs all incoming requests and outgoing responses from model serving endpoints. This built-in capability eliminates the need for custom microservices to handle logging, providing native monitoring of endpoint activity without adding extra infrastructure. Inference Tables store request-response data in the data lakehouse, enabling analysis and monitoring of model serving behavior. Option A (Vector Search) is for semantic retrieval, not logging. Option B (Lakeview) is a visualization tool without logging capabilities. Option C (DBSQL) is for querying structured data but does not automatically capture endpoint traffic.

Why the other options are wrong

  • A. Vector Search is for semantic search and retrieval tasks, not for capturing or monitoring serving endpoint traffic.
  • B. Lakeview is a business intelligence and visualization tool; it cannot capture endpoint requests and responses.
  • C. DBSQL is for querying data already stored in the lakehouse; it does not automatically log endpoint requests and responses.

Question 14

A Generative Al Engineer interfaces with an LLM with prompt/response behavior that has been trained on customer calls inquiring about product availability. The LLM is designed to output “In Stock” if the product is available or only the term “Out of Stock” if not. Which prompt will work to allow the engineer to respond to call classification labels correctly?

  1. Respond with “In Stock” if the customer asks for a product.
  2. You will be given a customer call transcript where the customer asks about product availability. The outputs are either “In Stock” or “Out of Stock”. Format the output in JSON, for example: {“call_id”: “123”, “label”: “In Stock”}.
  3. Respond with “Out of Stock” if the customer asks for a product.
  4. You will be given a customer call transcript where the customer inquires about product availability. Respond with “In Stock” if the product is available or “Out of Stock” if not.
Show answer and explanation

Correct answer: B. You will be given a customer call transcript where the customer asks about product availability. The outputs are either “In Stock” or “Out of Stock”. Format the output in JSON, for example: {“call_id”: “123”, “label”: “In Stock”}.

Option B is the most effective prompt because it provides clear context about the task (customer call transcripts about product availability), explicitly specifies the two possible outputs ("In Stock" or "Out of Stock"), and requests structured JSON output with identifiable fields (call_id and label). This structured approach enables reliable parsing and integration with classification systems. Option A is vague about conditions. Option C inverts the logic. Option D lacks the structured output format specification that makes the response machine-parseable for downstream processing.

Why the other options are wrong

  • A. This prompt doesn't specify the condition for each output and lacks clarity about what constitutes valid input.
  • C. This prompt inverts the logic and is unclear about the overall task structure.
  • D. While clear about the task, this prompt doesn't specify structured output format, making programmatic response parsing difficult.

Question 15

A Generative Al Engineer has created a RAG application to look up answers to questions about a series of fantasy novels that are being asked on the author’s web forum. The fantasy novel texts are chunked and embedded into a vector store with metadata (page number, chapter number, book title), retrieved with the user’s query, and provided to an LLM for response generation. The Generative AI Engineer used their intuition to pick the chunking strategy and associated configurations but now wants to more methodically choose the best values. Which TWO strategies should the Generative AI Engineer take to optimize their chunking strategy and parameters? (Choose two.)

  1. Change embedding models and compare performance.
  2. Add a classifier for user queries that predicts which book will best contain the answer. Use this to filter retrieval.
  3. Choose an appropriate evaluation metric (such as recall or NDCG) and experiment with changes in the chunking strategy, such as splitting chunks by paragraphs or chapters. Choose the strategy that gives the best performance metric.
  4. Pass known questions and best answers to an LLM and instruct the LLM to provide the best token count. Use a summary statistic (mean, median, etc.) of the best token counts to choose chunk size.
  5. Create an LLM-as-a-judge metric to evaluate how well previous questions are answered by the most appropriate chunk. Optimize the chunking parameters based upon the values of the metric.
Show answer and explanation

Correct answer: C, E. Choose an appropriate evaluation metric (such as recall or NDCG) and experiment with changes in the chunking strategy, such as splitting chunks by paragraphs or chapters. Choose the strategy that gives the best performance metric; Create an LLM-as-a-judge metric to evaluate how well previous questions are answered by the most appropriate chunk. Optimize the chunking parameters based upon the values of the metric.

Option C provides a methodical approach by establishing evaluation metrics (recall, NDCG) and systematically experimenting with different chunking strategies (paragraphs vs. chapters) to find the best performer. Option E uses LLM-as-a-judge evaluation, creating a quantifiable metric to assess how well chunks answer previous questions, then optimizes chunking parameters based on this metric. Both represent data-driven optimization approaches rather than intuition-based decisions. Option A changes embedding models, which is a retrieval component optimization but doesn't directly address chunking strategy selection. Option B adds query classification, which improves routing but doesn't optimize chunking parameters. Option D relies on LLM instructions to determine token counts, which is indirect and lacks rigorous evaluation of actual retrieval performance.

Why the other options are wrong

  • A. Changing embedding models optimizes the retrieval component but does not directly address chunking strategy and parameter selection.
  • B. Query classification improves routing efficiency but does not evaluate or optimize the chunking strategy itself.
  • D. Using LLM instructions to estimate token counts is indirect and bypasses rigorous evaluation of how different chunk sizes actually affect retrieval performance.

Question 16

A Generative AI Engineer is designing a chatbot for a gaming company that aims to engage users on its platform while its users play online video games. Which metric would help them increase user engagement and retention for their platform?

  1. Randomness
  2. Diversity of responses
  3. Lack of relevance
  4. Repetition of responses
Show answer and explanation

Correct answer: B. Diversity of responses

Diverse responses improve user engagement by preventing repetitive, predictable interactions that lead to diminishing novelty and reduced retention. Users value varied and contextually appropriate responses that feel fresh and engaging across multiple gaming sessions. Response diversity encourages continued interaction, higher satisfaction, and longer platform retention compared to monotonous or repetitive patterns.

Why the other options are wrong

  • A. Randomness alone produces incoherent or irrelevant responses that harm user experience and engagement.
  • C. Lack of relevance causes user frustration and abandonment rather than engagement or retention.
  • D. Repetition of responses leads to boredom and reduces engagement by making interactions predictable and stale.

Question 17

A Generative Al Engineer is tasked with improving the RAG quality by addressing its inflammatory outputs. Which action would be most effective in mitigating the problem of offensive text outputs?

  1. Increase the frequency of upstream data updates
  2. Inform the user of the expected RAG behavior
  3. Restrict access to the data sources to a limited number of users
  4. Curate upstream data properly that includes manual review before it is fed into the RAG system
Show answer and explanation

Correct answer: D. Curate upstream data properly that includes manual review before it is fed into the RAG system

Curating upstream data with manual review before it enters the RAG system is the most effective way to address inflammatory outputs. Since RAG systems generate responses based on the content in their source documents, cleaning and reviewing the data source at the point of ingestion directly prevents offensive content from being available for retrieval and generation. This proactive approach addresses the root cause rather than symptoms. Option A (increasing update frequency) does not address content quality. Option B (informing users of expected behavior) acknowledges the problem but does not solve it. Option C (restricting access) limits reach but does not eliminate offensive content from the system.

Why the other options are wrong

  • A. Increasing update frequency without reviewing content quality does not prevent inflammatory material from being included.
  • B. Informing users of expected behavior is a disclaimer that does not mitigate the problem of offensive outputs.
  • C. Restricting access limits who sees problematic output but does not remove offensive content from the RAG system itself.

Question 18

A Generative Al Engineer has developed an LLM application to answer questions about internal company policies. The Generative AI Engineer must ensure that the application doesn’t hallucinate or leak confidential data. Which approach should NOT be used to mitigate hallucination or confidential data leakage?

  1. Add guardrails to filter outputs from the LLM before it is shown to the user
  2. Fine-tune the model on your data, hoping it will learn what is appropriate and not
  3. Limit the data available based on the user’s access level
  4. Use a strong system prompt to ensure the model aligns with your needs.
Show answer and explanation

Correct answer: B. Fine-tune the model on your data, hoping it will learn what is appropriate and not

Fine-tuning a model on data hoping it will learn what is appropriate is not a reliable mitigation strategy for hallucination or data leakage. Fine-tuning can introduce data leakage risks and does not provide the deterministic controls needed to prevent hallucinations or sensitive data exposure. Option A uses guardrails for output filtering, which is effective. Option C restricts data availability based on user permissions, preventing unauthorized access. Option D uses system prompts for alignment, providing behavioral guidance. Only option B is an ineffective and risky approach that relies on implicit learning rather than explicit controls.

Why the other options are wrong

  • A. Output guardrails actively filter responses before presentation, effectively preventing leakage and problematic content.
  • C. Access control based on user permissions is a foundational security practice that prevents unauthorized data exposure.
  • D. Strong system prompts guide model behavior and alignment, effectively reducing unwanted outputs and hallucinations.

Question 19

A Generative Al Engineer is building a system which will answer questions on latest stock news articles. Which will NOT help with ensuring the outputs are relevant to financial news?

  1. Implement a comprehensive guardrail framework that includes policies for content filters tailored to the finance sector.
  2. Increase the compute to improve processing speed of questions to allow greater relevancy analysis
  3. Implement a profanity filter to screen out offensive language.
  4. Incorporate manual reviews to correct any problematic outputs prior to sending to the users
Show answer and explanation

Correct answer: B. Increase the compute to improve processing speed of questions to allow greater relevancy analysis

Increasing compute power to improve processing speed does not help ensure outputs are relevant to financial news. Processing speed affects latency, not relevance filtering. Relevance is achieved through guardrails, content filters, profanity filters, and manual review processes that screen and validate outputs against finance-specific criteria. Computational resources alone cannot determine whether content is topically appropriate.

Why the other options are wrong

  • A. A comprehensive guardrail framework with finance-sector policies directly ensures outputs remain relevant to financial news.
  • C. A profanity filter screens offensive language that could contaminate financial news responses.
  • D. Manual reviews catch and correct irrelevant outputs before delivery, directly supporting the relevance goal.

Question 20

A Generative Al Engineer has already trained an LLM on Databricks and it is now ready to be deployed. Which of the following steps correctly outlines the easiest process for deploying a model on Databricks?

  1. Log the model as a pickle object, upload the object to Unity Catalog Volume, register it to Unity Catalog using MLflow, and start a serving endpoint
  2. Log the model using MLflow during training, directly register the model to Unity Catalog using the MLflow API, and start a serving endpoint
  3. Save the model along with its dependencies in a local directory, build the Docker image, and run the Docker container
  4. Wrap the LLM’s prediction function into a Flask application and serve using Gunicorn
Show answer and explanation

Correct answer: B. Log the model using MLflow during training, directly register the model to Unity Catalog using the MLflow API, and start a serving endpoint

The easiest Databricks deployment process leverages MLflow's native integration. Logging the model during training automatically captures dependencies and model metadata. Direct registration to Unity Catalog via MLflow API creates a versioned model artifact that Databricks understands natively. Starting a serving endpoint from a registered model is a single operation that handles containerization, scaling, and serving automatically without manual infrastructure setup.

Why the other options are wrong

  • A. Manually converting to pickle, uploading to volumes, and then registering adds unnecessary steps compared to MLflow's direct logging.
  • C. Building Docker images manually requires explicit dependency management and circumvents Databricks' automated serving infrastructure.
  • D. Flask and Gunicorn represent manual web application setup that lacks Databricks' integrated scaling, monitoring, and model versioning.

Question 21

A Generative AI Engineer wants to build an LLM-based solution to help a restaurant improve its online customer experience with bookings by automatically handling common customer inquiries. The goal of the solution is to minimize escalations to human intervention and phone calls while maintaining a personalized interaction. To design the solution, the Generative AI Engineer needs to define the input data to the LLM and the task it should perform. Which input/output pair will support their goal?

  1. Input: Online chat logs; Output: Group the chat logs by users, followed by summarizing each user’s interactions
  2. Input: Online chat logs; Output: Buttons that represent choices for booking details
  3. Input: Customer reviews; Output: Classify review sentiment
  4. Input: Online chat logs; Output: Cancellation options
Show answer and explanation

Correct answer: B. Input: Online chat logs; Output: Buttons that represent choices for booking details

To minimize escalations and handle inquiries without human intervention, the LLM should generate interactive UI elements (buttons) that guide customers through booking details selection. This enables the chatbot to autonomously handle common booking inquiries by providing structured options, reducing phone calls and escalations. The input (chat logs) provides context about customer needs, and the output (booking buttons) enables self-service interaction without requiring human intervention.

Why the other options are wrong

  • A. Grouping and summarizing chat logs is a data analysis task, not a real-time customer inquiry response system.
  • C. Classifying review sentiment doesn't directly help handle booking inquiries or reduce escalations.
  • D. Providing only cancellation options is too narrow and doesn't support the full range of booking inquiry handling needed.

Question 22

A Generative Al Engineer is building a RAG application that answers questions about internal documents for the company SnoPen AI. The source documents may contain a significant amount of irrelevant content, such as advertisements, sports news, or entertainment news, or content about other companies. Which approach is advisable when building a RAG application to achieve this goal of filtering irrelevant information?

  1. Keep all articles because the RAG application needs to understand non-company content to avoid answering questions about them.
  2. Include in the system prompt that any information it sees will be about SnoPenAI, even if no data filtering is performed.
  3. Include in the system prompt that the application is not supposed to answer any questions unrelated to SnoPen AI.
  4. Consolidate all SnoPen AI related documents into a single chunk in the vector database.
Show answer and explanation

Correct answer: C. Include in the system prompt that the application is not supposed to answer any questions unrelated to SnoPen AI.

Including in the system prompt that the application should not answer questions unrelated to SnoPen AI is an effective guardrail that instructs the LLM to decline answering off-topic queries. This approach provides clear behavioral guidance regardless of what irrelevant content may be in the retrieval results, ensuring the application stays focused on its intended purpose. The system prompt acts as a filter on the LLM's responses by constraining what it will engage with.

Why the other options are wrong

  • A. Including all irrelevant content does not help filter it; the LLM may still answer questions about non-SnoPen AI topics if retrieval returns those documents.
  • B. Claiming documents are about SnoPen AI when they are not is dishonest and will cause the LLM to provide false information.
  • D. Consolidating documents into single chunks doesn't filter irrelevant content and creates poor retrieval granularity.

Question 23

A Generative AI Engineer is designing an LLM-powered live sports commentary platform. The platform provides real-time updates and LLMgenerated analyses for any users who would like to have live summaries, rather than reading a series of potentially outdated news articles. Which tool below will give the platform access to real-time data for generating game analyses based on the latest game scores?

  1. DatabricksIQ
  2. Foundation Model APIs
  3. Feature Serving
  4. AutoML
Show answer and explanation

Correct answer: C. Feature Serving

Feature Serving is the Databricks tool designed to provide real-time access to feature data, enabling the platform to retrieve current game scores, player statistics, and other live game metrics for LLM-based analysis. Feature Serving caches and serves features with low latency, making it ideal for real-time applications that need fresh data continuously updated as games progress. Option A (DatabricksIQ) is a query interface tool, not a real-time data access mechanism. Option B (Foundation Model APIs) provides access to LLM capabilities but not to real-time game data. Option D (AutoML) is for automated model training, not real-time data retrieval.

Why the other options are wrong

  • A. DatabricksIQ is a query and exploration tool, not a mechanism for accessing real-time streaming data.
  • B. Foundation Model APIs provide LLM capabilities but have no function in retrieving or serving real-time game score data.
  • D. AutoML is for automated model training and tuning, not for accessing or serving real-time operational data.

Question 24

A Generative Al Engineer is creating an LLM-based application. The documents for its retriever have been chunked to a maximum of 512 tokens each. The Generative Al Engineer knows that cost and latency are more important than quality for this application. They have several context length levels to choose from. Which will fulfill their need?

  1. context length 514; smallest model is 0.44GB and embedding dimension 768
  2. context length 2048: smallest model is 11GB and embedding dimension 2560
  3. context length 32768: smallest model is 14GB and embedding dimension 4096
  4. context length 512: smallest model is 0.13GB and embedding dimension 384
Show answer and explanation

Correct answer: D. context length 512: smallest model is 0.13GB and embedding dimension 384

Option D specifies a context length of 512 tokens with a minimal model size of 0.13GB and embedding dimension 384. Since the documents are chunked to a maximum of 512 tokens and the priority is cost and latency over quality, a context length matching the chunk size (512) is sufficient to avoid wasting capacity. The smallest model size (0.13GB) directly minimizes latency and cost, which aligns with the stated priorities. Higher context lengths (2048, 32768) in the other options add unnecessary overhead and larger model sizes, increasing both latency and cost without providing quality benefits for this use case. Option A's 514-token context provides only marginal benefit over 512 while using a slightly larger model.

Why the other options are wrong

  • A. A context length of 514 adds minimal benefit over 512 while still using a larger model than necessary.
  • B. A context length of 2048 and 11GB model size significantly increase cost and latency without proportional quality gains for 512-token chunks.
  • C. A context length of 32768 and 14GB model size represent massive overhead for chunks of 512 tokens, unnecessarily prioritizing quality over stated cost and latency requirements.

Question 25

A Generative AI Engineer is creating an LLM-powered application that will need access to up-to-date news articles and stock prices. The design requires the use of stock prices which are stored in Delta tables and finding the latest relevant news articles by searching the internet. How should the Generative AI Engineer architect their LLM system?

  1. Use an LLM to summarize the latest news articles and lookup stock tickers from the summaries to find stock prices.
  2. Query the Delta table for volatile stock prices and use an LLM to generate a search query to investigate potential causes of the stock volatility.
  3. Download and store news articles and stock price information in a vector store. Use a RAG architecture to retrieve and generate at runtime.
  4. Create an agent with tools for SQL querying of Delta tables and web searching, provide retrieved values to an LLM for generation of response.
Show answer and explanation

Correct answer: D. Create an agent with tools for SQL querying of Delta tables and web searching, provide retrieved values to an LLM for generation of response.

An agent architecture with specialized tools is optimal for this scenario requiring real-time data access across heterogeneous sources. The agent can dynamically decide whether to query Delta tables for stock prices or search the web for news, executing appropriate actions and passing results to the LLM for synthesis. This design handles time-sensitive data requirements that cannot be satisfied by static vector stores, while maintaining separation of concerns between data retrieval and generation logic.

Why the other options are wrong

  • A. Having the LLM extract ticker symbols from news summaries is unreliable and adds unnecessary intermediate steps compared to direct data access.
  • B. This approach inverts the priority by querying stock data first rather than dynamically retrieving relevant context as needed.
  • C. Pre-downloading and storing news in a vector store creates staleness issues for current events and cannot access real-time stock price updates.

25 questions in. Want the rest? The first 42 questions of the pack, free by email · The full pack

Question 26

A Generative AI Engineer is tasked with deploying an application that takes advantage of a custom MLflow Pyfunc model to return some interim results. How should they configure the endpoint to pass the secrets and credentials?

  1. Use spark.conf.set ()
  2. Pass variables using the Databricks Feature Store API
  3. Add credentials using environment variables
  4. Pass the secrets in plain text
Show answer and explanation

Correct answer: C. Add credentials using environment variables

Environment variables are the secure standard for passing secrets and credentials to MLflow Pyfunc models and deployed endpoints. They keep sensitive data separate from code and configuration, allowing the model to access credentials at runtime without hardcoding them. This approach integrates with Databricks' secret management capabilities and follows security best practices for production deployments.

Why the other options are wrong

  • A. spark.conf.set() is for Spark configuration, not for securely managing credentials in endpoint deployments.
  • B. The Feature Store API is designed for feature management, not credential passing.
  • D. Passing secrets in plain text is a critical security vulnerability and violates all security standards.

Question 27

A Generative AI Engineer developed an LLM application using the provisioned throughput Foundation Model API. Now that the application is ready to be deployed, they realize their volume of requests are not sufficiently high enough to create their own provisioned throughput endpoint. They want to choose a strategy that ensures the best cost-effectiveness for their application. What strategy should the Generative AI Engineer use?

  1. Switch to using External Models instead
  2. Deploy the model using pay-per-token throughput as it comes with cost guarantees
  3. Change to a model with a fewer number of parameters in order to reduce hardware constraint issues
  4. Throttle the incoming batch of requests manually to avoid rate limiting issues
Show answer and explanation

Correct answer: B. Deploy the model using pay-per-token throughput as it comes with cost guarantees

Pay-per-token throughput is the cost-effective choice for applications with insufficient request volume for provisioned throughput justification. This model charges only for actual usage without minimum commitments, eliminating the overhead of maintaining idle provisioned capacity. Pay-per-token pricing provides cost predictability through per-token rates while maintaining full feature parity with provisioned endpoints.

Why the other options are wrong

  • A. External Models serve different use cases and do not directly address the cost-effectiveness question for deploying a trained LLM.
  • C. Model parameter reduction changes functional capability and does not solve the cost mismatch between provisioned capacity and actual demand.
  • D. Manual request throttling introduces operational complexity and poor user experience without addressing underlying cost structure.

That was 27 of 123.

The full Databricks Generative AI Engineer Associate pack has all 123 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.

Get the full pack

Not ready yet? Get the first 42 free as one PDF by email. Get the Half Pack →