The chapters — one page each
- 01Learning from dataWe teach a model to sort support messages, and find out how easily a good score can be a false one: splits, leakage, precision, recall and the threshold the fraud desk can staff.
- 02The classical toolboxPredicting which conversations will need a human, from account fields: what a linear model cannot see, how a tree picks its questions, and why boosting usually wins on tables.
- 03Deep learning fundamentalsWhen customers say the same thing in different words, hand-built features run out. A network learns its own, and we work its gradient steps through with real numbers.
- 04What the model actually doesTokens, attention, sampling and frozen weights: what the model computes when it writes a reply, and why a confident wrong answer is its normal output when facts are missing.
- 05Serving and inference economicsWhere a reply’s seconds go, why decode waits on memory, what the KV cache costs, and the price of one support conversation worked out turn by turn.
- 06Prompting and structured outputRewriting the assistant’s instructions as a specification, teaching a boundary with examples, and getting decisions that code can validate, plus the one-line edit that broke fraud handling.
- 07Context and retrievalChoosing which few passages of the help centre the model reads for each question, measuring that choice, and tracing a wrong answer back to the stage that lost the right passage.
- 08Fine-tuning, and when a better prompt winsRetrieval changes what the model reads; fine-tuning changes how it behaves. Find out which problem the assistant has before paying for the second.
- 09Agents and toolsThe assistant learns to look up orders and raise tickets. Most of the work is in the loop around the model: tool definitions, budgets, stopping rules and approvals.
- 10Security: injection, exfiltration and least privilegeA forum post or a customer message can steer the model. Design so that a steered model still cannot leak a customer’s data or act against them.
- 11Evaluation: measuring the assistantBuild an eval set from real tickets, grade it with checks you can trust, and score retrieval apart from generation so the number says what to fix.
- 12In production: monitoring, fallbacks and feedbackTrace every turn, hold cost and latency to a budget, survive a provider outage, and turn what customers do next into new eval cases.