TExcelTAD
Home › NLP, Transformers & LLM Fine-Tuning › Deploying LLMs: Serving, Cost, Safety and Monitoring

Deploying LLMs: Serving, Cost, Safety and Monitoring

A model that answers well in a notebook is a fraction of a product. Deployed, it needs a server that batches requests from many users, a budget that says which model size and precision you can afford at your latency target, output that other code can parse, guardrails for what it must not say or log, and monitoring that notices when a new version answers worse, before the users do. This lesson assembles those pieces for the TAD Bikes help assistant of the RAG lessons, using the performance model of Fast Inference and the precisions of Quantizing LLMs.

General MLOps (containers, CI/CD, model registries, drift monitoring) is the subject of the Deployment and MLOps course; the application-side basics of cost, caching and streaming are in Cost, Latency and Caching and Streaming. Here the focus is what is specific to serving LLMs.

The serving architecture

client gatewayauth, limits, PII response cache routerA/B, canary server v1 (95%) server v2 (5%) batching + KV cache validate, guardstream tokens logs + metrics: latency, TTFT, tokens, cost, refusals, ungrounded

Each box has one job:

  • Gateway: authentication, per-user rate limits and quotas (an LLM endpoint without them is an open invitation to run up your bill), request size limits, and redaction of personal data before anything is logged or forwarded.
  • Response cache: identical (normalised) questions with the same retrieved context get the stored answer; for a help centre, a large share of questions repeat. Engines add a prefix cache inside the server: requests sharing a long system prompt reuse its KV blocks and skip that part of the prefill.
  • Router: picks the model version per request, for A/B tests and canary releases, and can route easy questions to a small model and hard ones to a large one.
  • Model servers: an inference engine with continuous batching and paged KV cache. Scale horizontally behind the router; each replica holds a full copy of the weights (or a tensor-parallel group of GPUs for models too large for one).
  • Validation and guardrails: parse and validate structured output, check grounding, filter what must not be shown, and stream the result.
  • Monitoring: every request leaves a log line with its latencies, tokens, cost, version and quality flags.

Choosing a model size and precision

The decision is a constrained optimisation: among the options that fit in memory and meet the quality bar and the latency target, take the cheapest. With the decode model of the previous lesson, one step reads the weights and the KV cache of the batch:

tstep≈N⋅bw+B⋅L⋅KVtokη β,tanswer≈tprefill+nout tstep,cost per token=price per GPU-second⋅tstepBt_{\text{step}} \approx \frac{N \cdot b_w + B \cdot L \cdot \text{KV}_{\text{tok}}}{\eta\, \beta}, \qquad t_{\text{answer}} \approx t_{\text{prefill}} + n_{\text{out}}\, t_{\text{step}}, \qquad \text{cost per token} = \frac{\text{price per GPU-second} \cdot t_{\text{step}}}{B}

with NN parameters at bwb_w bytes each, a batch of BB conversations of LL tokens, and an efficiency η\eta (real servers reach perhaps half to three quarters of the peak bandwidth β\beta). Quality comes from your evaluation set, measured for each model and precision, not from a leaderboard. The calculator below uses invented round numbers for two GPU types, three model sizes and three precisions; replace them with your measurements.

python · try it yourself
import math

# Every number here is a made-up round number for the exercise, not a real model, GPU or price.
gpus = {"G24": dict(mem=24, bw=1.0e12, cost=0.8), "G80": dict(mem=80, bw=3.0e12, cost=3.0)}   # GB, bytes/s, $/h
models = {"3B": dict(N=3e9, quality=0.71, kv_kb=48), "8B": dict(N=8e9, quality=0.80, kv_kb=128),
          "70B": dict(N=70e9, quality=0.88, kv_kb=320)}          # quality: score on YOUR eval set
precisions = {"fp16": (2.0, 0.00), "int8": (1.0, 0.01), "int4": (0.5, 0.03)}   # bytes/weight, quality loss

need = dict(quality=0.78, p_answer_s=6.0, out_tokens=300, ctx=3000, users=16, req_per_day=200_000)
EFF = 0.6                                  # share of the peak bandwidth a real server achieves

print(f"{'option':<15} {'quality':>7} {'tok/s/user':>10} {'answer s':>8} {'$/1M tok':>8}")
best = None
for gname, g in gpus.items():
    for mname, m in models.items():
        for pname, (bpw, loss) in precisions.items():
            w_gb = m["N"] * bpw / 1e9
            kv_gb = need["users"] * need["ctx"] * m["kv_kb"] * 1e3 / 1e9
            fits = w_gb + kv_gb <= 0.9 * g["mem"]
            if not fits:
                continue
            step = (w_gb + kv_gb) * 1e9 / (g["bw"] * EFF)        # one decode step reads weights + KV cache
            tps_user = 1 / step
            answer_s = need["out_tokens"] * step + 0.3              # + prefill and network, rough
            usd_per_m = g["cost"] / 3600 / (need["users"] / step) * 1e6
            q = m["quality"] - loss
            ok = q >= need["quality"] and answer_s <= need["p_answer_s"]
            print(f"{gname} {mname:>3} {pname:<5} {q:>7.2f} {tps_user:>10.0f} {answer_s:>8.1f} {usd_per_m:>8.2f}"
                  + ("  <- meets target" if ok else ""))
            if ok and (best is None or usd_per_m < best[0]):
                best = (usd_per_m, f"{gname} {mname} {pname}", need["users"] / step, g["cost"])
usd_per_m, name, gpu_tps, gpu_cost = best
tokens_per_day = need["req_per_day"] * need["out_tokens"]
peak_tps = 3 * tokens_per_day / 86400                       # plan for 3x the average rate
n_gpus = math.ceil(peak_tps / gpu_tps)
print(f"\ncheapest option meeting the target: {name} at ${usd_per_m:.2f} per 1M output tokens if fully used")
print(f"{tokens_per_day / 1e6:.0f}M tokens/day, peak {peak_tps:.0f} tok/s, one GPU serves {gpu_tps:.0f} tok/s "
      f"-> {n_gpus} GPUs, ${n_gpus * 24 * gpu_cost:.0f}/day (ideal ${usd_per_m * tokens_per_day / 1e6:.0f})")
option          quality tok/s/user answer s $/1M tok
G24  3B fp16     0.71         72      4.5     0.19
G24  3B int8     0.70        113      3.0     0.12
G24  3B int4     0.68        158      2.2     0.09
G24  8B int8     0.79         42      7.4     0.33
G24  8B int4     0.77         59      5.4     0.23
G80  3B fp16     0.71        217      1.7     0.24
G80  3B int8     0.70        339      1.2     0.15
G80  3B int4     0.68        473      0.9     0.11
G80  8B fp16     0.80         81      4.0     0.64  <- meets target
G80  8B int8     0.79        127      2.7     0.41  <- meets target
G80  8B int4     0.77        177      2.0     0.29
G80 70B int4     0.85         36      8.7     1.46

cheapest option meeting the target: G80 8B int8 at $0.41 per 1M output tokens if fully used
60M tokens/day, peak 2083 tok/s, one GPU serves 2036 tok/s -> 2 GPUs, $144/day (ideal $25)

Only two options meet both the quality bar of 0.78 and the 6-second answer time: the 8B model on the large GPU in fp16 or int8. Int8 is the cheaper of the two ($0.41 against $0.64 per million output tokens) because each step moves half the bytes. The 3B models are fast and cheap but below the quality bar; the 8B model on the small GPU meets the bar in int8 but takes 7.4 s per answer; the 70B model fits only in int4 and is too slow at 16 concurrent users. The last two lines are the part that is usually forgotten: GPUs are billed by the hour, not by the token, and traffic peaks. Planning for 3 times the average rate needs 2 GPUs, $144 per day, against an "ideal" $25 if every GPU-second were used. Utilisation, not the price per token, decides the bill; that is the argument for autoscaling, for sharing GPUs between services, and for API providers when traffic is small or spiky.

Streaming

Users judge speed by the time to the first token (TTFT), not to the last. Servers therefore stream tokens as they are generated, usually as server-sent events through an OpenAI-compatible HTTP endpoint. A generic client loop, not run here:

python
with client.stream(prompt, max_tokens=300) as events:      # any streaming chat API
    for event in events:
        if event.type == "text":
            send_to_browser(event.text)                     # forward each chunk at once
        elif event.type == "end":
            log(ttft=event.ttft, out_tokens=event.usage.output_tokens, stop=event.stop_reason)

Streaming complicates the checks that follow generation: a grounding check or JSON validation needs the complete answer. Common compromises are to stream free text and validate it at the end (retracting or flagging it if it fails), to buffer sentence by sentence and check each, or not to stream structured output at all. Always log the stop reason: an answer that stopped at max_tokens is truncated, and its JSON will not parse.

Structured output and validation

When the answer feeds other code (a ticket system, a UI with fields), the model must return JSON that matches a schema. Structured Output showed how to ask for it; on the server side, validate everything with a schema library and treat a failure as a normal event with a policy: retry with the error message, fall back to a safe answer, or hand over to a human. Pydantic expresses the schema once, validates, and exports a JSON Schema that you can put in the prompt or pass to an engine that supports constrained decoding (only tokens that keep the output valid are allowed, which guarantees syntax but not correct content).

python · try it yourself
import json, re
from typing import Literal
from pydantic import BaseModel, Field, ValidationError, field_validator

class SupportReply(BaseModel):
    intent: Literal["pricing", "unlock", "return", "payment", "damage", "other"]
    answer: str = Field(min_length=1, max_length=300)
    sources: list[int] = Field(min_length=1)            # cited chunk numbers
    confidence: float = Field(ge=0, le=1)

    @field_validator("sources")
    @classmethod
    def known_sources(cls, v):
        if any(s < 1 or s > 3 for s in v):              # the prompt contained sources [1]..[3]
            raise ValueError("cites a source that was not in the prompt")
        return v

def parse(raw):
    start, end = raw.find("{"), raw.rfind("}")         # models like to wrap JSON in prose or ``` fences
    if start < 0:
        return None, ["no JSON object found"]
    if end < start:
        return None, ["truncated JSON (did generation hit max_tokens?)"]
    try:
        return SupportReply.model_validate_json(raw[start:end + 1]), []
    except ValidationError as e:
        return None, [f"{'.'.join(map(str, err['loc'])) or 'json'}: {err['msg']}" for err in e.errors()]

outputs = [
    '{"intent": "payment", "answer": "Cash is not accepted.", "sources": [2], "confidence": 0.93}',
    'Sure! ```json\n{"intent": "pricing", "answer": "A day pass costs 15 euros.", "sources": [1], "confidence": 0.9}\n```',
    '{"intent": "refund", "answer": "", "sources": [4], "confidence": 1.7}',
    '{"intent": "unlock", "answer": "Scan the QR code.", "sources": [1], "confidence": 0.8',
]
for raw in outputs:
    reply, errors = parse(raw)
    print("OK " + reply.model_dump_json() if reply else "REJECTED")
    for e in errors:
        print("   ", e)
print(json.dumps(SupportReply.model_json_schema()["properties"]["intent"]))
OK {"intent":"payment","answer":"Cash is not accepted.","sources":[2],"confidence":0.93}
OK {"intent":"pricing","answer":"A day pass costs 15 euros.","sources":[1],"confidence":0.9}
REJECTED
    intent: Input should be 'pricing', 'unlock', 'return', 'payment', 'damage' or 'other'
    answer: String should have at least 1 character
    sources: Value error, cites a source that was not in the prompt
    confidence: Input should be less than or equal to 1
REJECTED
    truncated JSON (did generation hit max_tokens?)
{"enum": ["pricing", "unlock", "return", "payment", "damage", "other"], "title": "Intent", "type": "string"}

The first two outputs pass, the second after extracting the JSON from the chatty wrapper the model put around it. The third is rejected with four precise messages, one per field: an intent outside the allowed list, an empty answer, a citation of source 4 when the prompt contained 3, and a confidence of 1.7. These messages are exactly what a retry prompt should contain. The fourth was cut off, the signature of a max_tokens limit that is too low.

Guardrails and privacy

Guardrails are checks before and after the model, each cheap and narrow; none replaces the others:

  • Input: scope rules (a bike-rental assistant does not give medical or legal advice), injection patterns (previous discussion), and length limits.
  • Output: schema validation, the grounding check, and a classifier or keyword filter for content the product must never show.
  • Data: redact personal data before logging and before sending text to a third-party API. Card numbers are recognisable by the Luhn checksum, which separates them from order numbers of the same length.
python · try it yourself
import re

def luhn_ok(digits):
    total, parity = 0, len(digits) % 2
    for i, ch in enumerate(digits):
        d = int(ch)
        if i % 2 == parity:
            d = d * 2 - 9 if d > 4 else d * 2
        total += d
    return total % 10 == 0

def redact(text):
    """Mask personal data before a prompt or answer is logged or sent to a third party."""
    text = re.sub(r"[\w.+-]+@[\w-]+\.[\w.]+", "[EMAIL]", text)
    def card(m):
        digits = re.sub(r"\D", "", m.group(0))
        return "[CARD]" if 13 <= len(digits) <= 19 and luhn_ok(digits) else m.group(0)
    text = re.sub(r"\b(?:\d[ -]?){12,18}\d\b", card, text)
    text = re.sub(r"\+\d[\d ()-]{7,}\d", "[PHONE]", text)       # international numbers only
    return text

OUT_OF_SCOPE = {"medical": r"\b(diagnos|medicine|symptom)", "legal": r"\b(lawsuit|sue|lawyer)",
                "other customers": r"\b(where is|address of|phone of) (my|the) (neighbour|ex|other)"}

def input_guard(question):
    for topic, pattern in OUT_OF_SCOPE.items():
        if re.search(pattern, question, flags=re.I):
            return f"refuse ({topic}): hand over to human support"
    return "allow"

msgs = ["My card 4539 1488 0343 6467 was charged twice, mail me at ana.lopez@example.com",
        "Order 1234 5678 9012 3456 is late, call +49 30 1234 5678",
        "Should I sue you because my knee hurts after a ride?",
        "How long can I reserve a bike?"]
for m in msgs:
    print(f"{input_guard(m):<42} | log: {redact(m)}")
allow                                      | log: My card [CARD] was charged twice, mail me at [EMAIL]
allow                                      | log: Order 1234 5678 9012 3456 is late, call [PHONE]
refuse (legal): hand over to human support | log: Should I sue you because my knee hurts after a ride?
allow                                      | log: How long can I reserve a bike?

The card number passes the Luhn check and is masked; the 16-digit order number fails it and is kept, which matters for support staff reading the log. The legal question is refused with a hand-over. The knee pain in the same sentence was not caught by the "medical" rule, a reminder that regular expressions are a first layer, not a classifier. Privacy also means decisions outside the code: which provider and region process the text, how long logs are kept, whether prompts may be used for training (by you or the provider), and how a user's request to delete their data reaches the logs and the evaluation sets built from them. Key users by an opaque id, never by e-mail.

Monitoring, A/B tests and canary releases

The monitoring store answers two questions: is the service healthy (latency percentiles, TTFT, error and timeout rates, tokens and cost per request, GPU memory and queue length), and is it answering well (refusal rate, grounding-check failures, schema failures, user feedback such as thumbs down, and a daily sample graded by a judge or a human). Means hide the tail: report the 50th, 95th and 99th percentiles.

A new model version, prompt or quantization goes out as a canary: a small share of traffic (here 5%) for a fixed period, compared with the current version on the same metrics, with rollback rules decided in advance. The simulation sends 40,000 requests of one day, 5% of them to a cheaper, faster v2 that is slightly worse in truth, and compares rates with a one-sided two-proportion zz-test,

z=p^2−p^1p^(1−p^)(1n1+1n2),p^=x1+x2n1+n2z = \frac{\hat{p}_2 - \hat{p}_1}{\sqrt{\hat{p}(1 - \hat{p})\left(\frac{1}{n_1} + \frac{1}{n_2}\right)}}, \qquad \hat{p} = \frac{x_1 + x_2}{n_1 + n_2}

rolling back if z>1.645z > 1.645 (5% one-sided) and the increase exceeds a practical limit.

python · try it yourself
import numpy as np

rng = np.random.default_rng(0)

def traffic(n, version):
    """Simulated request logs; v2 is a cheaper, quantized model that is slightly worse."""
    out_tok = rng.lognormal(5.0, 0.5, n).astype(int)                 # answer length in tokens
    ttft = rng.lognormal(np.log(0.35), 0.4, n)                        # time to first token, s
    tps = 60 if version == "v1" else 85                               # decode speed per stream
    latency = ttft + out_tok / tps
    cost = (2000 * 0.5 + out_tok * 1.5) / 1e6 * (1 if version == "v1" else 0.6)   # made-up $ per request
    refused = rng.random(n) < 0.03
    ungrounded = rng.random(n) < (0.020 if version == "v1" else 0.035)          # grounding check failed
    thumbs_down = rng.random(n) < (0.060 if version == "v1" else 0.068)
    return dict(latency=latency, ttft=ttft, out_tok=out_tok, cost=cost,
                refused=refused, ungrounded=ungrounded, thumbs_down=thumbs_down)

def report(name, t):
    p50, p95, p99 = np.percentile(t["latency"], [50, 95, 99])
    print(f"{name}: n={len(t['cost'])}  latency p50 {p50:.1f}s p95 {p95:.1f}s p99 {p99:.1f}s  "
          f"TTFT p95 {np.percentile(t['ttft'], 95):.2f}s  tokens/answer {t['out_tok'].mean():.0f}  "
          f"cost/1k req ${t['cost'].mean() * 1000:.2f}")
    print(f"      refused {t['refused'].mean():.1%}  ungrounded {t['ungrounded'].mean():.1%}  "
          f"thumbs down {t['thumbs_down'].mean():.1%}")

# canary: 5% of a day's 40,000 requests go to v2
base, canary = traffic(38_000, "v1"), traffic(2_000, "v2")
report("v1 (95%)", base)
report("v2  (5%)", canary)

def two_prop_z(a, b):                      # z statistic for a difference of two rates
    p = (a.sum() + b.sum()) / (len(a) + len(b))
    return (b.mean() - a.mean()) / np.sqrt(p * (1 - p) * (1 / len(a) + 1 / len(b)))

for metric, limit in [("ungrounded", 0.005), ("thumbs_down", 0.01)]:
    z = two_prop_z(base[metric], canary[metric])
    diff = canary[metric].mean() - base[metric].mean()
    verdict = "ROLL BACK" if z > 1.645 and diff > limit else "keep watching"
    print(f"{metric:<12} change {diff:+.2%}  z = {z:.2f}  guard: worse by > {limit:.1%} -> {verdict}")
v1 (95%): n=38000  latency p50 2.9s p95 6.0s p99 8.3s  TTFT p95 0.67s  tokens/answer 168  cost/1k req $1.25
      refused 3.1%  ungrounded 2.0%  thumbs down 6.0%
v2  (5%): n=2000  latency p50 2.2s p95 4.3s p99 6.1s  TTFT p95 0.68s  tokens/answer 171  cost/1k req $0.75
      refused 2.2%  ungrounded 2.9%  thumbs down 6.8%
ungrounded   change +1.00%  z = 3.10  guard: worse by > 0.5% -> ROLL BACK
thumbs_down  change +0.82%  z = 1.49  guard: worse by > 1.0% -> keep watching

v2 is faster (p95 latency 4.3 s against 6.0 s) and 40% cheaper per request ($0.75 against $1.25 per thousand), and its ungrounded rate rises from 2.0% to 2.9%: z=3.10z = 3.10 and an increase of 1.00 point, above the 0.5-point limit, so the rule says roll back. Its thumbs-down rate also rose (6.0% to 6.8%), but with 2,000 canary requests that is not yet distinguishable from noise (z=1.49z = 1.49). The grounding check, an automatic per-request quality signal, detected the regression a day before user feedback could have. Two practical notes: decide the metrics, limits and duration before the canary starts (looking every hour and stopping at the first significant result inflates false alarms), and for slow-moving metrics like satisfaction use a longer A/B test with a power calculation for the effect size you care about.

Serving engines (not run here)

The course image runs on a CPU without a pretrained LLM, so the engines are described, not run:

  • vLLM: PagedAttention, continuous batching, prefix caching, speculative decoding, tensor parallelism, quantized checkpoints (GPTQ, AWQ, fp8), and an OpenAI-compatible HTTP server. A common default for GPU serving.
  • Text Generation Inference (TGI): Hugging Face's server with similar features, integrated with the Hub; now in maintenance mode (its repository was archived in March 2026), so mainly for existing deployments.
  • llama.cpp: C/C++ inference for CPUs, Apple silicon and consumer GPUs, with the GGUF format and its block-quantized types; runs 4-bit models on a laptop.
  • Ollama: a convenient local runner and model manager, originally built on llama.cpp (and still running GGUF models with it), with a simple HTTP API.

An offline batch job with vLLM looks like this (requires a CUDA GPU and the model weights):

python
from vllm import LLM, SamplingParams

llm = LLM(model="<an 8B instruct model, AWQ int4>", quantization="awq", max_model_len=8192)
params = SamplingParams(temperature=0, max_tokens=300)
outputs = llm.generate([build_prompt(q) for q in questions], params)   # batched automatically

Pitfalls

  • Sizing by price per token. GPUs are billed per hour; plan for peak load and utilisation.
  • Choosing a model from a leaderboard. Measure quality on your own evaluation set, per precision.
  • Trusting model output as data. Validate every structured answer; plan for failures.
  • Logging raw prompts. They contain personal data; redact before logging and set retention.
  • Watching means. Latency tails and rare failure rates matter; track percentiles and rates.
  • Shipping without a canary and a rollback rule. A cheaper model that is slightly worse is the normal case, not the exception.

Practice

  1. In the calculator, raise need["p_answer_s"] to 8 s. Which option becomes the cheapest, and what is the catch?
  2. Why does the cost per million tokens fall with the batch size, and what limits the batch?
  3. Add a rule to the Pydantic model that rejects an answer containing a number that does not appear in any cited source. Where does that rule need the sources from?
  4. In the canary simulation, the thumbs-down rate rose by 0.82 points with z=1.49z = 1.49. Roughly how many canary requests would make an increase of that size significant at z>1.645z > 1.645, assuming the same rates?
  5. Name three things in the monitoring store that must be redacted or access-controlled.
Answers
  1. "G24 8B int8": 0.79 quality, 7.4 s, $0.33 per million tokens, cheaper than the G80 int8 option ($0.41). The catch: 7.4 s per 300-token answer, 42 tokens per second per user; with streaming that may be acceptable (the first token arrives quickly), without it users wait 7 s.
  2. One decode step reads the weights once for the whole batch, so a larger batch spreads the same GPU-second over more tokens. The KV cache grows with batch times context and must fit in memory, and the per-user speed falls as the step time grows.
  3. A validator on the whole model (for example model_validator(mode="after")) that compares the numbers in answer with those in the cited sources. Pydantic validates only the data it receives, so the sources must be passed in as validation context (model_validate_json(raw, context={"sources": ...})) or checked in a separate step after parsing.
  4. zz grows with n\sqrt{n} for a fixed difference: (1.6451.49)2≈1.22\left(\frac{1.645}{1.49}\right)^2 \approx 1.22, so about 2,440 canary requests instead of 2,000 (slightly more in practice, since the base group is large and fixed). A safer plan targets a power of 80%, which needs roughly (1.645+0.841.49)2≈2.8\left(\frac{1.645 + 0.84}{1.49}\right)^2 \approx 2.8 times the sample, about 5,600 requests.
  5. The prompts and answers themselves (personal data in free text), user ids and IP addresses, and retrieved chunks from access-restricted documents; also feedback comments.

Go further: AI Security: OWASP LLM Top 10, Model Supply Chain and Governance covers the security side of deploying a model.

Test yourself

In the calculator, why is the 8B model in int8 on the large GPU cheaper per token than the same model in fp16?

  1. Int8 has better quality
  2. Each decode step reads half as many weight bytes, so the step is shorter and more tokens come out per GPU-second
  3. Int8 needs no KV cache
  4. The large GPU is cheaper in int8

The calculator's ideal cost was $25 per day but the plan costs $144. Why?

  1. Quantization overhead
  2. GPUs are billed per hour and must cover peak traffic, so most GPU-seconds are not used
  3. Streaming doubles the cost
  4. The KV cache is billed separately

Which output did the Pydantic validator reject with four separate errors?

  1. The JSON wrapped in a code fence
  2. The answer with intent "refund", an empty answer, source 4 and confidence 1.7
  3. The truncated JSON
  4. The answer citing source 2

Why does the redaction function check the Luhn checksum before masking a 16-digit number?

  1. To make the regular expression faster
  2. To mask card numbers but keep order numbers of the same length that support staff need
  3. Because phone numbers have checksums
  4. It is required by Pydantic

In the canary, the ungrounded rate rose from 2.0% to 2.9% with z=3.10z = 3.10. What did the rule decide, and why was user feedback not enough?

  1. Keep v2; feedback was fine
  2. Roll back; the per-request grounding check detects the regression with far fewer requests than the noisier thumbs-down rate
  3. Roll back because v2 was faster
  4. Keep watching; z must exceed 5