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.
Get all 123 questions (US$39) · Download the first 10 as a PDF
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?
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?
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?
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?
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?
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?
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.)
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?
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?
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?
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.
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?
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?
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?
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?
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.)
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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.
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?
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?
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.
Not ready yet? Get the first 42 free as one PDF by email. Get the Half Pack →
