Part 08›
✎

08. Quality Assurance and Responsible Engineering#

Testing and debugging for software whose behavior was learned instead of written.

This part gives a software engineer the testing toolkit for systems that have no specification: how to measure a model-based feature, find where it fails, test generated text, check the data and the code around the model, guard against catastrophic mistakes, and learn safely from real traffic. It closes with the practices that make such a system answerable to the people who use it: planning under uncertainty, versioning, fairness, safety, security, privacy, and accountability.

All examples run on one product: a support system that routes tickets to queues, summarizes conversations, and suggests refunds. Every code listing is plain Python and pytest, calls no model, and costs nothing, except where a chapter says the code is illustrative and uses a paid API.

The chapters#

# Chapter Level Reading
01 Quality Assurance Basics and the Oracle Problem Foundation 22 min
02 Measuring Model Quality Practitioner 25 min
03 Slicing: Finding Where the Model Fails Practitioner 28 min
04 Testing Without Oracles Practitioner 26 min
05 Testing Generative and LLM Components Practitioner 30 min
06 Data Quality Practitioner 30 min
07 Pipeline Quality Practitioner 28 min
08 System Quality: End-to-End Tests and Guardrails Practitioner 28 min
09 Testing and Experimenting in Production Practitioner 28 min
10 Process Models: Planning and Iteration Practitioner 22 min
11 Teams and Technical Debt Practitioner 25 min
12 Responsible Engineering, Versioning and Reproducibility Practitioner 26 min
13 Explainability, Fairness and Safety Practitioner 26 min
14 Security, Privacy, Transparency and Accountability Practitioner 19 min

About six hours of reading, and roughly sixteen hours of exercises.

Where to start#

How this part relates to the others#

About the sources#

The main source is Christian Kästner, Machine Learning in Production: From Models to Products (MIT Press, 2025), chapters 14 to 29. The book is licensed CC BY-NC-ND 4.0. Every chapter here explains the ideas in its own words and links to the book chapter it draws on.

Every statement that a chapter attributes to the book was checked against the chapter text. Where a chapter goes beyond the book, for example the rubric suite in chapter 05 or the two-track plan in chapter 10, the chapter says so, and the book supplies the argument around it.