What you will be able to do
- Pick monitoring metrics across retrieval, response quality, cost and latency that can be computed on unlabeled production traffic
- Tell component, compound and overall metrics apart and say when each is needed to diagnose a failure
- Set per-scorer sample rates so critical checks cover all traffic while expensive judges stay affordable
- Use tokens-per-second capacity, endpoint health metrics and per-request inference table records as the latency, cost and reliability signals for a deployment
Key concept
Label-free monitoring metric set — Production traffic has no ground-truth answers, so a monitoring metric set is built from metrics that work without labels: reference-free LLM judges for retrieval and response quality, and deterministic counts for cost, latency and endpoint health. Pick from that pool according to the risks of the specific deployment.
1.Four dimensions, filtered by what production can measure
A deployed LLM application can fail in four places, and a useful monitoring plan has at least one metric for each. Retrieval quality asks whether the right context was fetched. Response quality asks whether the answer was relevant, grounded and safe. Cost is token consumption, and latency is how long the app took to run. Which metrics you weight most depends on the scenario. A public chatbot puts safety first. An internal policy assistant cares most about groundedness. A high-volume summarisation endpoint watches tokens closely.
Measure retrieval and response together, because each one can hide a problem in the other. An answer can be wrong even though the retriever found the right passage, because the model ignored it. An answer can also look fine while the retrieval behind it was poor. If you only track response quality, you can see that something broke but not which step broke it.
The lifecycle phase limits which metrics you can use at all. During evaluation you have a curated set with expected answers. In production you only have the requests users send. That is the practical point of the Evaluation phase vs monitoring phase split: in production you choose metrics that need no ground truth. As a result, the Judges that require ground truth (expectations), such as correctness and context sufficiency, are left out of the monitoring set. They have nothing to compare against.
Retrieval shows the filter clearly. Of the two classic retrieval scores in Precision@k and recall@k, only precision survives in production. An LLM judge can rate each retrieved chunk as relevant or not without knowing the full set of correct documents. Recall needs that full set, so it can't be computed on unlabeled traffic. The production stand-in for retrieval quality is therefore judge-based chunk relevance.
| Dimension | Metric | Measured by | Needs ground truth? | Usable in production monitoring? |
|---|---|---|---|---|
| Retrieval | chunk_relevance/precision | LLM judge | No | Yes |
| Retrieval | document_recall | Deterministic | Yes | No |
| Retrieval | context_sufficiency | LLM judge | Yes | No |
| Response | correctness | LLM judge | Yes | No |
| Response | relevance_to_query | LLM judge | No | Yes |
| Response | groundedness | LLM judge | No | Yes |
| Response | safety | LLM judge | No | Yes |
| Cost | total_token_count, total_input_token_count, total_output_token_count | Deterministic | No | Yes |
| Latency | latency_seconds | Deterministic | No | Yes |
Checkpoint 1 of 8· Check yourself
Users say a live RAG assistant has started giving poor answers. The team's monitoring covers only response quality: relevance_to_query, groundedness and safety. Those scores have dropped. What can the team still not tell from this metric set?
Response-quality scores show that something went wrong, not where. A poor answer can come from bad retrieval or from a model that ignored the right passage, so you also need a retrieval metric such as chunk relevance to find the cause. Correctness would not help, because it needs ground truth that production traffic does not have.
“Only by measuring both components can we accurately diagnose and address issues in the application.”Source: docs.databricks.com
Sources1
2.Component, compound and overall metrics
In a classical ML model there is only one component, so a metric on that component is also the metric for the whole system. A RAG application or agent is a chain of steps, so its metrics come at three levels.
The three levels differ in what each metric has to read:
- Component metrics score one step's inputs and outputs, such as precision@k on the retriever, latency of a single call, or toxicity of the generated text.
- Compound metrics score how steps interact. Faithfulness (groundedness) is the standard example: it checks whether the generator stuck to what the retriever returned, so it needs the chain input, the chain output and the retriever's output.
- Overall metrics score only the system's end-to-end input and output, such as answer correctness or end-to-end latency.
You need all three, because each answers a different question. An overall metric tells you users are getting worse answers. A compound metric tells you whether the generator stopped following its context. Component metrics then point to the step that changed. Changing one element, such as how documents are formatted, can alter which chunks are retrieved and then how good the answer is. A dip in an overall score therefore says almost nothing about the cause until you look one level down.
These levels also set a requirement for logging. Compound and component metrics can only run in production if each trace records the intermediate steps, including the retrieved documents, and not just the final request and answer. If the app logs only inputs and outputs, you can compute overall metrics and nothing else. A drop in groundedness, for example, cannot be traced back to retrieval.
At retrieval. If answers still faithfully follow their context while overall quality falls, the generator is doing its job on poor input. Check the retriever's component metric, such as chunk relevance, next.
Checkpoint 2 of 8· Match them up
Match each RAG metric to its level and what it has to read to be computed.
Tap a term, then the definition that fits it.
Precision@k looks only at the retriever step, so it is a component metric. Faithfulness checks whether the generator stuck to what the retriever returned, so it reads across steps and is a compound metric. Answer correctness judges only the final answer against the request, which makes it an overall metric.
“Faithfulness measures the generator's adherence to the knowledge from a retriever that requires the chain input, chain output, and output of the internal retriever.”Source: docs.databricks.com
Sources2
3.Scheduling quality scorers and setting sample rates
Response-quality metrics reach production as scheduled scorers. Production monitoring runs MLflow scorers on a sample of live traces and attaches the results to each trace as feedback. The mechanics are covered in Agent Monitoring: scheduled scorers on production traces. The decisions for a given scenario are which scorers to schedule and how much traffic each one sees. An experiment can have at most 20 scorers running for continuous monitoring, so every scorer has to earn its place.
Sample rate is set per scorer, and it is the lever for judge compute cost. The rate is the fraction of incoming traces a scorer evaluates. A rate of 1.0 means every trace, 0.1 means about one in ten. The guidance follows the risk:
- Critical scorers such as safety and security checks run at
sample_rate=1.0, so no violation goes unseen. - Expensive scorers, such as complex LLM judges, run at 0.05–0.2.
- Scorers used for iterative improvement during development run at moderate rates of 0.3–0.5.
Take a customer support agent whose team must catch every safety violation but can only afford a groundedness judge on a small slice of traffic. Safety goes to 1.0 and groundedness to about 0.1. Reversing the two loses safety coverage, which is the requirement that can't bend. One shared rate of 0.5 fails the safety requirement and also overspends on groundedness. Setting both to 1.0 and expecting something downstream to cap the bill misunderstands where the cost is controlled: judge compute is decided by each scorer's sample rate.
Sampling also has a filter. The filter_string field in ScorerSamplingConfig limits a scorer to traces that match a condition, using the same syntax as mlflow.search_traces(). For example, you can restrict a scorer to traces that completed successfully, so judge calls are not spent on requests that already failed for infrastructure reasons.
from mlflow.genai.scorers import Safety, ScorerSamplingConfig
# Only evaluate traces that completed successfully
safety_judge = Safety().register(name="safety")
safety_judge = safety_judge.start(
sampling_config=ScorerSamplingConfig(
sample_rate=1.0,
filter_string="attributes.status = 'OK'"
),
)Checkpoint 3 of 8· Fill the gap
A public chatbot's compliance team requires every successfully completed response to be checked for harmful content. Safety is an LLM judge, and the budget is tight. Which value completes this scorer configuration?
from mlflow.genai.scorers import Safety, ScorerSamplingConfig
# Only evaluate traces that completed successfully
safety_judge = Safety().register(name="safety")
safety_judge = safety_judge.start(
sampling_config=ScorerSamplingConfig(
sample_rate= ? ,
filter_string="attributes.status = 'OK'"
),
)Safety is a critical check, so it runs at sample_rate=1.0 and no violation goes unseen. The budget is controlled through each scorer's own rate: lower the rate on the expensive judges such as groundedness, not on safety. The filter_string already skips traces that failed, so no judge calls are spent on them.
Source: docs.databricks.comCheckpoint 4 of 8· Exam question
A team deploys a customer support agent to production and wants to flag every safety violation, but can only afford to run their more expensive groundedness LLM judge against a small fraction of live traffic due to compute cost. How should they configure sample rates for their production monitoring scorers?
Correct answer: A — Set the safety scorer's sample rate to 1.0 and the groundedness scorer's sample rate to 0.1, with both scorers attached to the same production monitor for the agent's endpoint.
- A. A sample rate of 1.0 on the safety scorer evaluates each request, so no safety violation goes unchecked. A low rate such as 0.1 on the groundedness scorer keeps the expensive LLM judge on a small share of traffic, which fits the compute budget.
- B. This spends the full judge budget on groundedness while sampling only a tenth of requests for safety. Most safety violations would then go unchecked, and the team needs to flag them all. The expensive judge is also run on all traffic, which the team cannot afford.
- C. A uniform 0.5 leaves half of the requests unchecked for safety, so many violations are missed. It also sends half of live traffic through the groundedness judge, far more than the small fraction the team can afford.
- D. Rate limits on the endpoint throttle incoming requests. They do not control how many traces the monitoring scorers evaluate. With the groundedness scorer at 1.0, the LLM judge still runs on all traffic, so the compute constraint is not met.
4.Token, latency and capacity signals
Cost monitoring starts with tokens. Input, output and total token counts are deterministic: they can be computed from every request without a judge or a label. For traffic routed through the gateway, the source is the Usage tables (token counts and endpoint metadata). system.ai_gateway.usage records token usage, latency and requester for each model request, so you can group spend by endpoint, user or tag and see which consumer is driving cost.
Latency for an LLM deployment is more than one number. The live endpoint should track the generation-level signals defined in TTFT, TPOT, latency and throughput next to end-to-end latency_seconds. A streaming chatbot is judged mostly on time to first token. A batch summariser is judged on total time and throughput.
Guaranteed capacity is a provisioned throughput decision, and it is measured in tokens per second. You set a maximum tokens-per-second throughput, and the endpoint scales automatically down to a configured minimum. For models that measure capacity in throughput bands, the REST request sets this range with min_provisioned_throughput and max_provisioned_throughput. That makes tokens per second the capacity metric to plan against: compare observed token throughput at peak with the configured maximum. Pay-per-token serving bills by usage and gives no reserved capacity. Rate limits restrict what callers may send but do not reserve anything.
Checkpoint 5 of 8· Check yourself
Finance wants to know which internal team is driving the token bill on a high-volume summarisation endpoint that is routed through the gateway. They also don't want to pay for any extra judge calls. What should the engineer monitor?
Token counts are deterministic: they come from every request without a judge or a label. The gateway usage table records token counts along with the requester and request tags, so you can attribute spend to each consumer. Provisioned-throughput figures are for planning capacity, not for working out who is spending.
“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
Checkpoint 6 of 8· Exam question
A company deploys a foundation model to power a high-traffic production chatbot and needs guaranteed throughput in tokens per second regardless of traffic spikes, rather than variable per-token billing. Which deployment approach and metric should they use to plan and monitor capacity?
Correct answer: A — Provisioned throughput endpoints, planned and monitored in tokens per second, with a minimum and maximum range of provisioned capacity set per endpoint.
- A. Provisioned throughput endpoints reserve dedicated foundation-model capacity. They are sized as a range of tokens per second and billed for the reserved capacity, so throughput stays predictable during spikes without variable per-token charges.
- B. Pay-per-token endpoints share capacity and bill for each token consumed, so they keep the variable cost the company wants to leave. Raising a rate limit changes how many requests are admitted, not the throughput available, and queries per minute is not a tokens-per-second measure.
- C. AI Gateway rate limits cap how much traffic callers can send to an endpoint, mainly to control usage and cost. They reserve no inference capacity, so a higher ceiling does not guarantee any tokens-per-second throughput during a spike.
- D. Provisioned concurrency on custom model serving keeps a number of parallel requests ready, but it counts concurrent requests rather than tokens per second. It therefore cannot be used to plan or monitor a guaranteed token throughput for a foundation model.
5.Endpoint health metrics and per-request evidence
Endpoint health metrics describe the serving infrastructure, not the quality of the answers. They cover latency, request rate, error rate, CPU and memory usage, and on GPU endpoints GPU utilisation and provisioned concurrency. They appear by default in the Serving UI for the last 14 days and can be streamed in real time to observability tools such as Prometheus and Datadog. An endpoint can show perfect groundedness and still fail half its requests, so health metrics belong in every deployment's set.
| Metric | What it measures | Read it as |
|---|---|---|
| Latency (ms) | P50 and P99 round-trip time within Databricks | Excludes authentication and rate-limiting latency |
| Model inference latency (ms) | P50 and P99 time the model spends computing a prediction | Isolates model execution from queueing and infrastructure |
| Request queue time (ms) | P50 and P99 wait in the backlog before a replica starts | Elevated values mean the endpoint is under-provisioned for its traffic |
| Request rate (per second) | Requests per minute divided by 60 | Traffic volume |
| Request error rate (per second) | 4xx and 5xx responses per minute divided by 60 | Reliability |
| CPU usage (%) / Memory usage (%) | Average utilisation across server replicas | Resource pressure on CPU endpoints |
| GPU usage (%) / GPU memory usage (%) | Average per-GPU utilisation, sampled once a minute | Most accurate under constant load |
| Provisioned concurrency | Maximum parallel requests the system can handle | Moves within the compute scale-out range as traffic changes |
The three latency metrics break a slowdown into its parts. If round-trip latency rises while model inference latency stays flat, the extra time is being spent outside the model. Rising request queue time then confirms the endpoint has too few replicas, and widening the compute scale-out range is the fix. If model inference latency itself rises, the model or its lookups have become slower, and adding replicas won't help.
Health dashboards show aggregates. When one fires an alert, the per-request record is in the inference table. Once enabled, it automatically logs every request to the endpoint along with its response, so no extra logging code is needed. Setup and gaps are covered in Inference tables: enabling, schema and gaps. For investigating an alert, two columns matter most. execution_duration_ms is the time the model spent on inference. status_code is the HTTP status the model returned. Both sit beside the raw request and response, so a week of degrading response times can be queried with SQL and checked against the actual payloads that were slow or failed.
Checkpoint 7 of 8· Match them up
An on-call engineer is reading a serving endpoint's health dashboard during a slowdown. Pair each metric with the conclusion it supports.
Tap a term, then the definition that fits it.
Round-trip latency includes time spent waiting in the queue. If it rises while model inference latency stays flat and queue time climbs, the endpoint is under-provisioned, not slow. If model inference latency rises, the model itself is the cause, and more replicas won't fix it. The error rate measures reliability, which quality scores cannot show.
“Elevated queue time indicates the endpoint is under-provisioned for its incoming traffic; widening the compute scale-out range can reduce it.”Source: docs.databricks.com
Checkpoint 8 of 8· Exam question
An ML engineer notices that response times for a deployed RAG serving endpoint have degraded over the past week and needs historical execution-duration and HTTP status data to investigate, without adding any extra logging code. Which built-in feature should they query?
Correct answer: A — Query the endpoint's inference table in Unity Catalog, which records each request's execution duration, HTTP status code, and request and response payloads.
- A. Inference tables are Delta tables in Unity Catalog that capture request and response payloads, execution duration, HTTP status codes, and timestamps for a serving endpoint. That gives a week of latency history with no added logging code.
- B. Unity Catalog audit logs record governance and access events, such as who accessed which object and when. They do not hold per-request execution duration or HTTP status codes for serving traffic, so they cannot show where the latency regression began.
- C. Lakehouse Monitoring computes profile and drift metrics over payload data, and it reads from an inference table to do so. Its output tables hold aggregated statistics per time window, not per-request execution duration or HTTP status codes.
- D. MLflow experiment runs hold the parameters, metrics, and artifacts that training or evaluation code logs explicitly. Live serving requests do not create runs, so there is no per-request latency or status history there unless extra logging code is added.
Sources
(10)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.databricks.com/aws/en/agents/tutorials/ai-cookbook/evaluate-assess-performanceOfficial docs
“A RAG application can respond poorly despite retrieving the correct context; it can also provide good responses based on faulty retrievals.”
↩︎ Four dimensions, filtered by what production can measure“Computing precision does not require knowing all relevant items.”
↩︎ Four dimensions, filtered by what production can measure“Overall latency and token consumption are examples of chain performance metrics.”
↩︎ Four dimensions, filtered by what production can measure“Other LLM judges, such as groundedness, do not require human-labeled ground truth to assess their app outputs.”
↩︎ Key concept“Computing recall requires your ground-truth to contain all relevant items.”
↩︎ Exam trap 1“Some LLM judges, such as answer correctness, compare the human-labeled ground truth vs. the app outputs.”
↩︎ Prediction“Only by measuring both components can we accurately diagnose and address issues in the application.”
↩︎ Checkpoint - 2.https://docs.databricks.com/aws/en/agents/tutorials/ai-cookbook/fundamentals-evaluation-monitoring-ragOfficial docs
“Compound metrics evaluate how multiple components interact”
↩︎ Component, compound and overall metrics“Overall metrics evaluate the overall input and output of the system, for example, answer correctness and latency.”
↩︎ Component, compound and overall metrics“you need to know if the root cause of a low-quality answer is due to the retrieval step or a hallucination.”
↩︎ Component, compound and overall metrics“Faithfulness measures the generator's adherence to the knowledge from a retriever that requires the chain input, chain output, and output of the internal retriever.”
↩︎ Checkpoint - 3.
“For critical scorers such as safety and security checks, use sample_rate=1.0.”
↩︎ Scheduling quality scorers and setting sample rates“At any given time, at most 20 scorers can be associated with an experiment for continuous quality monitoring.”
↩︎ Scheduling quality scorers and setting sample rates“Configurable sampling rates so you can control the tradeoff between coverage and computational cost.”
↩︎ Scheduling quality scorers and setting sample rates“For expensive scorers, such as complex LLM judges, use lower sample rates (0.05-0.2).”
↩︎ Exam trap 2 - 4.
“continuously runs MLflow scorers on a sample of your live production traces and attaches the results as feedback”
↩︎ Scheduling quality scorers and setting sample rates - 5.
“For model requests, it records metrics such as token usage and latency.”
↩︎ Token, latency and capacity signals - 6.
“In the Up to dropdown you can configure the maximum tokens per second throughput for your endpoint.”
↩︎ Token, latency and capacity signals“you must specify the min_provisioned_throughput and max_provisioned_throughput fields in your request.”
↩︎ Token, latency and capacity signals“Provisioned throughput endpoints automatically scale, so you can select Modify to view the minimum tokens per second your endpoint can scale down to.”
↩︎ Exam trap 4 - 7.https://docs.databricks.com/aws/en/machine-learning/model-serving/metrics-export-serving-endpointOfficial docs
“Endpoint health metrics measures infrastructure and metrics such as latency, request rate, error rate, CPU usage, memory usage, etc.”
↩︎ Endpoint health metrics and per-request evidence“Elevated queue time indicates the endpoint is under-provisioned for its incoming traffic”
↩︎ Exam trap 3“Elevated queue time indicates the endpoint is under-provisioned for its incoming traffic; widening the compute scale-out range can reduce it.”
↩︎ Checkpoint - 8.https://docs.databricks.com/aws/en/machine-learning/model-serving/monitor-diagnose-endpointsOfficial docs
“Available by default in the Serving UI for the last 14 days.”
↩︎ Endpoint health metrics and per-request evidence - 9.
“all requests made to your models are logged automatically to the inference table, along with the responses.”
↩︎ Endpoint health metrics and per-request evidence“The time in milliseconds for which the model performed inference.”
↩︎ Endpoint health metrics and per-request evidence“The HTTP status code that was returned from the model.”
↩︎ Endpoint health metrics and per-request evidence
Also cited
“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