CertLumen

Free practice questions · Databricks

10 Databricks Certified Generative AI Engineer Associate practice questions, with answers

Exam-style questions from the CertLumen course, spread over the exam's sections by their weights. Each has its answer and why. They're written for practice: never questions from the real exam.

Question 1 · Design Applications

A legal operations team must pull the parties, effective date, renewal term and governing law from 40,000 contract PDFs into a table that analysts query in SQL. New contracts land in a volume every day and must be processed automatically. Which approach requires the least custom code?

  1. AA Knowledge Assistant over the contracts volume, with analysts asking it for each field
  2. BA Supervisor Agent that routes each contract to a different Genie Agent for each field
  3. CA Python loop that sends every page to a chat endpoint and appends the replies to a CSV
  4. DInformation Extraction with a field schema, run as a scheduled Lakeflow pipeline
Show the answer

D. Information Extraction turns large volumes of unstructured documents into structured rows from a schema you define. The current version is built on ai_extract; its Use Agent options are Run in SQL or Create a Lakeflow pipeline, which updates a streaming table on a schedule or when new data arrives.

Question 2 · Design Applications

A catalog service asks databricks-meta-llama-3-3-70b-instruct on Foundation Model APIs to extract product attributes from supplier descriptions. The attribute names differ by category (a drill has voltage and chuck size, a sofa has fabric and seat depth) and are not known before each call. The result is stored in a VARIANT column, so it only has to be valid JSON. Which response_format setting fits?

  1. A{"type": "text"}, with 'reply in JSON' added to the system prompt
  2. B{"type": "json_schema"} with one schema that lists every attribute any category could have
  3. CNo response_format; set tool_choice to none so that the model answers in a single message
  4. D{"type": "json_object"}, so every response is valid JSON whatever keys the model chooses
Show the answer

D. json_object guarantees syntactically valid JSON without fixing the keys, which is the documented choice when the schema is not known in advance. json_schema is for a known, fixed structure: a schema that tried to enumerate every attribute of every category would exceed what structured outputs allow (at most 64 keys) and would still force irrelevant keys onto every product.

Question 3 · Data Preparation

A support assistant indexes 8,000 pages exported from an HTML help center. Retrieved chunks are dominated by the site's navigation menu, a cookie-consent banner and a footer of links, and answers cite irrelevant pages. Which change addresses the root cause?

  1. AStrip nav, header, footer, script and banner nodes with BeautifulSoup first
  2. BIncrease num_results from 5 to 20 so the real content has more chances to be retrieved
  3. CSwitch to a chat model with a larger context window so it can ignore the boilerplate
  4. DDouble the chunk size so that each chunk contains more real content relative to the menu
Show the answer

A. Page chrome repeated on every page dilutes each chunk's embedding and matches many unrelated queries. Removing those DOM nodes before text extraction fixes the data itself; the HTML structure makes this easy while the tags are still present.

Question 4 · Application Development

A support agent needs to look up order status. The data engineering team already maintains the governed SQL function workspace.support.lookup_order, and the security team requires that the agent's access be controlled by Unity Catalog permissions. How should the tool be provided to a LangChain agent?

  1. AWrite a Python @tool that opens a SQL connection with a personal access token stored in the notebook
  2. BWrap the function with UCFunctionToolkit and pass the resulting tools to the agent
  3. CIndex the orders table in AI Search and give the agent a VectorSearchRetrieverTool
  4. DExport the orders table to CSV and load it with a LlamaIndex reader for the agent to search
Show the answer

B. UCFunctionToolkit exposes existing Unity Catalog functions as framework tools. Calls run as governed function executions, so EXECUTE grants decide what the agent can run, and the same function can be reused from other frameworks.

Question 5 · Application Development

An agent written with LangGraph is deployed to a Model Serving endpoint with agents.deploy(). The team tries to enable AI Gateway safety and PII guardrails on the agent endpoint, but the options are not supported there. Which approach still adds guardrails to the agent?

  1. AEnable inference tables on the agent endpoint, which block unsafe responses
  2. BAdd guardrails in the agent's code, such as PII middleware and input and output checks
  3. CSet a lower rate limit on the agent endpoint so fewer unsafe responses are produced
  4. DGrant the agent's service principal fewer Unity Catalog privileges, which also filters toxic text
Show the answer

B. Legacy AI Gateway guardrails are supported on external model, pay-per-token and provisioned throughput endpoints, not on agent or custom model endpoints. Guardrails for an agent therefore run inside the agent (framework middleware, deterministic checks, judge calls) or on the model endpoints it calls.

Question 6 · Application Development

A team switches its summarization step from one hosted model to another. With the unchanged prompt, the new model's summaries are 40% longer and often end with a closing remark that breaks the dashboard layout. What should the engineer do?

  1. ASwitch back permanently, because a prompt that works on one model works the same on others
  2. BSet max_tokens low enough that the closing remark is cut off before it is generated
  3. CAdapt the prompt for the new model, register it as a new version, and evaluate both
  4. DRaise the temperature on the new model so that its writing style matches the old model
Show the answer

C. Prompts often don't transfer well between models, so Databricks expects you to adapt them when you switch. Refine the instructions (an explicit length limit, 'no closing remarks', an example), version the prompt, and run the same evaluation set, for example with Guidelines judges for length and format, to confirm the new model meets the target.

Question 7 · Assembling and Deploying Applications

A RAG chain logged with models from code imports from helpers.chunking import clean_text. The helpers/ folder sits next to the chain file in the same Git folder and isn't published to PyPI. The serving endpoint fails with ModuleNotFoundError: No module named 'helpers'. Which change to mlflow.pyfunc.log_model fixes it?

  1. Aextra_pip_requirements=["helpers"]
  2. Bcode_paths=["helpers"]
  3. Cpip_requirements=["helpers==1.0"]
  4. Dartifacts={"helpers": "helpers/chunking.py"}
Show the answer

B. MLflow rebuilds the environment from pip requirements, so code that pip can't install must be shipped with code_paths. Use pip_requirements to replace the inferred package list and extra_pip_requirements to add packages to it.

Question 8 · Assembling and Deploying Applications

A sales agent answers questions from a Unity Catalog table with row filters, so each sales rep may see only their own territory. The agent is served on Model Serving. Which authentication approach enforces the row filters for each caller?

  1. AOn-behalf-of-user auth with a UserAuthPolicy, building the user client in predict
  2. BAutomatic authentication passthrough with a DatabricksTable resource declared at logging time
  3. CManual authentication with one service principal whose OAuth secret is stored in a secret scope
  4. DGranting the endpoint's CAN QUERY permission only to members of the sales team
Show the answer

A. On-behalf-of-user authentication (Public Preview, MLflow 2.22.1 or later, enabled by a workspace admin) runs downstream calls as the end user with the API scopes you declare in UserAuthPolicy. Because the user is known only at request time, the client is built with ModelServingUserCredentials inside predict.

Question 9 · Governance

A support assistant retrieves chunks from an AI Search index built on knowledge-base articles that contain customer names and phone numbers. Compliance requires that this PII never reaches the LLM, and the product team has a strict p95 latency target of 1.5 seconds. Which approach meets both requirements?

  1. ACall ai_mask on every retrieved chunk inside the agent before building the prompt
  2. BEnable the AI Gateway output PII guardrail in Block mode on the LLM endpoint
  3. CRun ai_mask over the chunk table in the ingestion job and index only the masked text
  4. DAdd a system prompt instruction telling the model never to repeat names or phone numbers
Show the answer

C. Masking once at ingestion keeps the PII out of the index, the prompts and the logs, and adds no work to each request. That meets both the compliance rule and the latency objective. Masking at request time would add an LLM call for every retrieved chunk on the critical path.

Question 10 · Evaluation and Monitoring

An internal IT agent uses tool calling to look up tickets, search a knowledge base and reset passwords. It has been live for a month. Request volume is flat and nobody has changed the model or the prompts, but daily token spend has tripled and p95 latency has doubled. Which metric should the team examine first to find the cause?

  1. ATime to first token of the streamed responses
  2. BThe count of 429 responses returned by the endpoint's rate limits
  3. CThe model's perplexity on a held-out sample of ticket text
  4. DTool calls and agent steps per request, taken from the agent's traces
Show the answer

D. When volume is flat but tokens and latency rise together, each request is doing more work. In a tool-calling agent the usual cause is loops or redundant tool calls, and every extra step adds another LLM call. Tool calls and steps per request, along with per-span latency and tool error rate, are the key metrics for this deployment scenario, and the agent's MLflow traces record them.

How ready are you?

Take ten more, weighted like the real exam, and see your score by section and a rough chance of passing. The course has 254 questions and 4 timed practice exams.

Take the free check

About the course · Free study guide · A question a day by email