CertSafari
    Databricks Certified Generative AI Engineer Associate· Lessons

    Domain 6 · Lesson 48/56

    Choosing metrics to monitor a deployed LLM application

    Select key metrics to monitor for a specific LLM deployment scenario

    16 min read
    1.2% of exam
    10 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    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.

    Recommended RAG metrics by dimension, and which can run on unlabeled production traffic
    DimensionMetricMeasured byNeeds ground truth?Usable in production monitoring?
    Retrievalchunk_relevance/precisionLLM judgeNoYes
    Retrievaldocument_recallDeterministicYesNo
    Retrievalcontext_sufficiencyLLM judgeYesNo
    ResponsecorrectnessLLM judgeYesNo
    Responserelevance_to_queryLLM judgeNoYes
    ResponsegroundednessLLM judgeNoYes
    ResponsesafetyLLM judgeNoYes
    Costtotal_token_count, total_input_token_count, total_output_token_countDeterministicNoYes
    Latencylatency_secondsDeterministicNoYes

    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?

    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.

    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.

    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.

    Registering and starting a safety scorer on every successful tracepython
    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'"
        ),
    )

    Checkpoint 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?

    Sources34

    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?

    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?

    Sources56

    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.

    Serving endpoint health metrics and what each one tells you
    MetricWhat it measuresRead it as
    Latency (ms)P50 and P99 round-trip time within DatabricksExcludes authentication and rate-limiting latency
    Model inference latency (ms)P50 and P99 time the model spends computing a predictionIsolates model execution from queueing and infrastructure
    Request queue time (ms)P50 and P99 wait in the backlog before a replica startsElevated values mean the endpoint is under-provisioned for its traffic
    Request rate (per second)Requests per minute divided by 60Traffic volume
    Request error rate (per second)4xx and 5xx responses per minute divided by 60Reliability
    CPU usage (%) / Memory usage (%)Average utilisation across server replicasResource pressure on CPU endpoints
    GPU usage (%) / GPU memory usage (%)Average per-GPU utilisation, sampled once a minuteMost accurate under constant load
    Provisioned concurrencyMaximum parallel requests the system can handleMoves 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.

    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?

    Sources789

    Sources

    (10)

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

    1. 1.
      “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. 2.
      “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. 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. 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. 5.
      “For model requests, it records metrics such as token usage and latency.”
      ↩︎ Token, latency and capacity signals
    6. 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. 7.
      “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. 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

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