Lesson overview | Previous part | Lesson overview
Model Serving and Inference Optimization: Part 7: LLM Serving to References
7. LLM Serving
LLM Serving develops the part of model serving and inference optimization assigned by the approved Chapter 19 table of contents. The treatment is production-focused: every idea is connected to a versioned artifact, measurable signal, release decision, or incident response.
7.1 token latency
Token latency is part of the canonical scope of Model Serving and Inference Optimization. In production ML, the useful question is not only whether the model can be trained, but whether the surrounding artifact, signal, or control can be named, versioned, measured, and recovered after a failure.
For this section, the working object is serving architectures, inference optimization, queueing, capacity planning, deployment safety, and LLM serving economics. The notation below treats production systems as mathematical objects because that is how incidents become diagnosable. A dataset, feature, run, trace, or endpoint that lacks a stable identifier cannot be compared across time.
The formula is intentionally simple. It says that token latency should be reduced to a measurable object before anyone argues about dashboards or tools. Once the object is measurable, the system can decide whether to accept, warn, rollback, retrain, or escalate.
| Production object | Mathematical role | Operational consequence |
|---|---|---|
| Identifier | A stable key in a set or graph | Lets teams join logs, artifacts, and incidents |
| Version | A time-indexed element such as | Makes old and new behavior comparable |
| Metric | A function | Turns behavior into a release or alert signal |
| Contract | A predicate | Rejects invalid inputs before the model absorbs them |
| Owner | A decision variable outside the model | Prevents silent failure after detection |
Examples of token latency in a real system:
- A production pipeline records the input version, transformation code hash, model version, and endpoint version before serving predictions.
- An LLM application logs prompt version, retrieval index version, tool span, latency, token count, and guardrail action for each trace.
- A release gate compares the candidate model against the current model on quality, safety, latency, and cost before promotion.
Non-examples that often look similar but fail the production contract:
- A manually named file like
final_dataset.csvwith no hash, schema, lineage, or owner. - A metric screenshot pasted into chat without the run id, evaluation dataset, seed, or model artifact.
- A dashboard alert with no threshold rationale, no escalation rule, and no rollback candidate.
The AI connection is concrete. Modern ML and LLM systems are compound systems: data pipelines, feature stores, model registries, inference servers, retrievers, tools, evaluators, and safety layers. Token latency is one place where the compound system either becomes observable or becomes technical debt.
Operational checklist for token latency:
- State the artifact or signal being controlled.
- Give it a stable id and version.
- Define the metric or predicate that decides whether it is valid.
- Log the dependency chain needed to reproduce it.
- Attach an owner and a response action.
- Test the check in continuous integration or release gating.
A useful mental model is to treat every production ML component as a function with preconditions and postconditions. If is the upstream artifact and is the downstream artifact, the production question is whether the relation can be replayed and audited.
where is the transformation, is code or configuration, and is the execution environment. The hidden technical debt appears when any of , , or is missing from the record.
In notebooks, this subsection will be represented with small synthetic arrays, graphs, traces, or counters rather than external services. The point is not to mimic a vendor tool. The point is to make the mathematics of token latency executable enough to test.
Boundary note: this chapter assumes the evaluation methods from Chapter 17, the safety policy ideas from Chapter 18, and the data documentation work from Chapter 16. Here we focus on the production machinery that makes those ideas run repeatedly.
Failure analysis for token latency should be written before the incident occurs. A good production note asks what can be stale, missing, corrupted, delayed, unaudited, or too expensive. Each answer should correspond to one observable signal and one response action.
| Failure question | Production test | Response |
|---|---|---|
| Is the artifact stale? | Compare event time to freshness limit | Warn, block, or backfill |
| Is the artifact malformed? | Evaluate schema and semantic contract | Reject before serving or training |
| Is the artifact inconsistent? | Compare current statistic with reference statistic | Investigate drift or skew |
| Is the artifact unauditable? | Check for missing version, owner, or lineage edge | Stop promotion until metadata exists |
| Is the artifact too costly? | Track latency, tokens, storage, or compute | Route, cache, batch, or downscale |
The production design pattern is therefore not just to calculate a value. It is to calculate a value, compare it with a declared rule, log the evidence, and make the next action unambiguous. That four-step pattern will reappear across all Chapter 19 notebooks.
7.2 KV cache
Kv cache is part of the canonical scope of Model Serving and Inference Optimization. In production ML, the useful question is not only whether the model can be trained, but whether the surrounding artifact, signal, or control can be named, versioned, measured, and recovered after a failure.
For this section, the working object is serving architectures, inference optimization, queueing, capacity planning, deployment safety, and LLM serving economics. The notation below treats production systems as mathematical objects because that is how incidents become diagnosable. A dataset, feature, run, trace, or endpoint that lacks a stable identifier cannot be compared across time.
The formula is intentionally simple. It says that kv cache should be reduced to a measurable object before anyone argues about dashboards or tools. Once the object is measurable, the system can decide whether to accept, warn, rollback, retrain, or escalate.
| Production object | Mathematical role | Operational consequence |
|---|---|---|
| Identifier | A stable key in a set or graph | Lets teams join logs, artifacts, and incidents |
| Version | A time-indexed element such as | Makes old and new behavior comparable |
| Metric | A function | Turns behavior into a release or alert signal |
| Contract | A predicate | Rejects invalid inputs before the model absorbs them |
| Owner | A decision variable outside the model | Prevents silent failure after detection |
Examples of kv cache in a real system:
- A production pipeline records the input version, transformation code hash, model version, and endpoint version before serving predictions.
- An LLM application logs prompt version, retrieval index version, tool span, latency, token count, and guardrail action for each trace.
- A release gate compares the candidate model against the current model on quality, safety, latency, and cost before promotion.
Non-examples that often look similar but fail the production contract:
- A manually named file like
final_dataset.csvwith no hash, schema, lineage, or owner. - A metric screenshot pasted into chat without the run id, evaluation dataset, seed, or model artifact.
- A dashboard alert with no threshold rationale, no escalation rule, and no rollback candidate.
The AI connection is concrete. Modern ML and LLM systems are compound systems: data pipelines, feature stores, model registries, inference servers, retrievers, tools, evaluators, and safety layers. Kv cache is one place where the compound system either becomes observable or becomes technical debt.
Operational checklist for kv cache:
- State the artifact or signal being controlled.
- Give it a stable id and version.
- Define the metric or predicate that decides whether it is valid.
- Log the dependency chain needed to reproduce it.
- Attach an owner and a response action.
- Test the check in continuous integration or release gating.
A useful mental model is to treat every production ML component as a function with preconditions and postconditions. If is the upstream artifact and is the downstream artifact, the production question is whether the relation can be replayed and audited.
where is the transformation, is code or configuration, and is the execution environment. The hidden technical debt appears when any of , , or is missing from the record.
In notebooks, this subsection will be represented with small synthetic arrays, graphs, traces, or counters rather than external services. The point is not to mimic a vendor tool. The point is to make the mathematics of kv cache executable enough to test.
Boundary note: this chapter assumes the evaluation methods from Chapter 17, the safety policy ideas from Chapter 18, and the data documentation work from Chapter 16. Here we focus on the production machinery that makes those ideas run repeatedly.
Failure analysis for kv cache should be written before the incident occurs. A good production note asks what can be stale, missing, corrupted, delayed, unaudited, or too expensive. Each answer should correspond to one observable signal and one response action.
| Failure question | Production test | Response |
|---|---|---|
| Is the artifact stale? | Compare event time to freshness limit | Warn, block, or backfill |
| Is the artifact malformed? | Evaluate schema and semantic contract | Reject before serving or training |
| Is the artifact inconsistent? | Compare current statistic with reference statistic | Investigate drift or skew |
| Is the artifact unauditable? | Check for missing version, owner, or lineage edge | Stop promotion until metadata exists |
| Is the artifact too costly? | Track latency, tokens, storage, or compute | Route, cache, batch, or downscale |
The production design pattern is therefore not just to calculate a value. It is to calculate a value, compare it with a declared rule, log the evidence, and make the next action unambiguous. That four-step pattern will reappear across all Chapter 19 notebooks.
7.3 prompt batching
Prompt batching is part of the canonical scope of Model Serving and Inference Optimization. In production ML, the useful question is not only whether the model can be trained, but whether the surrounding artifact, signal, or control can be named, versioned, measured, and recovered after a failure.
For this section, the working object is serving architectures, inference optimization, queueing, capacity planning, deployment safety, and LLM serving economics. The notation below treats production systems as mathematical objects because that is how incidents become diagnosable. A dataset, feature, run, trace, or endpoint that lacks a stable identifier cannot be compared across time.
The formula is intentionally simple. It says that prompt batching should be reduced to a measurable object before anyone argues about dashboards or tools. Once the object is measurable, the system can decide whether to accept, warn, rollback, retrain, or escalate.
| Production object | Mathematical role | Operational consequence |
|---|---|---|
| Identifier | A stable key in a set or graph | Lets teams join logs, artifacts, and incidents |
| Version | A time-indexed element such as | Makes old and new behavior comparable |
| Metric | A function | Turns behavior into a release or alert signal |
| Contract | A predicate | Rejects invalid inputs before the model absorbs them |
| Owner | A decision variable outside the model | Prevents silent failure after detection |
Examples of prompt batching in a real system:
- A production pipeline records the input version, transformation code hash, model version, and endpoint version before serving predictions.
- An LLM application logs prompt version, retrieval index version, tool span, latency, token count, and guardrail action for each trace.
- A release gate compares the candidate model against the current model on quality, safety, latency, and cost before promotion.
Non-examples that often look similar but fail the production contract:
- A manually named file like
final_dataset.csvwith no hash, schema, lineage, or owner. - A metric screenshot pasted into chat without the run id, evaluation dataset, seed, or model artifact.
- A dashboard alert with no threshold rationale, no escalation rule, and no rollback candidate.
The AI connection is concrete. Modern ML and LLM systems are compound systems: data pipelines, feature stores, model registries, inference servers, retrievers, tools, evaluators, and safety layers. Prompt batching is one place where the compound system either becomes observable or becomes technical debt.
Operational checklist for prompt batching:
- State the artifact or signal being controlled.
- Give it a stable id and version.
- Define the metric or predicate that decides whether it is valid.
- Log the dependency chain needed to reproduce it.
- Attach an owner and a response action.
- Test the check in continuous integration or release gating.
A useful mental model is to treat every production ML component as a function with preconditions and postconditions. If is the upstream artifact and is the downstream artifact, the production question is whether the relation can be replayed and audited.
where is the transformation, is code or configuration, and is the execution environment. The hidden technical debt appears when any of , , or is missing from the record.
In notebooks, this subsection will be represented with small synthetic arrays, graphs, traces, or counters rather than external services. The point is not to mimic a vendor tool. The point is to make the mathematics of prompt batching executable enough to test.
Boundary note: this chapter assumes the evaluation methods from Chapter 17, the safety policy ideas from Chapter 18, and the data documentation work from Chapter 16. Here we focus on the production machinery that makes those ideas run repeatedly.
Failure analysis for prompt batching should be written before the incident occurs. A good production note asks what can be stale, missing, corrupted, delayed, unaudited, or too expensive. Each answer should correspond to one observable signal and one response action.
| Failure question | Production test | Response |
|---|---|---|
| Is the artifact stale? | Compare event time to freshness limit | Warn, block, or backfill |
| Is the artifact malformed? | Evaluate schema and semantic contract | Reject before serving or training |
| Is the artifact inconsistent? | Compare current statistic with reference statistic | Investigate drift or skew |
| Is the artifact unauditable? | Check for missing version, owner, or lineage edge | Stop promotion until metadata exists |
| Is the artifact too costly? | Track latency, tokens, storage, or compute | Route, cache, batch, or downscale |
The production design pattern is therefore not just to calculate a value. It is to calculate a value, compare it with a declared rule, log the evidence, and make the next action unambiguous. That four-step pattern will reappear across all Chapter 19 notebooks.
7.4 model routing
Model routing is part of the canonical scope of Model Serving and Inference Optimization. In production ML, the useful question is not only whether the model can be trained, but whether the surrounding artifact, signal, or control can be named, versioned, measured, and recovered after a failure.
For this section, the working object is serving architectures, inference optimization, queueing, capacity planning, deployment safety, and LLM serving economics. The notation below treats production systems as mathematical objects because that is how incidents become diagnosable. A dataset, feature, run, trace, or endpoint that lacks a stable identifier cannot be compared across time.
The formula is intentionally simple. It says that model routing should be reduced to a measurable object before anyone argues about dashboards or tools. Once the object is measurable, the system can decide whether to accept, warn, rollback, retrain, or escalate.
| Production object | Mathematical role | Operational consequence |
|---|---|---|
| Identifier | A stable key in a set or graph | Lets teams join logs, artifacts, and incidents |
| Version | A time-indexed element such as | Makes old and new behavior comparable |
| Metric | A function | Turns behavior into a release or alert signal |
| Contract | A predicate | Rejects invalid inputs before the model absorbs them |
| Owner | A decision variable outside the model | Prevents silent failure after detection |
Examples of model routing in a real system:
- A production pipeline records the input version, transformation code hash, model version, and endpoint version before serving predictions.
- An LLM application logs prompt version, retrieval index version, tool span, latency, token count, and guardrail action for each trace.
- A release gate compares the candidate model against the current model on quality, safety, latency, and cost before promotion.
Non-examples that often look similar but fail the production contract:
- A manually named file like
final_dataset.csvwith no hash, schema, lineage, or owner. - A metric screenshot pasted into chat without the run id, evaluation dataset, seed, or model artifact.
- A dashboard alert with no threshold rationale, no escalation rule, and no rollback candidate.
The AI connection is concrete. Modern ML and LLM systems are compound systems: data pipelines, feature stores, model registries, inference servers, retrievers, tools, evaluators, and safety layers. Model routing is one place where the compound system either becomes observable or becomes technical debt.
Operational checklist for model routing:
- State the artifact or signal being controlled.
- Give it a stable id and version.
- Define the metric or predicate that decides whether it is valid.
- Log the dependency chain needed to reproduce it.
- Attach an owner and a response action.
- Test the check in continuous integration or release gating.
A useful mental model is to treat every production ML component as a function with preconditions and postconditions. If is the upstream artifact and is the downstream artifact, the production question is whether the relation can be replayed and audited.
where is the transformation, is code or configuration, and is the execution environment. The hidden technical debt appears when any of , , or is missing from the record.
In notebooks, this subsection will be represented with small synthetic arrays, graphs, traces, or counters rather than external services. The point is not to mimic a vendor tool. The point is to make the mathematics of model routing executable enough to test.
Boundary note: this chapter assumes the evaluation methods from Chapter 17, the safety policy ideas from Chapter 18, and the data documentation work from Chapter 16. Here we focus on the production machinery that makes those ideas run repeatedly.
Failure analysis for model routing should be written before the incident occurs. A good production note asks what can be stale, missing, corrupted, delayed, unaudited, or too expensive. Each answer should correspond to one observable signal and one response action.
| Failure question | Production test | Response |
|---|---|---|
| Is the artifact stale? | Compare event time to freshness limit | Warn, block, or backfill |
| Is the artifact malformed? | Evaluate schema and semantic contract | Reject before serving or training |
| Is the artifact inconsistent? | Compare current statistic with reference statistic | Investigate drift or skew |
| Is the artifact unauditable? | Check for missing version, owner, or lineage edge | Stop promotion until metadata exists |
| Is the artifact too costly? | Track latency, tokens, storage, or compute | Route, cache, batch, or downscale |
The production design pattern is therefore not just to calculate a value. It is to calculate a value, compare it with a declared rule, log the evidence, and make the next action unambiguous. That four-step pattern will reappear across all Chapter 19 notebooks.
7.5 cost per answer
Cost per answer is part of the canonical scope of Model Serving and Inference Optimization. In production ML, the useful question is not only whether the model can be trained, but whether the surrounding artifact, signal, or control can be named, versioned, measured, and recovered after a failure.
For this section, the working object is serving architectures, inference optimization, queueing, capacity planning, deployment safety, and LLM serving economics. The notation below treats production systems as mathematical objects because that is how incidents become diagnosable. A dataset, feature, run, trace, or endpoint that lacks a stable identifier cannot be compared across time.
The formula is intentionally simple. It says that cost per answer should be reduced to a measurable object before anyone argues about dashboards or tools. Once the object is measurable, the system can decide whether to accept, warn, rollback, retrain, or escalate.
| Production object | Mathematical role | Operational consequence |
|---|---|---|
| Identifier | A stable key in a set or graph | Lets teams join logs, artifacts, and incidents |
| Version | A time-indexed element such as | Makes old and new behavior comparable |
| Metric | A function | Turns behavior into a release or alert signal |
| Contract | A predicate | Rejects invalid inputs before the model absorbs them |
| Owner | A decision variable outside the model | Prevents silent failure after detection |
Examples of cost per answer in a real system:
- A production pipeline records the input version, transformation code hash, model version, and endpoint version before serving predictions.
- An LLM application logs prompt version, retrieval index version, tool span, latency, token count, and guardrail action for each trace.
- A release gate compares the candidate model against the current model on quality, safety, latency, and cost before promotion.
Non-examples that often look similar but fail the production contract:
- A manually named file like
final_dataset.csvwith no hash, schema, lineage, or owner. - A metric screenshot pasted into chat without the run id, evaluation dataset, seed, or model artifact.
- A dashboard alert with no threshold rationale, no escalation rule, and no rollback candidate.
The AI connection is concrete. Modern ML and LLM systems are compound systems: data pipelines, feature stores, model registries, inference servers, retrievers, tools, evaluators, and safety layers. Cost per answer is one place where the compound system either becomes observable or becomes technical debt.
Operational checklist for cost per answer:
- State the artifact or signal being controlled.
- Give it a stable id and version.
- Define the metric or predicate that decides whether it is valid.
- Log the dependency chain needed to reproduce it.
- Attach an owner and a response action.
- Test the check in continuous integration or release gating.
A useful mental model is to treat every production ML component as a function with preconditions and postconditions. If is the upstream artifact and is the downstream artifact, the production question is whether the relation can be replayed and audited.
where is the transformation, is code or configuration, and is the execution environment. The hidden technical debt appears when any of , , or is missing from the record.
In notebooks, this subsection will be represented with small synthetic arrays, graphs, traces, or counters rather than external services. The point is not to mimic a vendor tool. The point is to make the mathematics of cost per answer executable enough to test.
Boundary note: this chapter assumes the evaluation methods from Chapter 17, the safety policy ideas from Chapter 18, and the data documentation work from Chapter 16. Here we focus on the production machinery that makes those ideas run repeatedly.
Failure analysis for cost per answer should be written before the incident occurs. A good production note asks what can be stale, missing, corrupted, delayed, unaudited, or too expensive. Each answer should correspond to one observable signal and one response action.
| Failure question | Production test | Response |
|---|---|---|
| Is the artifact stale? | Compare event time to freshness limit | Warn, block, or backfill |
| Is the artifact malformed? | Evaluate schema and semantic contract | Reject before serving or training |
| Is the artifact inconsistent? | Compare current statistic with reference statistic | Investigate drift or skew |
| Is the artifact unauditable? | Check for missing version, owner, or lineage edge | Stop promotion until metadata exists |
| Is the artifact too costly? | Track latency, tokens, storage, or compute | Route, cache, batch, or downscale |
The production design pattern is therefore not just to calculate a value. It is to calculate a value, compare it with a declared rule, log the evidence, and make the next action unambiguous. That four-step pattern will reappear across all Chapter 19 notebooks.
8. Common Mistakes
| # | Mistake | Why It Is Wrong | Fix |
|---|---|---|---|
| 1 | Treating production metadata as optional | Without metadata, failures cannot be attributed to a dataset, run, endpoint, prompt, or release. | Make identifiers, hashes, versions, and owners part of the production contract. |
| 2 | Optimizing one metric in isolation | Single metrics hide tail latency, subgroup failure, safety regressions, and cost explosions. | Use metric hierarchies with guardrails and release gates. |
| 3 | Comparing runs without controlling variance | A one-run improvement can be noise, seed luck, or validation leakage. | Use repeated runs, confidence intervals, paired comparisons, and frozen evaluation sets. |
| 4 | Letting dashboards replace decisions | A dashboard can display signals without encoding what action should follow. | Tie every alert to an owner, severity, runbook, and rollback or retraining policy. |
| 5 | Ignoring training-serving skew | The model learns one feature distribution and serves on another. | Use shared transformations, point-in-time joins, contract tests, and skew monitors. |
| 6 | Deploying without rollback evidence | A rollback is impossible if the previous artifacts and dependencies are not recoverable. | Keep model, data, config, endpoint, and environment versions in the registry. |
| 7 | Using raw thresholds without calibration | Bad thresholds create alert floods or missed incidents. | Tune thresholds on historical incidents and measure false positives and false negatives. |
| 8 | Conflating evaluation, monitoring, and alignment | Offline evals, online telemetry, and safety policy answer different questions. | Keep chapter boundaries clear and connect them through release gates. |
| 9 | Forgetting cost as a reliability metric | A system that is accurate but unaffordable fails in production. | Track tokens, GPU time, cache hit rate, and cost per successful task. |
| 10 | Overfitting production fixes to one incident | A narrow patch can pass the incident case while worsening the broader distribution. | Convert incidents into regression tests, then run full capability and safety suites. |
9. Exercises
-
(*) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(*) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(*) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(**) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(**) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(**) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(***) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(***) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(***) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
-
(***) Design a production ML check related to model serving and inference optimization.
- (a) Define the object being checked using mathematical notation.
- (b) State the metric, predicate, or threshold used to decide pass/fail.
- (c) Explain which artifact versions must be logged.
- (d) Give one failure case and one rollback or escalation action.
10. Why This Matters for AI
| Concept | AI Impact |
|---|---|
| Versioned artifacts | Make model behavior reproducible after a production incident |
| Lineage graphs | Reveal which upstream data, prompt, feature, or code change caused a downstream regression |
| Release gates | Prevent models from shipping on quality alone while safety, latency, or cost fails |
| Drift statistics | Convert changing user behavior into measurable maintenance signals |
| LLM traces | Explain failures across prompts, retrieval, tools, guardrails, and generated responses |
| Contracts | Catch invalid data before it silently corrupts training or serving |
| Registries | Preserve rollback candidates and promotion evidence |
| Observability | Turns production behavior into data for future evaluation and retraining |
11. Conceptual Bridge
Model Serving and Inference Optimization sits after the chapters on data construction, evaluation, and alignment because production systems combine all three. Chapter 16 explains how reliable datasets are assembled. Chapter 17 explains how models are measured. Chapter 18 explains how desired behavior and safety constraints are specified. Chapter 19 asks whether those ideas survive contact with changing data, users, services, and costs.
The backward bridge is operational memory. If a model fails today, the team must recover the data, code, environment, model, endpoint, prompt, retriever, guardrail, and metric definitions that produced the behavior. That is why the notation in this chapter emphasizes hashes, graphs, traces, thresholds, and predicates.
The forward bridge is broader mathematical maturity. Later chapters return to signal processing, learning theory, causal inference, game theory, measure theory, and geometry. Production ML uses those ideas under constraints: bounded latency, incomplete labels, shifting distributions, and costly human attention.
+--------------------------------------------------------------+
| Chapter 16: data construction and governance |
| Chapter 17: evaluation and reliability |
| Chapter 18: alignment and safety |
| Chapter 19: production ML and MLOps |
| artifact -> endpoint -> telemetry -> alert -> retrain |
| Chapter 20+: mathematical tools for deeper modeling |
+--------------------------------------------------------------+
References
- NVIDIA. Triton Inference Server user guide. https://docs.nvidia.com/deeplearning/triton-inference-server/user-guide/docs/
- KServe. Model inference serving documentation. https://kserve.github.io/website/latest/
- Google Cloud. MLOps continuous delivery for ML. https://cloud.google.com/solutions/machine-learning/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning
- OpenTelemetry. Metrics, traces, and logs overview. https://opentelemetry.io/docs/what-is-opentelemetry/