Data For Science

AI Engineering Cookbook

by Bruno Gonçalves

  • Pearson
  • ISBN 978-0-13-618457-7
  • Coming 2027
Cover of AI Engineering Cookbook by Bruno Gonçalves: a robotic hand and a human hand reaching toward each other

Eighteen end-to-end recipes for building AI systems that hold up in production. Each chapter takes one real problem — triaging support tickets, answering questions over internal docs, reviewing code, migrating a codebase — and builds a working solution, from a single structured LLM call all the way to multi-agent and self-hosted systems.

About the book

  • 18 recipes

    Each one a complete, realistic project rather than a toy snippet, so you see how the pieces fit together.

  • Simple to sophisticated

    Eight parts that climb from single-shot calls through RAG, pipelines, and evals to tool-using and multi-agent systems.

  • Measured, not guessed

    Evaluation gets its own part: eval harnesses, statistical comparison, and hallucination detection for RAG outputs.

What makes this book different

This is a hands-⁠on, project-⁠driven book, not a survey. It is organized as 18 self-contained case studies, each of which builds one complete, working application in Python — with real (commercially-usable, laptop-sized) data, real code, and a real evaluation harness — rather than explaining techniques in the abstract. The case studies are grouped into eight progressive tiers that take the reader from the simplest pattern (a single structured LLM call) to a capstone that integrates everything into a queryable knowledge base.

The book’s central, differentiating bet is that patterns outlast frameworks. Where most LLM books are organized around a particular toolkit (LangChain, LlamaIndex) and risk going stale when the framework-of-the-year changes, this book teaches durable patterns — natural-language-to-executable-artifact, retrieval with citations, planner-executor-writer pipelines, decomposition-and-verification, the basic agent loop, scheduled and long-horizon agents — and implements them with lower-level primitives so the reader understands the pattern independent of any one library.

Two further commitments run through the whole book and set it apart. First, evaluation is treated as a first-class skill, not an afterthought: a dedicated tier teaches readers to build rubric-based and statistical eval harnesses, and every chapter after it plugs into that harness. The recurring refrain is “you can’t ship what you can’t measure.” Second, the book insists on combining deterministic tools with LLM reasoning — using linters, type checkers, test suites, and validators so the model never has to reason about what can simply be verified.

Everything is designed to run on a modern laptop. All datasets are free for commercial use and laptop-sized; all models in the self-hosting and fine-tuning tier are commercially usable open-weights models (Apache 2.0, MIT, or the Llama community license). The total disk footprint, including cached models, stays under 50 GB, and readers without local GPUs can run every example on a modest cloud instance for a dollar or two an hour.

Table of contents

  1. Part 1 Single-⁠shot LLM calls — Structured outputs

    1. 1 Customer Support Ticket Triage and Routing
    2. 2 Financial Filing Summarizer
  2. Part 2 RAG and retrieval-⁠augmented workflows

    1. 3 Internal Documentation Q&A Bot
    2. 4 Scientific Paper Literature Review Assistant
  3. Part 3 LLM pipelines — Multi-⁠step orchestration

    1. 5 Automated Data Cleaning and Schema Inference
    2. 6 Code Review Assistant with Static Analysis Fusion
  4. Part 4 LLM-⁠as-⁠judge and evaluation systems

    1. 7 Eval Harness and Statistical Comparison
    2. 8 Hallucination Detector for RAG Outputs
  1. Part 5 Tool-⁠using agents — Single agent, multiple tools

    1. 9 Spreadsheet Analysis Agent
    2. 10 Data Science Agent for Kaggle-⁠Style Problems
    3. 11 Bug Reproduction Agent (SWE-⁠bench)
  2. Part 6 Multi-⁠agent and long-⁠horizon systems

    1. 12 Multi-⁠Agent Research Team
    2. 13 Automated Competitive Intelligence Monitor
    3. 14 Codebase Migration Agent
  3. Part 7 Self-⁠hosting and fine-⁠tuning

    1. 15 Self-⁠hosting an Open-⁠weights LLM with vLLM
    2. 16 Fine-⁠tuning and Distillation
    3. 17 Local RAG Stack with Open Embeddings and Open LLM
  4. Part 8 Capstone

    1. 18 Knowledge-⁠Base Construction from Unstructured Corpora

Be the first to know

Release dates, early chapters, and pre-order links go out first in the Data Science Briefing, Bruno’s weekly newsletter on LLMs, machine learning, and data science.

We won’t send you spam. Unsubscribe at any time.

Want these techniques in your team before the book ships?

See training and consulting.

Book a call

Or email info@data4sci.com