Databricks GenAI cheat sheet — every exam topic on one page
146 key facts across 6 exam domains — every topic on the Databricks GenAI blueprint, with the exam pattern behind each. A condensed cheat sheet, distilled from the full Databricks GenAI revision notes. Skim it the week of your exam.
Updated
Design Applications
14% of the examDatabricks GenAI: Prompt Design, Output Formats and Model Task Selection
- Pick the task from the output the business needs: a known list means classification, values in the text mean extraction, shorter text means summarization, another language means translation, closeness in meaning means embeddings.
- Decide single- or multi-label per output field from how many values can truly apply; open-ended names (including new ones) must be extracted, not classified.
- Embeddings scale with items, pairwise chat prompts with pairs; for thousands of labels, retrieve candidates with embeddings and let an LLM choose among them.
- One task per required output, ordered by dependency; classify first when the schema depends on the document type; auditable rules belong in SQL or Python, not a prompt.
- Prefer a task-specific AI Function when it returns exactly what you need; use ai_query to choose your own endpoint or enforce a responseFormat. ai_mask hides entities, ai_extract pulls them out.
- Format instructions must be explicit and measurable, say what not to output, and live in the system prompt for multi-turn chats; temperature, max_tokens and stop sequences are not format controls.
- Few-shot examples fix edge cases without training, but unbalanced examples bias labels — cover every label and input style.
- json_schema enforces your keys, types and enums; json_object only guarantees valid JSON; allow null for values that may be absent or the model will invent them.
- Closed label sets need an enum, a fallback label and clear definitions where labels overlap.
- Inputs are provided plus retrieved data, scoped by a trusted identity; outputs carry the consumer's shape, passage-level citations and a model-judged not-covered flag; batch table in/column out when nobody waits, serving (streamed for long answers) when someone does.
How the exam tests this
Questions are short scenarios that open with a Generative AI Engineer and a concrete requirement — exact values for reviewers, a closed set of destinations, a large table with nobody waiting, output a parser cannot read, answers that must be checkable — followed by a one-line question about which model task, prompt change, response format or input/output description fits. Options are full approaches of similar length, and the wrong ones are usually workable approaches that miss one stated constraint, so read the requirement for its exactness, volume, latency and access constraints before comparing options. Some items name Databricks AI Functions or ai_query arguments, a few show a short SQL or Python snippet, and some ask you to select two statements that together describe the pipeline.
Databricks GenAI: Chain Components, Agent Tools and Agent Bricks
- Trace the data to pick chain components: retriever → prompt template → chat model → output parser, with the parser chosen from the required output (string, list, typed object).
- Skip the retriever when the whole input fits in the context window, and use retrieval, not fine-tuning, to keep answers current with changing documents.
- Use a chat prompt template with a system message for fixed instructions; use a JSON-schema response format when code reads the output, with nullable fields as a type list such as string and null.
- A schema guarantees shape, not truth: build sources from retrieved-chunk metadata in code.
- Rewrite follow-ups into standalone queries from history plus the latest message, and skip the rewrite on the first turn.
- Request fields that decide which documents are allowed belong in retriever metadata filters; the filter column must be synced into the index.
- Fixed steps call for a chain, varied requests for a tool-calling agent, and skewed traffic for a cheap router in front of the agent.
- Tool names, function and parameter comments and retriever descriptions are what the model reads to choose tools; supply facts like today's date in the prompt.
- Order tools by dependencies, gather knowledge before actions, parallelize independent calls; enforce preconditions, least privilege and idempotency inside action tools.
- Knowledge Assistant answers from documents with citations, Information Extraction fills tables from documents, the Multiagent Supervisor routes by subagent descriptions under end-user access; custom logic calls for an Agent Framework agent.
How the exam tests this
Questions are scenarios that open with a Generative AI Engineer and a concrete requirement — an input and output shape, documents that change, a follow-up that retrieves poorly, content a customer must never see, skewed traffic, a tool the agent ignores, a refund that must never be duplicated, experts who do not code — followed by a one-line question about which chain components, design, tool, call order or Agent Bricks agent fits. Wrong options are usually real techniques that miss one stated constraint, often the difference between influencing behaviour and guaranteeing it, or between least effort and more configuration. A few items ask you to select two answers, and some name Unity Catalog function comments, retriever tool settings, response_format or Delta Sync index columns.
Data Preparation
14% of the examDatabricks GenAI Engineer: Document Extraction, Filtering and Chunking into Delta Tables
- Index only authoritative, current sources meant for everyone who can query the index; keep sensitive records out at ingestion.
- If the answer is not in the chunks table, add the source that holds it; retrieval tuning cannot create missing knowledge.
- No text layer means OCR (pytesseract) or ai_parse_document; tables in text PDFs come out with pdfplumber's extract_tables().
- Clean before you chunk: strip running headers, footers, navigation, quoted replies and duplicates, but never punctuation, stop words or tables.
- Split on headings with MarkdownHeaderTextSplitter or HTMLHeaderTextSplitter; split large tables into row groups that repeat the header row.
- Chunks over the embedding limit are silently truncated; measure chunks in the embedding model's own tokens.
- Context budget: prompt + answer reserve + (chunks retrieved × chunk size) must fit the generator's window.
- Use modest overlap (about 10-20 percent) to bridge chunk boundaries without creating near-duplicates.
- Write chunks with saveAsTable to catalog.schema.table, with a unique id and metadata columns, enable change data feed, then create the Delta Sync index.
- Ingest incrementally with Auto Loader and a fixed checkpoint; replace a changed document by deleting its rows and appending new chunks.
How the exam tests this
Expect scenario questions that describe a source collection or a retrieval symptom and ask which approach fixes it in the data: the parser that suits a given format (scanned versus text PDFs, tables, HTML, a SQL-only constraint), the splitter that matches a document's structure, a chunk size that satisfies an embedding limit and a context budget you have to calculate, or the content to filter or exclude. Pipeline questions ask for the right order of operations to land chunks in a Unity Catalog table and index them, what the source table needs, how to ingest only new files, and which privileges a job requires. Several options are workable on their own; the stated constraint (least privilege, least custom code, one index, no third-party libraries, incremental processing) decides between them.
Databricks GenAI Engineer: Retrieval Evaluation, Advanced Chunking and Re-ranking
- Precision@k divides relevant-in-top-k by k; recall@k divides it by all labeled relevant chunks. Measure both at the k the chain actually passes to the LLM.
- As k grows, recall can only rise and precision usually falls; that is expected, not a regression.
- Recall and precision are set metrics; use MRR when only the first hit matters and NDCG when several graded results and their order matter.
- RetrievalRelevance and RetrievalGroundedness run without ground truth; RetrievalSufficiency (and Correctness) need expectations.
- Retrieval judges read RETRIEVER spans whose output is a list of documents with page_content and optional metadata.
- Sufficiency passing with groundedness failing points to generation; groundedness passing with sufficiency or relevance failing points to retrieval.
- Label evaluation sets with expected facts and source document IDs, not chunk IDs, and compare every configuration on one fixed set.
- Parent-child matches on small chunks and passes parents; semantic chunking splits on topic shifts in unstructured text; enrichment puts source context into the embedded text.
- Hybrid search (keyword + vector, merged with RRF) fixes exact identifiers; a reranker reorders candidates but cannot add ones the first stage missed.
- The built-in reranker reads columns_to_rerank in order within about 2,000 characters, so list the chunk text first; it suits RAG agents, not high-throughput, millisecond-budget search.
How the exam tests this
Expect scenario questions that state a use case and a constraint (how many chunks reach the prompt, whether missing facts or noise is the costly failure, whether ground truth exists, latency and query rate, limited expert time) and ask for the right metric, judge, chunking design or ranking change. Some ask you to compute precision@k or recall@k from a small labeled example, interpret how metrics move as k changes, or read a pattern of judge results to decide whether retrieval or generation is at fault. Others describe a retrieval symptom (ambiguous chunks, exact codes not matching, needed chunk ranked too low or not retrieved at all) and test whether you know which of parent-child chunking, semantic chunking, contextual enrichment, hybrid search or re-ranking addresses it, and how the Vector Search built-in reranker and RETRIEVER spans are configured.
Application Development
30% of the examDatabricks GenAI Engineer: LangChain, Prompt Augmentation and Prompt Engineering
- LangChain chains fixed, linear steps; LangGraph handles loops, branching and pause-and-resume state; LlamaIndex centres on ingestion and query engines; DSPy compiles prompts against a metric; a single fixed call needs no framework.
- ChatDatabricks is for chat endpoints, DatabricksEmbeddings for embedding endpoints, DatabricksVectorSearch for indexes and UCFunctionToolkit for Unity Catalog functions as tools.
- DatabricksVectorSearch needs only index_name for a managed-embedding Delta Sync index; self-managed and Direct Access indexes also need text_column and the same embedding model that built the vectors.
- Prompt Registry variables use {{double braces}}; LangChain uses {single braces} and escapes literals by doubling; to_single_brace_format() bridges the two without changing the registered version.
- Registry versions are immutable and aliases are mutable: serve from a named alias, register fixes as new versions, evaluate, then move the alias with set_prompt_alias().
- optimize_prompts registers its result as a new version and needs a predict_fn that loads and formats the registered prompt; DSPy optimizes only programs written in DSPy.
- Augment from what the request contains: look up exact records by key fields, expand internal terms before retrieval, add only the detected intent's instructions, and scope access with session fields.
- Delimit and label context, pass fewer chunks best-first, and put the latest question last.
- Move a baseline to a target with positive, specific instructions and a target-style example; temperature, max_tokens and bigger models do not define the target.
- Ask for reasoning before the answer, put the answer in its own parseable field, and define an exact fallback for questions the context cannot answer.
How the exam tests this
Expect scenario questions in which a Generative AI Engineer has a specific application and a deciding constraint, such as fewest packages, no redeploy, no framework rewrite, cost or latency per request, exact current values, or output that code must parse. Framework items ask which tool or databricks-langchain class fits a control flow or resource, and which constructor arguments an index type requires. Prompt Registry items test variable syntax, version versus alias URIs, and how to promote, fix or roll back a prompt. Augmentation items describe what a user's request contains and ask what to look up, expand or add to the prompt and in what structure and order. Prompt engineering items describe a baseline output and a target and ask which prompt change closes the gap; several options are plausible, and model settings such as temperature and max_tokens are common alternatives that do not address the stated gap. Some items are multiple response.
Databricks GenAI Engineer: Response Quality, Safety and LLM Guardrails
- Assess responses by reading them beside their retrieved context; latency, length and similarity scores cannot reveal hallucinations or unsafe content.
- If the right fact is in the retriever span but the answer is wrong, it is a generation failure; if the fact never reached the prompt, fix retrieval.
- A triggered Delta Sync index only includes new source rows after a sync runs.
- Grounded is not the same as safe: hazardous source material in the index must be removed from that application's corpus.
- Fix over-refusal by making the rule or classifier more precise, never by removing the protection you are required to keep.
- Choose chunking with the same labelled set, embedding model, retriever and prompt across strategies, and apply the stated constraint before comparing quality.
- Match chunking changes to symptoms: boundary cuts call for overlap, split units for larger structure-aligned chunks, diluted answers for smaller sections, and position-dependent misses for chunks within the embedding model's input limit.
- The context window must hold the prompt, history, every retrieved chunk and the answer.
- AI Gateway guardrails (Safety, PII detection) are per endpoint, need no code changes, and their output checks do not run on streaming requests or embeddings models; topic moderation and keyword filtering are deprecated.
- Prompt rules are not enforcement: add Llama Guard with custom categories for model-based rules and deterministic code checks for exact rules.
How the exam tests this
Expect scenario questions that hand you a trace, an evaluation table or a red-team finding and ask which issue it shows or which change fixes it. Response-assessment items describe an answer and its retrieved context and ask you to name the issue (relevance, completeness, groundedness, format, safety, over-refusal) or the stage that failed, and several options are real issues that the scenario's details rule out. Chunking items give evaluation symptoms or metrics with a constraint such as a prompt-token budget, an embedding model or a context window, and some require arithmetic. Guardrail items turn on Databricks behaviour: which AI Gateway feature actually screens content, per-endpoint scope, the streaming and embeddings limits of output guardrails, the deprecated topic and keyword filters, Llama Guard custom categories and verdict format, and when a deterministic code check beats a prompt rule. Constraints such as no code changes, no retraining, no extra model cost or no unscreened text decide between workable options. A few items ask you to select two.
Databricks GenAI Engineer: Choosing LLMs and Embedding Models
- Filter on hard requirements first, then choose the smallest, cheapest model that meets the measured quality bar.
- The LLM's context window must hold the full prompt plus the maximum reply; buy no more window than that.
- Structured outputs via response_format constrain decoding to a JSON schema; prompt instructions and examples only encourage a format.
- Use a reasoning model only when it measurably raises accuracy on multi-step work and latency and cost allow it.
- Deploy Instruct versions; start from base versions for fine-tuning and continued pretraining.
- In-workspace processing or future fine-tuning means open weights on Model Serving; a permitted proprietary winner goes behind an external model endpoint.
- An embedding model's input window must cover the longest chunk and the longest query; gte-large-en takes 8,192 tokens, bge-large-en 512.
- Switching embedding models means re-embedding the corpus and the queries with the new model; equal dimensions do not make vectors comparable.
- Screen on the model card (task, languages, context, licence); decide on experiments run on the same evaluation set.
- Match the metric to the task: ROUGE for summaries, BLEU for translation, per-class recall for rare classes, perplexity for domain fit.
How the exam tests this
Expect scenario questions that describe an application and ask which LLM, embedding model or experiment run to choose. Most hinge on one stated constraint: lowest cost or latency once quality ties, a context window that must hold input plus output, in-workspace processing or future fine-tuning, generally available features only, a commercial licence, or one index row per document. Embedding items give chunk, document and query lengths and ask which endpoint fits, or diagnose bad retrieval after a model switch. Model-card items show card fields (languages, context, licence, task) and ask which model goes forward. Metric items show a table of MLflow runs or a class imbalance and ask which metric or run decides. Some items are multiple selection.
Databricks GenAI Engineer: Building Agents with MLflow, Agent Framework and Genie
- ResponsesAgent wraps any framework's agent with an inferred signature and automatic tracing; streaming needs predict_stream yielding delta events and a final output_item.done event.
- Per-request extras go in custom_inputs; model_config is fixed when the logged version loads.
- Log agents with Models from Code (agent.py ending in set_model); local imports need code_paths; validate the logged URI with mlflow.models.predict.
- Automatic passthrough covers only resources declared at log time: a Genie space also needs its tables, SQL warehouse and functions, and adding a resource means logging a new version.
- On-behalf-of-user auth uses a UserAuthPolicy and a client created inside predict; it is the choice when row filters or audit must reflect each user.
- agents.deploy() creates the endpoint, credentials, Review App, tracing and inference tables; re-running it with the same model name and a new version updates the endpoint in place.
- Evaluation (mlflow.genai.evaluate on a curated dataset) gates releases; monitoring (registered scorers with per-scorer sample_rate and filter_string) watches live traces with the same scorers.
- Ground-truth judges (Correctness, RetrievalSufficiency, ExpectationsGuidelines) stay offline; production traces become regression data via search_traces, merge_records and expert labeling.
- Use Genie for exact answers over governed tables and a retriever for documents; GenieAgent descriptions drive supervisor routing, while the space's example SQL, descriptions and synonyms drive SQL quality.
- The Genie Conversation API is asynchronous and runs SQL as the caller, who needs CAN RUN, CAN USE on the warehouse and SELECT plus USE CATALOG and USE SCHEMA.
How the exam tests this
Expect scenario questions that describe an agent, a constraint and a symptom, then ask which change, configuration or call fits. Agent Framework items turn on how an agent is wrapped (ResponsesAgent, streaming, custom inputs), logged (Models from Code, code paths, validation), authenticated (declared resources versus on-behalf-of-user, including what a Genie space needs) and deployed (what one deploy call provides, rolling out a version without changing the URL). Life-cycle items contrast offline evaluation with production monitoring: which judges can run without expectations, how sampling and filtering are configured per scorer, and how production traces become labeled evaluation data. Genie items ask when structured data belongs in a Genie space rather than a retriever, how a supervisor routes to Genie workers, where a fix belongs (the space's curation versus the calling agent), and how the Conversation API is polled, continued and permissioned. Several options often work in principle; constraints such as no downtime, no long-lived credentials, per-user filters, budget or least code decide between them.
Assembling and Deploying Applications
22% of the examDatabricks GenAI Engineer: Coding pyfunc Chains and Registering Them to Unity Catalog
- Pure LangChain chain that others will compose: LangChain flavor. Custom pre/post-processing: pyfunc PythonModel. New agent for Agent Framework: ResponsesAgent.
- load_context runs once per load (clients, tokenizers, artifact files); predict runs per request; __init__ state is pickled when you log an instance.
- Enforce anything every caller must get (masking, JSON shape, removing IDs) in predict, not in the prompt, the clients or a gateway guardrail.
- LCEL: prompt | chat model | output parser; a RAG chain needs a branch per template variable (retriever | format_docs for context, RunnablePassthrough for the question).
- Log chains from code with mlflow.models.set_model; the file must build everything itself, and ModelConfig supplies values via model_config at logging time.
- Packages: extra_pip_requirements appends, pip_requirements replaces (use only one of these and conda_env); local modules: code_paths; data files: artifacts read via context.artifacts.
- Unity Catalog needs a three-level name and a signature; an input_example gives you both a signature and a sample request.
- Embed queries with the model that embedded the index, and pick an embedding model whose window fits your chunks.
- Promote with aliases (no stages); a new version never moves an alias. Create: CREATE MODEL; new version: owner or CREATE MODEL VERSION; load: EXECUTE.
- Test dependencies with mlflow.models.predict in an isolated environment (virtualenv or uv), not env_manager="local".
How the exam tests this
Expect scenario items that describe a chain, a failure or a requirement and ask for the change, argument or line of code that meets it, often with short Python. pyfunc items turn on where code runs (__init__, load_context or predict) and on whether a requirement must hold for every caller. Simple-chain items show LCEL pipelines whose order or branches differ. RAG-element items ask you to pick the flavor, the dependency argument, the input example and signature, or the embedding model and retriever settings, where several options are real MLflow or Databricks features meant for a different job. Registration items cover the registry URI, the three-level name, aliases instead of stages and Unity Catalog privileges, with stated constraints deciding between workable options. A few items ask you to select two.
Databricks GenAI Engineer: Mosaic AI Vector Search Indexes, Endpoints, Querying and Sizing
- An endpoint is serving compute that hosts up to 50 indexes; each index is a Unity Catalog object governed with grants.
- Delta Sync follows a Delta table (Databricks-computed or self-managed embeddings); Direct Vector Access has no table and changes only through upsert and delete calls.
- Databricks-computed embeddings: embedding_source_column + embedding_model_endpoint_name, query with query_text. Self-managed: embedding_vector_column + embedding_dimension, query with query_vector from the same model.
- Triggered sync updates only when sync() or Sync now runs and is the cheapest mode; continuous sync is near real time but runs a cluster all the time and is standard-endpoint only.
- Schema or embedding-column changes need a new index: create it, switch the app, then delete the old one.
- Filters are a dictionary on standard endpoints and a SQL-like string on storage-optimized endpoints, where very selective filters can return nothing because of overfetch-then-filter.
- Scores are 1 / (1 + squared L2 distance); normalize vectors for cosine-equivalent ranking, and convert cosine cut-offs before thresholding scores.
- Standard endpoints: tens of milliseconds, high QPS via target_qps, capacity that shrinks as dimension grows. Storage-optimized: a billion-plus vectors, cheaper, a few hundred milliseconds, triggered sync only, no columns_to_sync.
- Cut cost by consolidating idle endpoints and using triggered sync; cut latency with service principal OAuth, smaller num_results, an always-on embedding endpoint and a separate query embedding endpoint serving the same model.
- A non-owner needs USE CATALOG, USE SCHEMA and SELECT on the index to query it.
How the exam tests this
Expect scenario items that give a corpus size, embedding dimension, update pattern, latency or QPS target and budget, then ask for the endpoint type, sync mode or combination that fits, sometimes as a select-two. Other items show a create_delta_sync_index or similarity_search call, a filter, or a vector_search() query and ask which arguments are right or what change fixes an error, so know which argument pairs belong to which index type and which features each endpoint type lacks. Operational items describe a symptom (rows missing after a batch load, deleted records still returned, empty filtered results, first-query timeouts, 429 errors, steady idle charges, a permission error) and ask for the fix. Expect a calculation of a score threshold from a cosine cut-off, and questions on the endpoint-index relationship and the privileges needed to query an index.
Databricks GenAI Engineer: Model Serving Access, Foundation Model APIs, ai_query() and Agent Memory
- Endpoint permissions are CAN VIEW < CAN QUERY < CAN MANAGE; callers need CAN QUERY, version rollbacks and traffic changes need CAN MANAGE, and UC privileges on the model do not open the endpoint.
- Secrets reach a served model as environment variables written exactly {{secrets/scope/key}}; the endpoint creator needs READ on the scope, callers do not.
- Prompt Registry access and other unsupported resources need manual authentication, preferably service principal OAuth in secret references; overriding those variables disables passthrough for every resource.
- AI Gateway rate limits cap use without removing access: endpoint, default per-user, custom per user or service principal, and group limits; TPM limits are not available on custom model or agent endpoints.
- Pay-per-token suits prototypes and irregular traffic (a priority tier serves latency-sensitive production); provisioned throughput suits high-throughput production, fine-tuned UC models and HIPAA; external model endpoints govern third-party providers with your own key.
- The OpenAI client works with base_url = workspace + /serving-endpoints and model = the serving endpoint name.
- Serve an application by registering the chain in Unity Catalog and deploying it to Model Serving; agents.deploy() also provisions resource credentials, the Review App and tracing.
- ai_query() is for batch over tables: responseFormat structures chat output, failOnError => false isolates bad rows, submit the whole dataset in one query, and run on serverless/pro SQL or DBR 15.4 LTS+, not Classic SQL.
- Served models are stateless across replicas: resend messages for short chats, use Lakebase for resumable sessions and synced tables for millisecond lookups of Delta data.
- Scope long-term memory by the authenticated identity and grant the deployed agent's service principal the access it needs on the store.
How the exam tests this
Expect scenario items that describe callers, an operator task, a failure or a requirement such as least privilege, least effort, latency, compliance or cost, and ask for the permission, configuration, serving mode, ai_query() argument, compute or datastore that satisfies it. Some show short Python (OpenAI client calls) or SQL (ai_query). Permission items turn on which level an action needs and on the difference between endpoint permissions and Unity Catalog privileges. Authentication items probe secret reference syntax, who needs READ on a scope, and the side effect of switching an agent to manual authentication. Serving items contrast pay-per-token, provisioned throughput and external model endpoints and how rate limits are scoped. Batch items ask you to recognise batch workloads and pick ai_query() arguments or compatible compute. Memory items present a forgetful or slow agent and ask where state should live, how to scope it and which identity needs access. A few items ask you to select two answers.
Databricks GenAI Engineer: CI/CD for Agents, Prompt Lifecycle, MCP Servers and Agent Interfaces
- Deploy code, not models, when production data may only be read in production: a bundle with dev, staging and prod targets builds each environment's index and endpoints there.
- CI should run as a service principal using a federation policy that trusts the CI system's OIDC token, so no long-lived secret is stored.
- Component tests call one tool, parser or retriever directly with fixed inputs and a stubbed LLM; LLM-judge evaluation belongs in the promotion gate, not the unit tests.
- Endpoint Ready only means the container started; a smoke test of representative requests catches missing resources before production.
- Triggered Delta Sync indexes need sync() after each load; storage-optimized endpoints support only Triggered sync, and schema or embedding-model changes need a new index built, synced, switched to, then the old one deleted.
- Prompt versions are immutable and aliases are pointers: deployed apps load a named alias, regression tests pin a version number, and @latest follows every registration.
- Promote by pointing the next alias at the evaluated version; roll back by pointing production back, and move any alias that automation copies from as well.
- Alias loads are cached for 60 seconds by default; cache_ttl_seconds shortens that, and 0 queries the registry on every call.
- Managed MCP servers are Databricks-provided with nothing to host; external ones need an existing MCP server registered through a Unity Catalog HTTP connection, with callers granted EXECUTE on the MCP and USE CONNECTION kept for authors and admins; custom ones run on Databricks Apps over Streamable HTTP.
- Per-user data in an interface needs the user's token forwarded (Apps user authorization or a Teams federation policy) plus on-behalf-of-user authorization in the agent.
How the exam tests this
Expect scenario items that describe a release pipeline, a prompt change, a tool integration or a group of users and add a deciding requirement such as no redeploy, no server code, least privilege, no long-lived credentials, per-user data access, zero downtime, cost or a propagation time. Pipeline items ask how code reaches each workspace, how CI authenticates, which test fits a component and where an evaluation gate or smoke test belongs. Vector Search items turn on sync modes, endpoint types and changes that need a new index. Prompt items show short MLflow Python or URIs and probe aliases versus version numbers, promotion direction, rollback with automation in play and load_prompt caching. MCP items ask you to pick managed, external or custom servers, a connection's authentication type, or the transport, name, URL and permission for a server on Databricks Apps. Interface items pair users with Apps, the Review App, AI Playground, Slack or Teams and ask which identity their queries run as. A few items ask you to select two answers.
Governance
8% of the examDatabricks GenAI Engineer: Guardrails, PII Masking and Data Licensing
- PII detection Mask replaces personal data and lets the request continue; Block rejects it. Use Mask when questions must still be answered.
- Only input-side masking keeps personal data from reaching a model or external provider; the Safety guardrail has no Mask behaviour.
- Output guardrails do not support streaming or embeddings models, and endpoint guardrails never see citations shown straight from Vector Search, so mask the knowledge base at ingestion with ai_mask.
- ai_mask masks only the labels you list: match them to the privacy rule and never mask what retrieval needs. ai_extract and ai_classify do not mask.
- Mask entities rather than dropping records: exclusion, synthetic data and access restrictions lose content or leave the data retrievable.
- Screen user input with a model-based classifier before retrieval and tool calls; screen retrieved or fetched content for indirect injection where it enters.
- Controls that hold when the model obeys an injection live in code and permissions: least-privilege grants, on-behalf-of-user auth, tool-derived parameters, approval, secrets in Databricks secrets.
- Public is not licensed; CC BY-NC forbids commercial use; check every use (retrieval, quoting, training) against the license and terms.
- Store license and provenance columns per chunk, filter by license inside the search, and remember the index schema is fixed at creation.
- Fix problematic text in the data: filter at ingestion, or switch to an authoritative source when the problem pervades it.
How the exam tests this
Expect scenario questions that pair a governance requirement with a business constraint (an answer-rate target, a p95 latency budget, no extra model call, streaming that must stay on, a single shared index, a paid product, or a control that must hold even if the model obeys) and ask which approach meets both. Options are usually near-twins: Mask versus Block, requests versus responses, ai_mask versus ai_extract or ai_classify or Unity Catalog column masks, masking versus excluding records, input screening before versus after retrieval, prompt rules versus permission-level controls, query filters versus deletion, and filtering a source versus replacing it. Some items ask you to choose ai_mask labels, read a data license, or select two complementary steps.
Evaluation and Monitoring
12% of the examDatabricks GenAI Engineer: Evaluating LLMs and Agents with MLflow Scorers and Judges
- Compare candidate LLMs on one shared, representative evaluation set with identical scorers, plus latency and cost; eliminate on every hard threshold first, then optimise the stated objective.
- MoE generation speed tracks active parameters, but GPU memory must hold the total parameters.
- mlflow.genai.evaluate calls predict_fn(**inputs); records with outputs or a trace column are scored as they are and must not come with a predict_fn.
- To test a new version on captured requests, turn the requests into inputs, drop traces and outputs, and keep predict_fn; to_predict_fn("endpoints:/<name>") evaluates a deployed endpoint.
- Correctness, RetrievalSufficiency and (per Databricks) ToolCallCorrectness need ground truth in expectations; ExpectationsGuidelines needs per-record guidelines instead; RelevanceToQuery, Safety, Guidelines, RetrievalGroundedness and RetrievalRelevance need neither.
- @scorer functions get inputs, outputs, expectations and trace by name; return primitives, one Feedback or a list of distinctly named Feedback; uncaught errors become Feedback with value None.
- Tool order and retrieval results live only in the trace: use trace.search_spans in a code scorer for deterministic checks, or make_judge with {{ trace }} and a model for semantic ones.
- Expectations are ground truth, feedback rates the output; labeling sessions sync expectations to datasets by inputs, and judge.align() needs feedback named exactly like the judge, ideally 50 to 100 traces with about 30% negative.
How the exam tests this
Expect scenario questions in which a Generative AI Engineer has a concrete requirement (no judge-model cost, deterministic results, a model that can no longer be called, non-coding reviewers, a memory budget, thresholds followed by an objective) and must pick a model, a scorer, a data setup or an SME workflow. Model-selection items give a small table of evaluation results with architectures, latency or cost and reward applying every threshold before the objective. Harness items show record dictionaries, predict_fn signatures, endpoint URIs or short scorer code and test what MLflow passes and returns. Judge items contrast near-twins such as RetrievalSufficiency and RetrievalGroundedness, Guidelines and ExpectationsGuidelines, expectations and feedback, and code scorers versus trace-aware LLM judges. SME items cover labeling schemas, dataset sync behaviour, Review App chat access and the conditions for judge alignment. Some items ask you to select two answers.
Databricks GenAI Engineer: Monitoring, Inference Tables and LLM Cost Control
- Match the metric to the risk: time to first token for streaming chat, throughput for deadline-bound batch work, tokens per request for cost, a judge score for quality.
- Inference tables hold request and response payloads; rows arrive in the background within about an hour, oversized payloads are null with logging_error_codes, and error responses such as 429 may not be logged.
- Usage tracking (system.serving.endpoint_usage) holds exact token counts and requester but no text; join served_entities on served_entity_id for names, and the inference table on the request ID for text.
- usage_context in the request body attributes usage per end user or tenant; rate limits key on identities, never on usage_context.
- agents.deploy() sets up real-time traces and inference tables; endpoints you create yourself need ENABLE_MLFLOW_TRACING=true. Scorers, rate limits and scale to zero are separate choices.
- Agent Monitoring runs registered scorers on sampled live traces; backfill_scorers scores past traces, and custom scorers must be notebook-defined with imports inside the function.
- Custom rate limits override User (Default); a user-specific limit beats a group limit; a user in several groups gets the most generous group limit; the endpoint limit caps everyone; agent endpoints take QPM only.
- Cut cost with scale to zero, pay-per-token for sporadic use, ai_query for batch work and max_tokens for unread output; allocate spend with endpoint tags in system.billing.usage and alert with budgets.
How the exam tests this
Expect scenario questions that describe a deployed LLM, RAG application or agent, a stakeholder's need and a constraint, then ask which metric, log, query, setting or cost lever fits. Logging items turn on what each record holds and when: payloads versus token counts versus DBUs versus traces, delivery delay, null oversized payloads, unlogged error responses, and how fallbacks and traffic splits appear through served_entity_id. Attribution items ask which join or field identifies an endpoint, a caller or a tenant. Monitoring items ask what an agent deployment sets up, how scorers are started, backfilled or written so they run in production, and which judge the logged data can support. Rate-limit items test scope, precedence and where token limits can be set; cost items test reading a usage pattern and choosing the lever that fixes it. Several options are often real features; requirements such as no stored text, no code change, no new identities, keep one endpoint, no self-built job or monitor without blocking decide between them.
Where these Databricks GenAI facts came from
Databricks GenAI cheat sheet: your questions
Source
Exam structure, domain weights and scoring on this page come from the official Databricks GenAI exam guide.