MockCertMockCert
Menu

Test yourself in exam conditions

A full Databricks Certified Generative AI Engineer Associate mock exam: 45 questions in 90 minutes. Your first one is free.

Start a free mock exam
Domain 6 · 10 topics · about 52 minTopics in this domainTopics

Domain 6 · Overview

Overview

What this domain covers

  1. Topic 1 of 10 · 9 steps + check · 5 minSelect an LLM choice (size and architecture) based on a set of quantitative evaluation metricsDecide what to measure · Three levels of metrics · Build the evaluation set · Scoring with expectations · and 2 more
  2. Topic 2 of 10 · 8 steps + check · 5 minSelect key metrics to monitor for a specific LLM deployment scenarioInfrastructure metrics · Quality metrics with judges · Running scorers in production · Choosing what to sample · and 1 more
  3. Topic 3 of 10 · 9 steps + check · 5 minEvaluate agent performance using MLflow scoring and tracingWhat a trace captures · Turning on tracing · Scoring with judges · Which metrics need ground truth · and 2 more
  4. Topic 4 of 10 · 10 steps + check · 6 minUse inference logging to assess deployed RAG application performanceEvaluation versus monitoring · What inference tables capture · Turning logging on for agents · Setup rules and cost · and 3 more
  5. Topic 5 of 10 · 8 steps + check · 5 minUse Databricks features to control LLM costsBudget thresholds · Threshold actions · Counting external providers · Cheaper models by default · and 1 more
  6. Topic 6 of 10 · 9 steps + check · 5 minUse inference tables and Agent Monitoring to track a live LLM endpointWhat inference tables log · Turning them on for agents · Permissions for legacy tables · Delivery delay and sampling · and 2 more
  7. Topic 7 of 10 · 8 steps + check · 5 minIdentify evaluation judges that require ground truthJudges that need ground truth · Judges that need only inputs and outputs · Guideline judges · Multi-turn judges · and 1 more
  8. Topic 8 of 10 · 8 steps + check · 5 minUse AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent FrameworkInference tables log payloads · Setting up inference tables · Tracking usage · Rate limit types · and 1 more
  9. Topic 9 of 10 · 8 steps + check · 5 minUse Databricks custom Scorers for evaluating agents and LLMsWhen to write scorer code · Decorator or class · One scorer, development and production · Custom LLM judges · and 1 more
  10. Topic 10 of 10 · 9 steps + check · 5 minIncorporate SME feedback to improve agent performanceWhy experts review agents · Two kinds of labeling schema · Running a labeling session · Session size and tracking · and 2 more

Up next: Select an LLM choice (size and architecture) based on a set of quantitative evaluation metrics · 9 steps + check · 5 min

Domain 6 · Topic 1 of 10

Select an LLM choice (size and architecture) based on a set of quantitative evaluation metrics

Step 1 of 9

Think first How would you use evaluation metrics to choose between a larger and a smaller LLM for your application?

Why it matters: Questions give evaluation results or metric types and ask which model choice or evaluation setup they support.

Build a representative evaluation set and decide which metrics matter for the app. Score the system at the overall, component and compound levels. Accuracy, latency and cost can all matter.

Step 2 of 9

Term Meaning
Overall metric A score on the system's end-to-end input and output, such as answer correctness or latency.
Component metric A score on one component's inputs and outputs, such as precision@K, nDCG or toxicity.
Compound metric A score on how components interact, such as faithfulness.
Expectations Optional ground truth in an evaluation record, with reserved keys used by built-in judges.
Scorer A function that returns a value or Feedback for each record; its name, or each Feedback's name, becomes the metric name.

Step 3 of 9

Choose metrics that fit the application's goals. Depending on the app, key metrics may be response accuracy, latency, cost or stakeholder ratings. GenAI answers can be right in many ways, so pair human feedback for confidence with LLM-judged metrics for scale.

Step 4 of 9

Measure the whole system, each part and how parts interact. Each level looks at the same system from a different angle, from end-to-end results down to single parts.

Overall, component and compound metrics compared

Level What it scores Examples
Overall The system's overall input and output Answer correctness, latency
Component Each component's inputs and outputs precision@K, nDCG, latency, toxicity
Compound How components work together Faithfulness to retrieved knowledge

Exam trap Faithfulness is not an overall metric; it needs the retriever's internal output as well as the chain input and output.

Step 5 of 9

Use curated queries that reflect real intended use. Keep examples challenging and diverse, and update them as usage changes. MLflow datasets hold inputs, optional expectations and lineage fields; a record can carry just one origin type: human, document or trace.

Step 6 of 9

Built-in judges read reserved expectation keys. The keys are guidelines, expected_facts and expected_response. Live production traffic usually has no expectations, so design reused scorers to cope when they are missing.

Exam trap A scorer that assumes expectations exist will struggle online, because production traffic usually lacks ground truth.

Step 7 of 9

The scorer's function name becomes the metric name. That holds for a primitive return or one unnamed Feedback. One scorer can return a list of Feedback objects, each with a unique name, to cover several facets. Only @scorer decorator scorers work in production monitoring.

Step 8 of 9

System models in system.ai work with no setup. All account users can send requests to them by default. You can also chat with them in the AI Playground before running a full evaluation.

Step 9 of 9

  • Pick metrics such as accuracy, latency, cost or stakeholder ratings based on the app.
  • Overall metrics score the whole system; component metrics score each part; compound metrics score interactions.
  • Use a challenging, diverse and current evaluation set that matches intended use.
  • Class-based Scorer subclasses work only offline; production monitoring needs @scorer.

Sources: Introduction to evaluation & monitoring RAG applications | Databricks on AWS (opens in a new tab) · Evaluation dataset reference | Databricks on AWS (opens in a new tab) · Code-based scorer examples | Databricks on AWS (opens in a new tab) · Get started querying LLMs on Databricks | Databricks on AWS (opens in a new tab)

Check

Check: Select an LLM choice (size and architecture) based on a set of quantitative evaluation metrics

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Select key metrics to monitor for a specific LLM deployment scenario · 8 steps + check · 5 min

Domain 6 · Topic 2 of 10

Select key metrics to monitor for a specific LLM deployment scenario

Step 1 of 8

Think first For a given LLM deployment, how do you decide which infrastructure metrics and which quality scorers to watch?

Why it matters: Questions describe a deployed LLM app and ask which metric, scorer or sampling setting to monitor it with.

Monitoring has two layers. Endpoint health metrics show how the serving infrastructure behaves, while scorers judge the quality of the answers. Pick each based on the risk that matters for the scenario.

Step 2 of 8

Term Meaning
Endpoint health metrics Infrastructure metrics such as latency, request rate, error rate, CPU and memory usage.
Scorer A check that MLflow 3 runs on agent traces, attaching its result as feedback to each trace.
Code-based scorer A deterministic scorer for exact matches, format checks and performance metrics.
Inference table A Unity Catalog Delta table that logs online requests and responses of an endpoint.

Step 3 of 8

Watch latency, request rate, errors, CPU and memory. These endpoint health metrics appear in the Serving UI for the last 14 days by default. You can also stream them to observability tools in real time.

Step 4 of 8

Built-in LLM judges cover common quality dimensions. MLflow ships judges for relevance, safety, groundedness and correctness. Use code-based scorers when a check is deterministic, such as an exact match or a format rule.

Built-in judges and code-based scorers compared

Feature Built-in LLM judges Code-based scorers
Typical checks Relevance, safety, groundedness, correctness Exact matching, format validation, performance
Behavior An LLM judges each output Programmatic and deterministic

Step 5 of 8

Register a scorer, then start it with sampling. Production monitoring, in Beta, runs scorers on a sample of traces. Allow 15 to 20 minutes for first results. An experiment can hold at most 20 monitoring scorers, and the same scorer can serve development and production.

Exam trap Class-based Scorer subclasses cannot be registered for monitoring; only @scorer decorator scorers serialize.

Step 6 of 8

Sample critical checks fully and costly judges lightly. Use sample_rate=1.0 for safety and security scorers, and 0.05 to 0.2 for expensive LLM judges. A filter_string in ScorerSamplingConfig narrows which traces a scorer sees, with mlflow.search_traces() syntax.

Exam trap A safety scorer should not run at a low sample rate like 0.1; critical checks call for 1.0.

Step 7 of 8

Inference tables keep requests and responses in Delta. With AI Gateway, they serve quality debugging, training datasets and compliance audits. Model Serving build logs, by contrast, are kept for up to 30 days.

Step 8 of 8

  • Endpoint health covers latency, request rate, error rate, CPU and memory, shown for 14 days by default.
  • Built-in judges score relevance, safety, groundedness and correctness.
  • Run safety scorers at sample_rate=1.0 and costly judges at 0.05 to 0.2.
  • An experiment holds at most 20 monitoring scorers at a time.

Sources: Monitor model quality and endpoint health | Databricks on AWS (opens in a new tab) · Set up production monitoring | Databricks on AWS (opens in a new tab) · Scorers and LLM judges | Databricks on AWS (opens in a new tab)

Check

Check: Select key metrics to monitor for a specific LLM deployment scenario

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Evaluate agent performance using MLflow scoring and tracing · 9 steps + check · 5 min

Domain 6 · Topic 3 of 10

Evaluate agent performance using MLflow scoring and tracing

Step 1 of 9

Think first How do traces and scorers together tell you whether a change made your agent better or worse?

Why it matters: Questions describe an agent and a quality concern, and ask which MLflow tracing or scoring step reveals it.

Tracing shows what the agent did at each step. Scoring runs judges over a dataset and attaches their feedback to traces. Comparing scored runs then tells you whether a change helped.

Step 2 of 9

Term Meaning
Trace A record of each step of an agent run: inputs, outputs, latency, token usage and cost.
LLM judge A model-based scorer, such as Safety or RetrievalGroundedness, that rates app outputs.
Ground truth Human-labeled correct answers. Some judges, such as answer correctness, compare outputs with them.
Evaluation dataset A Unity Catalog table of rows to evaluate. Creating one needs CREATE TABLE on a schema.

Step 3 of 9

A trace records every intermediate step of an agent run. For each step it keeps what went in and came out, plus latency, token usage and cost. That map of the whole run shows how the agent behaves and where a problem starts.

Step 4 of 9

For LangGraph agents, LangChain autologging enables tracing. LangGraph relies on LangChain's autolog, so one call covers it. Mark the retrieval component with span_type="RETRIEVER" to unlock MLflow's retrieval-specific judges.

Example: Enables automatic MLflow tracing for a LangGraph agent.

mlflow.langchain.autolog()

Exam trap Retrieval-specific judges depend on the retrieval step being marked with span_type="RETRIEVER". Turning on tracing is only half of the setup.

Step 5 of 9

mlflow.genai.evaluate() writes one scored trace per dataset row. Each trace carries feedback from every judge. Built-in judges include Safety, which looks for harmful or inappropriate content. RetrievalGroundedness checks whether output is grounded in the retrieved data.

Step 6 of 9

Some judges compare outputs with human labels; others need no labels. Cost and latency need no judge at all. They are computed deterministically from the app's outputs.

How common metrics are computed

Metric How it is computed Needs ground truth
Answer correctness LLM judge Yes
Groundedness LLM judge No
chunk_relevance/precision LLM judge No
document_recall Deterministic Yes

Exam trap Groundedness needs no human-labeled ground truth. Answer correctness does, because it compares outputs with those labels.

Step 7 of 9

Compare evaluation runs to confirm a new prompt version is better. The comparison view is the main way to check that. Keeping traces in an evaluation dataset links results to it. You can then follow dataset changes and every result made with it. Creating a dataset needs CREATE TABLE permission on a Unity Catalog schema.

Step 8 of 9

Click Assess on a trace to record a rating, note or expectation. An expectation is the correct answer. In the Traces search box, Filter with AI turns a plain-English description into a filter. On Databricks, traces can live in Unity Catalog Delta tables with access control and direct SQL access.

Step 9 of 9

  • Traces record inputs, outputs, latency, tokens and cost for every step.
  • mlflow.genai.evaluate() produces one scored trace per dataset row.
  • Answer correctness and document_recall need ground truth; groundedness and chunk relevance do not.
  • Use the run comparison view to prove a new prompt version beats the old one.

Sources: Tracing overview | Databricks on AWS (opens in a new tab) · Tutorial: Evaluate and improve an agent | Databricks on AWS (opens in a new tab) · Assess performance: Metrics that matter | Databricks on AWS (opens in a new tab) · Observe and find issues | Databricks on AWS (opens in a new tab)

Check

Check: Evaluate agent performance using MLflow scoring and tracing

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Use inference logging to assess deployed RAG application performance · 10 steps + check · 6 min

Domain 6 · Topic 4 of 10

Use inference logging to assess deployed RAG application performance

Step 1 of 10

Think first Once your RAG app is in production, what would you log to find out why an answer went wrong?

Why it matters: Questions describe a deployed RAG app or agent and ask how inference logging captures, limits or exposes its traffic.

Evaluation happens during development; monitoring takes over after deployment. Inference tables write each request and response to a Unity Catalog Delta table. They can also keep MLflow traces, so you can monitor and debug what users really see.

Step 2 of 10

Term Meaning
Inference table A Unity Catalog Delta table that logs requests and responses from a model service.
MLflow trace A record of an agent's steps that inference tables can store for debugging and monitoring.
request_id and invocation_id Several calls can share a request_id; invocation_id tells each individual call apart.
logging_error_codes A column that shows when a payload was too large to log.

Step 3 of 10

Monitoring is evaluation's counterpart after deployment. You evaluate while you build and monitor once the app runs in production. Production logs must record what went in, what came out and the steps between, such as document retrieval, so you can spot and diagnose issues early.

Exam trap Logging only the final answer is not enough for a RAG app. Without the retrieval step you cannot tell whether a bad answer came from poor context.

Step 4 of 10

Requests and responses land in a Unity Catalog Delta table. Use the logged data to monitor, debug and optimize the model. For agents, the tables can also keep MLflow traces, which show where a run went wrong.

Step 5 of 10

Agents deployed with mlflow.deploy() log automatically. No extra step is needed for those agents. For a programmatic deployment, give the endpoint configuration an ENABLE_MLFLOW_TRACING environment variable with the value True to get inference tables with traces.

Step 6 of 10

Databricks creates the table; you cannot pick an existing one. The table appears after the endpoint's first request. Enabling it needs the MANAGE privilege on the model service, for both its creator and its modifier. Logged requests and responses are billed.

Exam trap Pointing the endpoint at a table you made yourself is not supported. Databricks always creates a new inference table for you.

Step 7 of 10

Logs can take up to 1 hour to show up. For Foundation Model API workloads, external models and agents, log delivery is best effort. Rows can also take up to 1 hour after the first request to appear, so an empty table right away is normal.

Step 8 of 10

Oversized payloads are not logged. Check logging_error_codes for MAX_REQUEST_SIZE_EXCEEDED or MAX_RESPONSE_SIZE_EXCEEDED when a row looks empty. The size limit depends on which gateway logs the traffic.

Size limits for the two kinds of inference tables

Feature Unity Gateway AI Gateway (legacy)
Largest payload logged 10 MiB 1 MiB, traces included
Oversized payload Not logged; error code recorded Logged as null; error code recorded

Step 9 of 10

Use invocation_id to separate calls within one request. Guardrail checks or multi-turn agent calls can share a request_id. Leave the table's schema and name alone and never delete it, or logging can stop or the table can become corrupted.

Exam trap Renaming the table to tidy up your catalog is risky. A renamed table can stop logging data or become corrupted.

Step 10 of 10

  • Log inputs, outputs and intermediate steps such as retrieval to diagnose a production RAG app.
  • Agents deployed with mlflow.deploy() get inference tables automatically.
  • Unity Gateway skips payloads over 10 MiB; AI Gateway (legacy) logs over 1 MiB as null.
  • Inference logs can take up to 1 hour to appear, and logging is billed.

Sources: Introduction to evaluation & monitoring RAG applications | Databricks on AWS (opens in a new tab) · Log requests and responses to inference tables | Databricks on AWS (opens in a new tab) · Log requests and responses for serving endpoints (legacy) | Databricks on AWS (opens in a new tab)

Check

Check: Use inference logging to assess deployed RAG application performance

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Use Databricks features to control LLM costs · 8 steps + check · 5 min

Domain 6 · Topic 5 of 10

Use Databricks features to control LLM costs

Step 1 of 8

Think first Which Databricks controls would you combine to keep a team's LLM spending in check without breaking their work?

Why it matters: Questions describe a spending problem and ask which budget, routing or serving feature controls the cost.

You control LLM cost three ways: cap spend with Unity Gateway budgets, steer work to cheaper models, and pick the cheapest fitting serving option. Budgets act on estimates, so they limit spend rather than stop it exactly.

Step 2 of 8

Term Meaning
Unity Gateway budget A budget whose resource type is Unity Gateway, with spend thresholds and actions.
Smart Routing Picks the lowest-cost model able to handle each subagent's task.
Smart defaults A Beta feature that suggests a different agent and model as spending grows.
Scale-to-zero Stops all replicas of an idle endpoint, so the next request waits for startup.

Step 3 of 8

Set shared and per-user thresholds on a Unity Gateway budget. Daily thresholds reset at 00:00 UTC.

Shared and per-user thresholds compared

Feature Shared Per-user
Whose spend All users in the budget scope together Each individual user
Periods Monthly Daily, monthly or both

Step 4 of 8

Choose Send email, Block usage or Trigger webhook. Blocking stops further gateway requests until the period resets or an admin raises the threshold. Enforcement uses near real-time estimates, so requests already running can finish and push spend past the limit.

Exam trap Block usage is not an exact hard cap; in-flight requests can complete, so final spend can exceed the threshold.

Step 5 of 8

External model spend needs a preview and a setting. Turn on the External Model Spend in Budgets preview, then choose Include external model usage. From then on, estimated spend with external providers counts against the same thresholds.

Step 6 of 8

Smart Routing and smart defaults steer work to cheaper models. Smart Routing needs a static list of system.ai models in models.model_services, nothing else. Smart defaults need an account admin to enable the Enhanced Unity Gateway preview, and they change new launches only. With Unity Gateway, open-source models like system.ai.glm-5-3 can sharply lower per-token cost for routine coding.

Exam trap Smart defaults neither switch active sessions nor restrict model access; use budget blocking and Unity Catalog permissions for that.

Step 7 of 8

Custom LLM serving is billed per GPU instance hour. If Foundation Model APIs already serve the model you need unchanged, use them; they are simpler and highly optimized. Scale-to-zero stops idle replicas, but the next request then waits one to several minutes.

Exam trap Custom LLM serving is not the better choice when Foundation Model APIs already serve the exact model you need.

Step 8 of 8

  • Unity Gateway budgets offer shared monthly and per-user daily or monthly thresholds.
  • Budget enforcement uses estimates, so final spend can exceed a threshold.
  • Smart Routing picks the lowest-cost capable model for each subagent task.
  • Prefer Foundation Model APIs over custom serving when they already serve the model unchanged.

Sources: Control spending | Databricks on AWS (opens in a new tab) · Serve custom LLMs with Custom Model Serving | Databricks on AWS (opens in a new tab)

Check

Check: Use Databricks features to control LLM costs

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Use inference tables and Agent Monitoring to track a live LLM endpoint · 9 steps + check · 5 min

Domain 6 · Topic 6 of 10

Use inference tables and Agent Monitoring to track a live LLM endpoint

Step 1 of 9

Think first How would you capture and watch what a live LLM endpoint receives and returns?

Why it matters: Questions describe a deployed endpoint or agent and ask how to log, sample or monitor its traffic.

Inference tables log an endpoint's requests and responses into Unity Catalog. For agents, they can also hold MLflow traces. Production monitoring then runs scorers on a sample of those traces and records the results.

Step 2 of 9

Term Meaning
Inference table A Delta table in Unity Catalog that logs serving requests and responses.
Payload table The raw table of agent traffic that request and assessment logs are derived from.
Production monitoring Scheduled scorers that evaluate a sample of incoming agent traces.
Sampling rate The fraction of requests a fast inference table logs.

Step 3 of 9

Inference tables keep request inputs and responses in a Delta table. The table lives in Unity Catalog. For agents, Databricks creates three inference tables per deployment, and they can also store MLflow traces for debugging and performance monitoring.

Step 4 of 9

Agents deployed with mlflow.deploy() get inference tables automatically. For programmatic deployments, set ENABLE_MLFLOW_TRACING to True in the endpoint configuration.

Exam trap You cannot point Unity Gateway inference tables at an existing table. Databricks creates a new one after the endpoint gets its first request.

Step 5 of 9

Enabling AI Gateway (legacy) inference tables needs Can Manage on the endpoint. The endpoint's creator and its modifier both also need USE CATALOG, USE SCHEMA and CREATE TABLE in Unity Catalog. Payloads over 1 MiB are logged as null, with logging_error_codes filled in.

Step 6 of 9

Log delivery for agent and Foundation Model API endpoints is best effort. Expect logs within 1 hour of a request. Request logs and assessment logs, built from the payload table, may lag further. On CPU custom model endpoints, fast inference tables log 100% of requests unless you lower the rate.

Exam trap Inference table logs are not real time. Delivery is best effort, with logs expected within 1 hour of a request.

Step 7 of 9

Production monitoring runs scorers on a configurable sample of traces. Results attach to each evaluated trace as feedback. If the traces live in Unity Catalog, monitoring needs a SQL warehouse ID configured.

Exam trap Monitoring traces stored in Unity Catalog does not work until a SQL warehouse ID is configured.

Step 8 of 9

Join with system.serving.served_entities for foundation model details. That system table describes the model behind the endpoint. For agents, both the request logs and the assessment logs are deprecated, and a future release removes them.

Step 9 of 9

  • Agents deployed with mlflow.deploy() get inference tables automatically.
  • Expect inference table logs within 1 hour; delivery is best effort.
  • Production monitoring scores a sample of traces and attaches feedback to each one.
  • Traces stored in Unity Catalog need a SQL warehouse ID for monitoring.

Sources: Log requests and responses for serving endpoints (legacy) | Databricks on AWS (opens in a new tab) · Set up production monitoring | Databricks on AWS (opens in a new tab) · Log requests and responses to inference tables | Databricks on AWS (opens in a new tab)

Check

Check: Use inference tables and Agent Monitoring to track a live LLM endpoint

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Identify evaluation judges that require ground truth · 8 steps + check · 5 min

Domain 6 · Topic 7 of 10

Identify evaluation judges that require ground truth

Step 1 of 8

Think first If you have no labeled answers for your evaluation data, which built-in judges can you still run, and which must wait?

Why it matters: Questions describe the data you have and ask which built-in judge needs ground truth and which does not.

Built-in judges use Databricks-hosted LLMs to score quality. Most need only inputs and outputs. A few compare against ground truth, so they also need expectations, and those judges cannot run without labels.

Step 2 of 8

Term Meaning
Ground truth The known correct answer or facts that a judge compares a response against.
Expectations The judge argument that carries ground truth, such as expected facts, for each example.
Built-in LLM judge A predefined scorer that uses a Databricks-hosted LLM to rate a quality dimension.
Multi-turn judge A judge that takes a whole session rather than one input and output.

Step 3 of 8

Correctness, RetrievalSufficiency and ToolCallCorrectness need it. Each one takes expectations alongside inputs and outputs, so you need labeled data before you can use them.

Built-in judges that require ground truth

Judge Arguments What it checks
Correctness inputs, outputs, expectations Whether the response matches the provided ground truth
RetrievalSufficiency Uses expectations Whether the context holds everything needed for the ground truth facts
ToolCallCorrectness Uses expectations Whether tool calls and arguments are right for the query

Exam trap RetrievalSufficiency is not the same as RetrievalRelevance; sufficiency needs ground truth, relevance does not.

Step 4 of 8

Relevance, safety and groundedness judges need no labels. RelevanceToQuery, RetrievalRelevance, Safety and RetrievalGroundedness run on inputs and outputs. So does ToolCallEfficiency. RetrievalGroundedness checks for hallucination against the retrieved context, not against ground truth.

Exam trap Detecting hallucination does not require labels; RetrievalGroundedness compares the response with the retrieved context.

Step 5 of 8

Neither guideline judge requires ground truth. Guidelines() applies one set of global rules to every row and works offline and in production monitoring. ExpectationsGuidelines() applies per-row guidelines that experts label, passed in expectations, and runs in offline evaluation only.

Exam trap ExpectationsGuidelines() cannot run in production monitoring; it is for offline evaluation only.

Step 6 of 8

Session judges take a session and need no ground truth. ConversationCompleteness, UserFrustration and KnowledgeRetention look at a whole conversation rather than a single turn.

Step 7 of 8

Synthetic evaluations can supply expectations. With MLflow 3, generate_evals_df returns expectations holding expected_facts and expected_retrieved_context for each example. Note that judge alignment supports neither agent-based nor expectation-based evaluation.

Step 8 of 8

  • Correctness, RetrievalSufficiency and ToolCallCorrectness all require ground truth.
  • RetrievalGroundedness catches hallucination without ground truth.
  • Guidelines() works offline and online; ExpectationsGuidelines() is offline only.
  • Multi-turn judges take a session and need no ground truth.

Sources: Built-in LLM judges | Databricks on AWS (opens in a new tab) · Synthesize evaluation sets | Databricks on AWS (opens in a new tab) · Create a guidelines LLM judge | Databricks on AWS (opens in a new tab) · Align LLM judges with human feedback | Databricks on AWS (opens in a new tab)

Check

Check: Identify evaluation judges that require ground truth

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Use AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent Framework · 8 steps + check · 5 min

Domain 6 · Topic 8 of 10

Use AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent Framework

Step 1 of 8

Think first How do you watch, limit and audit traffic to an LLM or agent you have deployed?

Why it matters: Questions describe a monitoring or cost-control need and ask which AI Gateway feature or setting meets it.

Inference tables log each request and response, the usage table tracks calls to each service, and rate limits cap traffic. Together they let you monitor, attribute and control a deployed model or agent.

Step 2 of 8

Term Meaning
Inference table A Unity Catalog Delta table that logs a model service's requests and responses.
Usage table The system.ai_gateway.usage system table, which records requests to gateway services.
Rate limit A cap on requests per minute (QPM) or tokens per minute (TPM) for a service.
Request tags Labels sent in a request header to attribute usage to projects, teams or end users.

Step 3 of 8

Inference tables store requests and responses in Delta tables. Use them to monitor, debug and optimize models. They are billed for the requests and responses they log. Payloads over 10 MiB are skipped, and logging_error_codes flags it.

Step 4 of 8

Databricks creates the table; you cannot pick an existing one. It appears after the endpoint's first request, and rows can take up to an hour to show. You need MANAGE on the service, CREATE TABLE in the schema, USE CATALOG and USE SCHEMA.

Exam trap Do not rename, delete or change the schema of an inference table. It can stop logging data or become corrupted.

Step 5 of 8

system.ai_gateway.usage records requests to gateway services. It covers model services, model provider services and MCP services. Send the Databricks-Ai-Gateway-Request-Tags header to attribute usage to teams or projects.

Exam trap Ordinary users cannot query the usage table by default. Both account admin and metastore admin roles are needed unless admins grant access.

Step 6 of 8

Model services take QPM and TPM limits; MCP services take QPM only. No rate limits exist by default. A service can have up to 20 limits, with at most 5 group-specific ones.

Rate limits on model and MCP services

Feature Model services MCP services
Requests per minute (QPM) Supported Supported
Tokens per minute (TPM) Supported Not supported

Step 7 of 8

The more restrictive of a request and a token limit applies. A user-specific limit beats a group-specific one. The service limit is a global maximum that blocks all requests once exceeded. Blocked calls get HTTP 429, so clients should retry with exponential backoff.

Exam trap A generous user limit does not bypass the service limit. When the service maximum is exceeded, every request is blocked.

Step 8 of 8

  • Inference tables log requests and responses to Delta tables; payloads over 10 MiB are skipped.
  • Databricks creates a new inference table for you; rows can take up to an hour to appear.
  • MCP services accept only QPM limits; model services accept QPM and TPM.
  • Exceeding a rate limit returns HTTP 429; clients should retry with exponential backoff.

Sources: Log requests and responses to inference tables | Databricks on AWS (opens in a new tab) · Track model usage | Databricks on AWS (opens in a new tab) · Apply rate limits to model and MCP services | Databricks on AWS (opens in a new tab)

Check

Check: Use AI Gateway (Inference Tables, Usage Tables, and rate limiting) to track an LLM or agent deployed via Agent Framework

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Use Databricks custom Scorers for evaluating agents and LLMs · 8 steps + check · 5 min

Domain 6 · Topic 9 of 10

Use Databricks custom Scorers for evaluating agents and LLMs

Step 1 of 8

Think first When should you write your own scorer instead of relying on a built-in LLM judge?

Why it matters: Questions describe an evaluation need and ask which custom scorer type or setup fits it.

Built-in judges cover common checks. When they don't fit, write a custom judge with make_judge or a code-based scorer in Python. The scorer type also decides whether it can run in production monitoring.

Step 2 of 8

Term Meaning
Code-based scorer A Python function you write to score agent output when built-in and custom LLM judges don't fit.
@scorer decorator The recommended way to define most code-based scorers as plain functions.
Scorer class A subclass for scorers that need state, complex initialization or Pydantic fields.
make_judge An MLflow function that creates an LLM judge tailored to your own use case.

Step 3 of 8

Code-based scorers fill the gaps LLM judges leave. Use one for a custom heuristic or programmatic metric. Use one to change how trace data maps to a built-in judge. Use one to evaluate with your own LLM rather than a Databricks-hosted judge.

Step 4 of 8

Start with @scorer; use the Scorer class only when you need it. The decorator suits most cases. A Scorer subclass fits when the scorer needs state, complex initialization or Pydantic fields.

The two ways to define a code-based scorer

Feature @scorer function Scorer class
Use it for Most cases; the recommended starting point State, complex initialization or Pydantic fields
Production monitoring Supported Not supported

Exam trap A Scorer subclass cannot run in production monitoring. For a stateful production scorer, use @scorer and keep the state inside the function body.

Step 5 of 8

The same code-based scorer can evaluate and monitor. mlflow.genai.evaluate() runs your scorers during development, and the same scorer can then monitor production. Production @scorer functions have to be created and registered in a Databricks notebook.

Exam trap Registering a monitoring scorer outside a Databricks notebook does not work. The monitoring service serializes the function code, and that step needs the notebook environment.

Step 6 of 8

make_judge builds an LLM judge for your own criteria. Its instructions reference template variables such as {{ inputs }}, {{ outputs }} and {{ expectations }}. One example judge rates an answer's markdown formatting and accuracy as high, medium or low quality.

Step 7 of 8

optimize_prompts takes custom judges through its scorers argument. The optimizer works with numbers, so you also pass an aggregation function. It turns the judge's feedback into a numeric score.

Example: Runs prompt optimization with a custom judge and a feedback-to-score function.

result = mlflow.genai.optimize_prompts(
    predict_fn=predict_fn,
    train_data=dataset,
    prompt_uris=[prompt.uri],
    optimizer=GepaPromptOptimizer(...),
    scorers=[markdown_output_judge],
    aggregation=feedback_to_score
)
  • scorers=[markdown_output_judge]: passes the custom judge
  • aggregation=feedback_to_score: maps the judge's feedback to a number

Exam trap The optimizer cannot use a judge's feedback as it comes. The feedback has to be mapped to a numeric score first.

Step 8 of 8

  • Start with the @scorer decorator; use a Scorer class only for state, complex setup or Pydantic fields.
  • Production monitoring runs built-in judges and @scorer functions, not Scorer subclasses.
  • Define and register production @scorer functions from a Databricks notebook.
  • For prompt optimization, map judge feedback to a numeric score with an aggregation function.

Sources: Code-based scorers | Databricks on AWS (opens in a new tab) · Optimize prompts using custom scorers | Databricks on AWS (opens in a new tab)

Check

Check: Use Databricks custom Scorers for evaluating agents and LLMs

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Up next: Incorporate SME feedback to improve agent performance · 9 steps + check · 5 min

Domain 6 · Topic 10 of 10

Incorporate SME feedback to improve agent performance

Step 1 of 9

Think first How do you turn what subject-matter experts know into better agent versions?

Why it matters: Questions describe an expert review need and ask which MLflow labeling feature or setting fits.

Experts review copies of agent traces in a labeling session and record labels on them. Ground-truth labels then become evaluation datasets, so you can test each new agent version against what experts expect.

Step 2 of 9

Term Meaning
Labeling session A special MLflow Run that queues traces for chosen experts to review with selected schemas.
Labeling schema Defines what experts record; it is either an expectation type or a feedback type.
Expectation A ground-truth label, such as expected facts, that can feed an evaluation dataset.
Review App The app where experts define good responses and help align LLM judges.

Step 3 of 9

Experts define what a high-quality response looks like. You engage them through the Review App. Their input also aligns LLM judges with your business requirements. For new human-review workflows, Databricks recommends review queues, currently in Beta.

Step 4 of 9

Expectation schemas capture answers; feedback schemas capture judgments. Pick the type by what the expert gives you. Built-in schemas include EXPECTED_FACTS, EXPECTED_RESPONSE and GUIDELINES, or you can create custom ones.

Expectation and feedback schemas compared

Feature Expectation Feedback
What the expert gives A ground truth or correct answer A subjective assessment, rating or classification
Example expected_facts for a RAG response A rating of a response
Schema setting type="expectation" type="feedback"

Exam trap A rating is not ground truth. Ratings and classifications belong in feedback schemas, while correct answers belong in expectation schemas.

Step 5 of 9

A labeling session works as a review queue of traces. It is a special type of MLflow Run. Traces are copied into it, so labels never change your original logged traces. Experts need CAN_EDIT permission on the MLflow experiment.

Exam trap Labeling does not alter the logged traces. The session works on copies, so the originals stay as they were.

Step 6 of 9

Aim for 25-100 traces per session. That range helps avoid reviewer fatigue. Session names might not be unique, so store and reference each session by session.mlflow_run_id.

Exam trap Do not look a session up by its name. Names can repeat, so use the MLflow run ID instead.

Step 7 of 9

Labels are stored as Assessment objects on each trace. A trace with a ground-truth expectation becomes a ready-made test case. When expectations sync to an evaluation dataset, each trace's inputs act as the record key. You then test new agent versions with mlflow.genai.evaluate().

Step 8 of 9

The Chat UI needs an agent on a Model Serving endpoint. For now, it cannot reach agents deployed on Databricks Apps. Plan the deployment target before you invite experts to chat with the agent.

Step 9 of 9

  • Expectation schemas capture ground truth; feedback schemas capture ratings and judgments.
  • Labeling sessions copy traces, so expert labels never change the originals.
  • Keep sessions to 25-100 traces and track them by session.mlflow_run_id.
  • Expectation labels feed evaluation datasets used with mlflow.genai.evaluate().

Sources: Enable experts and collaborators to label traces | Databricks on AWS (opens in a new tab) · Collect feedback and build datasets | Databricks on AWS (opens in a new tab) · Create and manage labeling sessions | Databricks on AWS (opens in a new tab) · Test an agent with the Chat UI | Databricks on AWS (opens in a new tab)

Check

Check: Incorporate SME feedback to improve agent performance

Cards to recall, then questions on this topic. About 2 minutes. Nothing is saved without an account.

Loading the cards and questions…

Domain 6 · after the last topic

Domain 6 review

Each topic's Check tested it on its own; this mixes them.

Mixed quiz

Take the Domain 6 quiz

5 questions mixed from every topic in this domain, each answer explained. Mixing topics is harder than one at a time, and it is what the exam does. No account needed; with a free account your answers also build your estimated exam score.

Flashcards

Domain 6 flashcards

20 cards with this domain's key facts. Flip each one and check what you knew. No account needed.

Test yourself in exam conditions

A full Databricks Certified Generative AI Engineer Associate mock exam: 45 questions in 90 minutes. Your first one is free.

Start a free mock exam
All domains studiedTry a timed mock exam

Report a problem

On “”. Tell us what looks wrong; we read every report.

What is the problem?

Optional.