CertSafari
    Databricks Certified Generative AI Engineer Associate· Lessons

    Domain 6 · Lesson 52/56

    Inference tables: logging live endpoint requests to Unity Catalog

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

    12 min read
    1.2% of exam
    4 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Explain where an inference table stores request and response payloads and how to query them
    • Enable inference tables on a serving endpoint or deployed agent and name the permissions this requires
    • Read the inference table schema to find the status, latency, payload and requester of a call
    • Recognise which requests an inference table can miss, and tell inference tables apart from usage tables

    Key concept

    Inference table — A Unity Catalog Delta table that Databricks creates and fills automatically with every request and response sent to a Model Serving endpoint. Because it is an ordinary governed table, you query live traffic with SQL or a notebook, the same way you would query any other data.

    1.Where a live endpoint's payloads end up

    Once an LLM or agent is serving real users, the first question after any complaint is: what exactly did they send, and what exactly came back? An AI Gateway-enabled inference table answers it. Once it is turned on, every request to the endpoint and its response is written to a Delta table in a Unity Catalog schema. These are not Parquet files on a DBFS mount, not JSON blobs in a bucket you manage, and not a workspace-local Hive table. The table is governed by Unity Catalog like any other, so you can use Databricks SQL, notebooks and dashboards on it.

    Inference tables have four common uses. You can join logged requests with ground-truth labels to build a training or fine-tuning corpus. You can monitor data and model quality over time. You can debug production failures from the status codes and raw JSON. You can keep a compliance audit trail. Inference tables are supported for endpoints serving provisioned throughput workloads, pay-per-token models, external models, custom models and deployed agents.

    Agents get this logging by default. An agent deployed with mlflow.deploy() has inference tables enabled automatically, and its table holds both the payloads and the MLflow trace logs for each call. If you deploy an agent programmatically some other way, set the ENABLE_MLFLOW_TRACING environment variable to True in the endpoint configuration to get the same result. Either way, last week's raw requests are already in a Unity Catalog table, and you read them with a query.

    Reading an inference table from Databricks SQL or a notebooksql
    SELECT * FROM <catalog>.<schema>.<payload_table>

    Model Serving also has other monitoring tools, but they are short-lived or show aggregates. Service logs are stdout and stderr, which are useful while you deploy but are not a payload record. Health metrics show latency and error rates but no request contents. Payloads are not stored as MLflow run parameters either. The inference table is the only one of these that keeps each request body as a queryable row.

    Model Serving monitoring tools and what each one keeps
    ToolWhat it capturesWhere you read it
    Ephemeral service logsstdout and stderr streams from the endpointLogs tab in the Serving UI, streamed in real time
    Endpoint health metricsLatency, request rate, error rate, CPU usage, memory usageServing UI, last 14 days by default
    AI Gateway-enabled inference tablesOnline prediction requests and responsesDelta tables managed by Unity Catalog

    Checkpoint 1 of 7· Match them up

    A user complains about an answer from your live agent endpoint. Match each Model Serving monitoring tool to what it can show you.

    Tap a term, then the definition that fits it.

    Checkpoint 2 of 7· Exam question

    A team deploys an agent to a Model Serving endpoint using the mlflow.deploy() API and wants to inspect the exact raw JSON requests and responses that production users have sent to the endpoint over the past week. Where should they look, and how should they query it?

    Checkpoint 3 of 7· Exam question

    In what format and storage layer does Databricks persist the request and response data captured by an inference table for a Model Serving endpoint?

    Sources1

    2.Enabling an inference table and who may do it

    You can enable inference tables on a new endpoint or an existing one. When you create an endpoint, select Enable inference tables in the AI Gateway section of the Serving UI. For an existing endpoint, open it, click Edit AI Gateway and select the same option. To stop logging, clear the checkbox and click Update. After the served models are ready, every request and response is logged without any code changes.

    Enabling it requires permissions on both the endpoint and the catalog. The person who created the endpoint and the person changing it both need Can Manage on the endpoint. They also need USE CATALOG on the target catalog, USE SCHEMA on the target schema, and CREATE TABLE in that schema. The catalog cannot be an OpenSharing catalog to the current metastore. The user who enabled the table owns it, and access to it follows normal Unity Catalog ACLs that the owner can change.

    Because Databricks creates the table, you only choose its location. If you need the logs to land next to an existing audit table, put them in the same schema and join or union the two downstream. Databricks recommends enabling predictive optimization for better inference table performance.

    Checkpoint 4 of 7· Check yourself

    A data engineer has Can Manage on a serving endpoint, plus USE CATALOG on the target catalog and USE SCHEMA on the target schema. Saving the endpoint with Enable inference tables selected still fails. What is missing?

    Sources1

    3.Reading the schema: status, latency, payload, requester

    Each row records one request. The columns most used in debugging are status_code (did it fail?), execution_duration_ms (was it slow?), request and response (what was said?), and requester (who called?). The full set follows.

    Inference table columns for a Model Serving endpoint
    ColumnTypeWhat it holds
    request_dateDATEUTC date the request was received
    databricks_request_idSTRINGDatabricks-generated identifier attached to every request
    client_request_idSTRINGOptional identifier the caller supplies in the request body
    request_timeTIMESTAMPWhen the request was received
    status_codeINTHTTP status code returned from the model
    sampling_fractionDOUBLEFraction kept if down-sampled; 1 means every request was included
    execution_duration_msBIGINTModel inference time only, excluding network overhead
    requestSTRINGRaw request JSON body sent to the endpoint
    responseSTRINGRaw response JSON body returned by the endpoint
    served_entity_idSTRINGUnique ID of the served entity
    logging_error_codesARRAYWhy a payload could not be logged, such as MAX_REQUEST_SIZE_EXCEEDED
    requesterSTRINGUser or service principal whose permissions made the call

    Two columns are easy to misread. execution_duration_ms is the time the model spent generating predictions, not the latency the user experienced. A user can see a slow response while this column looks normal, because network overhead is not counted. requester is NULL for route-optimized custom model endpoints, so you cannot attribute calls by user on that kind of endpoint.

    The request and response columns are raw JSON strings, so you parse them in SQL to pull out fields such as the user message or the generated text. To find out which foundation model handled a row, join on served_entity_id to the system.serving.served_entities system table.

    Joining logged requests to the served model's detailssql
    SELECT * FROM <catalog>.<schema>.<payload_table> payload
    JOIN system.serving.served_entities se on payload.served_entity_id = se.served_entity_id

    Checkpoint 5 of 7· Check yourself

    Users complain that your agent endpoint often takes several seconds to answer. In the inference table, execution_duration_ms for those same requests is consistently low. What is the most likely explanation?

    Sources1

    4.What an inference table can miss

    An inference table is a near-complete record, not a perfect one. The gaps fall in predictable places, and some of them hide exactly the failures you are trying to find.

    These are the gaps to plan around:

    • Large payloads. Requests and responses larger than 10 MiB are not logged. The row records MAX_REQUEST_SIZE_EXCEEDED or MAX_RESPONSE_SIZE_EXCEEDED in logging_error_codes.
    • Error responses. Requests that return 401, 403, 429 or 500 may not be logged. So a table with few rate-limit errors does not prove that callers are not being throttled.
    • Delay. Rows can take up to an hour to appear after the endpoint receives its first request, so an empty table straight after you enable it is expected.
    • Down-sampling. If sampling_fraction is below 1, raw row counts undercount traffic.

    Inference tables and usage tables are often confused. Usage tables are the place for volume and cost questions. system.ai_gateway.usage records token counts, latency, requester and request tags for each request routed through the gateway, and legacy serving endpoints log to system.serving.endpoint_usage. Neither stores the request or response body, so for raw payloads you query the inference table. Usage tables are covered in AI Gateway usage tables and rate limits.

    Checkpoint 6 of 7· Match them up

    You are auditing a live endpoint's inference table and notice the following. Match each observation to the logging gap that explains it.

    Tap a term, then the definition that fits it.

    Checkpoint 7 of 7· Check yourself

    For a gateway-routed endpoint, a finance lead wants token consumption per team. A reviewer wants the exact prompt behind one flagged answer. Where should each of them look?

    Sources213

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Agents deployed using the mlflow.deploy() API have inference tables automatically enabled.”
      ↩︎ Where a live endpoint's payloads end up
      “For programmatic deployments, set the ENABLE_MLFLOW_TRACING environment variable to True in the endpoint configuration.”
      ↩︎ Where a live endpoint's payloads end up
      “these inference tables store payload and request details as well as MLflow Trace logs.”
      ↩︎ Where a live endpoint's payloads end up
      “By joining inference tables with ground truth labels, you can create a training corpus”
      ↩︎ Where a live endpoint's payloads end up
      “Both the creator of the endpoint and the modifier must have Can Manage permission on the endpoint.”
      ↩︎ Enabling an inference table and who may do it
      “The owner of the inference tables is the user who enabled the inference table.”
      ↩︎ Enabling an inference table and who may do it
      “This field returns NULL for route-optimized custom model endpoints.”
      ↩︎ Reading the schema: status, latency, payload, requester
      “Foundation model details are captured in the system.serving.served_entities system table.”
      ↩︎ Reading the schema: status, latency, payload, requester
      “The inference table could stop logging data or become corrupted if you do any of the following:”
      ↩︎ What an inference table can miss
      “The inference table automatically captures incoming requests and outgoing responses for an endpoint and logs them as a Unity Catalog Delta table.”
      ↩︎ Key concept
      “This does not include overhead network latencies and only represents the time it took for the model to generate predictions.”
      ↩︎ Exam trap 3
      “Specifying an existing table is not supported.”
      ↩︎ Prediction
      “USE SCHEMA permissions on the specified schema. CREATE TABLE permissions in the schema.”
      ↩︎ Checkpoint
      “This does not include overhead network latencies and only represents the time it took for the model to generate predictions.”
      ↩︎ Checkpoint
    2. 2.
      “Requests and responses larger than 10 MiB aren't logged.”
      ↩︎ What an inference table can miss
      “Rows can take up to an hour to appear in the table after the endpoint receives its first request.”
      ↩︎ What an inference table can miss
      “Logs may not be populated for requests that return 401, 403, 429, or 500 errors.”
      ↩︎ Exam trap 2
      “Error responses: Logs may not be populated for requests that return 401, 403, 429, or 500 errors.”
      ↩︎ Checkpoint
    3. 3.
      “Unity Gateway endpoints log to system.ai_gateway.usage, whereas model serving endpoints (legacy) log to system.serving.endpoint_usage.”
      ↩︎ What an inference table can miss
      “query the system.ai_gateway.usage table to analyze usage metrics like token counts, latency, requester, and request tags for every request routed through the gateway”
      ↩︎ Exam trap 1
      “query the system.ai_gateway.usage table to analyze usage metrics like token counts, latency, requester, and request tags for every request routed through the gateway”
      ↩︎ Checkpoint

    Also cited

    Continue to part 2 of 2

    Agent Monitoring: scheduled scorers on production traces

    Spotted a mistake, or was something unclear? Tell us.