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.
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.
| Tool | What it captures | Where you read it |
|---|---|---|
| Ephemeral service logs | stdout and stderr streams from the endpoint | Logs tab in the Serving UI, streamed in real time |
| Endpoint health metrics | Latency, request rate, error rate, CPU usage, memory usage | Serving UI, last 14 days by default |
| AI Gateway-enabled inference tables | Online prediction requests and responses | Delta 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.
Only the inference table keeps each request and response body as a governed, queryable Delta row. Service logs are short-lived stdout and stderr, and health metrics show aggregates without any payload contents.
“Automatically logs online prediction requests and responses into Delta tables managed by Unity Catalog”Source: docs.databricks.com
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?
Correct answer: A — Query the inference table that the endpoint writes to in Unity Catalog, using SQL with a filter on the request timestamp for the past seven days
- A. Correct. Deploying the agent enables an inference table for the endpoint. It stores each raw JSON request and response as a row in a Unity Catalog Delta table, so a SQL filter on the request timestamp returns the past week of production traffic.
- B. Incorrect. MLflow experiment runs record the agent's logging, development and evaluation activity. They do not hold the payloads that production users send to a live endpoint, which are captured in a Delta table instead, so filtering runs by start time returns no production requests.
- C. Incorrect. The Logs tab in the Serving UI shows container and service output, such as startup messages and errors, kept for a limited period. It is not a store of request and response bodies, so exporting it will not yield the exact payloads users sent over the past week.
- D. Incorrect. The AI Gateway usage tracking system table records consumption metadata such as token counts, status and timing for each request. It does not store the request and response JSON, so it cannot show the exact payloads the team wants to inspect.
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?
Correct answer: A — As a Delta table stored in a Unity Catalog schema
- A. Correct. An inference table is a Delta table registered under a catalog and schema in Unity Catalog. It can be queried with SQL and governed with the same permissions as other Unity Catalog tables.
- B. Incorrect. Delta is the right format, but inference tables are created in Unity Catalog, not in the legacy workspace-local Hive metastore, which has no centralized governance across workspaces.
- C. Incorrect. Unity Catalog is the right place, but captured requests and responses are not kept as loose Parquet files in a volume. They are stored as a Delta table that is queried and governed as a table.
- D. Incorrect. Inference tables are neither Parquet tables nor Hive metastore objects. They are Delta tables registered in Unity Catalog, not in the legacy workspace-local metastore.
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?
Databricks creates the inference table itself, so the user also needs CREATE TABLE in the schema, along with Can Manage on the endpoint and USE CATALOG and USE SCHEMA. You can't point logging at an existing table, and admin rights aren't required.
“USE SCHEMA permissions on the specified schema. CREATE TABLE permissions in the schema.”Source: docs.databricks.com
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.
| Column | Type | What it holds |
|---|---|---|
| request_date | DATE | UTC date the request was received |
| databricks_request_id | STRING | Databricks-generated identifier attached to every request |
| client_request_id | STRING | Optional identifier the caller supplies in the request body |
| request_time | TIMESTAMP | When the request was received |
| status_code | INT | HTTP status code returned from the model |
| sampling_fraction | DOUBLE | Fraction kept if down-sampled; 1 means every request was included |
| execution_duration_ms | BIGINT | Model inference time only, excluding network overhead |
| request | STRING | Raw request JSON body sent to the endpoint |
| response | STRING | Raw response JSON body returned by the endpoint |
| served_entity_id | STRING | Unique ID of the served entity |
| logging_error_codes | ARRAY | Why a payload could not be logged, such as MAX_REQUEST_SIZE_EXCEEDED |
| requester | STRING | User 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.
SELECT * FROM <catalog>.<schema>.<payload_table> payload
JOIN system.serving.served_entities se on payload.served_entity_id = se.served_entity_idCheckpoint 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?
execution_duration_ms measures only how long the model spent generating predictions. Network overhead is excluded, so a low value can sit alongside the slow response users actually experienced.
“This does not include overhead network latencies and only represents the time it took for the model to generate predictions.”Source: docs.databricks.com
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_EXCEEDEDorMAX_RESPONSE_SIZE_EXCEEDEDinlogging_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_fractionis 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.
An inference table is a near-complete record with predictable gaps: a logging delay, a 10 MiB payload limit, error responses that may not be logged, and down-sampling. A low count of 429 rows therefore does not prove that callers aren't being throttled.
“Error responses: Logs may not be populated for requests that return 401, 403, 429, or 500 errors.”Source: docs.databricks.com
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?
Usage tables answer volume and cost questions with token counts, latency, requester and request tags, but they don't store payloads. The raw request and response bodies are only in the inference table.
“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”Source: docs.databricks.com
Sources
(4)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 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.
“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.
“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
- https://docs.databricks.com/aws/en/machine-learning/model-serving/monitor-diagnose-endpointsOfficial docs
“Automatically logs online prediction requests and responses into Delta tables managed by Unity Catalog”
↩︎ Checkpoint