AI Engineering Guide.

A step-by-step guide to building AI systems that work in production, from a first prompt to agents and operations.

How to use this guide

From a first prompt to agents in production.

The guide has 10 parts and 66 sections. Each part answers one question and builds on the one before it. Every section opens with a short version for leaders, then explains the idea in technical terms and in everyday language.

  • 2 minutesRead the short version at the top of any section.
  • 5 minutesRead on to the idea and the everyday explanation.
  • 10 minutesRead the example, the common mistakes and what to do this week.

All parts

The full guide, in reading order.

Part 1

Foundations

How do these models work, and when should I not use them?

Start this part

  1. 1.1From Fixed Rules to ProbabilitiesOld Software Follows Rules. AI Makes a Best Guess.
  2. 1.2How a Language Model WorksIt Predicts the Next Word, Billions of Times
  3. 1.3The Context Window and Its LimitsThe Model Only Knows What Is on Its Desk
  4. 1.4The Types of AI ModelsChat, Reasoning, Small and Multimodal Models, and How They Differ
  5. 1.5How to Choose an AI ModelTest on Your Own Task, Not on the Leaderboard
  6. 1.6When Not to Use Generative AIMany Problems Are Better Solved with Rules, Search or Classic Machine Learning

Part 2

Prompting

How do I ask a model for what I want, reliably?

Start this part

  1. 2.1What a Prompt IsA Good Prompt Is a Good Briefing
  2. 2.2Teaching AI by ExampleShow the Model What Good Looks Like
  3. 2.3Prompts That ReasonAsk the Model to Think in Steps, and Know What It Costs
  4. 2.4Getting Structured Output from AIMake the Answer Something a Program Can Read
  5. 2.5Prompts That Write PromptsLet the Model Draft and Improve Its Own Instructions
  6. 2.6Prompting Reasoning ModelsGive the Goal and the Facts, Then Step Back
  7. 2.7How to Manage AI Prompts Like SoftwareSave every version of a prompt, test every change and review it, as you would with code.

Part 3

Context and memory

What should the model see, and what should it remember?

Start this part

  1. 3.1Context EngineeringDesign What the Model Sees
  2. 3.2Keeping Context Small and SharpSummarize, Trim and Load Details Only When Needed
  3. 3.3Kinds of AI MemoryShort-Term, Long-Term, and Three Things Worth Remembering
  4. 3.4Memory DesignsLoad Everything, Fetch on Demand, or Build a Graph
  5. 3.5Memory RisksStale Facts, Leaked Data and Bloat

Part 4

Retrieval and knowledge

How does the model use my company's information?

Start this part

  1. 4.1Embeddings and Vector StoresHow AI Searches by Meaning
  2. 4.2Why AI Assistants Give Wrong Answers, and How to Fix ItThe retrieval pipeline from documents to answers, and why the index needs an owner.
  3. 4.3Preparing Documents for AIParsing, Chunking, Labels and Freshness+2 more
  4. 4.4Better RetrievalFive Techniques That Find the Right Passage More Often
  5. 4.5How to Teach AI the Language of Your BusinessKnowledge graphs, the semantic layer and an ontology as the base for reliable answers.
  6. 4.6Can Your AI Find the Right Document?Retrieval for drawings, tables and revisions, and how to test that the right one is found.
  7. 4.7Caching AI AnswersDo Not Pay Twice for the Same Question
  8. 4.8Measuring RetrievalKnow Whether the Right Passage Was Found

Part 5

Workflows and tools

How do I chain steps and let the model use systems?

Start this part

  1. 5.1AI Workflow PatternsFour Ways to Chain Model Calls
  2. 5.2Tools and Function CallingHow a Model Uses Your Systems+1 more
  3. 5.3The Model Context ProtocolOne Standard Plug for Connecting AI to Systems
  4. 5.4Code or Model?Use a Model Only Where Judgment Is Needed
  5. 5.5Measuring AI WorkflowsTrack the Process and the Quality

Part 6

Agents and agent loops

When should the system choose its own steps, and how do I control it?

Start this part

  1. 6.1When to Use an AI Agent, and When Not ToStart with a workflow. Give the system more freedom only when the evidence supports it.+3 more
  2. 6.2The Agent LoopLook, Decide, Act, Check, Repeat
  3. 6.3How AI Agents PlanBreak the Goal Down, Then Check the Work
  4. 6.4The Agent HarnessThe Software Around the Model Decides What an Agent Can Do
  5. 6.5Multi-Agent PatternsWhen to Use More Than One Agent, and How to Arrange Them
  6. 6.6Agents Talking to AgentsA Shared Language for Agents from Different Vendors
  7. 6.7Why Multi-Agent AI Systems Fail, and How to Prevent ItMost failures happen at the hand-offs between agents, tools, data and people.
  8. 6.8Spec-Driven Development: Write Down What You Want Before AI Builds ItWhy casual coding with AI fails in production, and how specs, plans and tasks fix it.+2 more
  9. 6.9Background AgentsAgents That Work When Nobody Is Typing
  10. 6.10Choosing an Agent FrameworkDecide How Much Control You Need Before You Pick a Tool

Part 7

Customizing models

When is retrieval not enough, and what do I do then?

Start this part

  1. 7.1How to Customize an AI Model: Four Steps Before Fine-TuningInstructions, retrieval and tools come first. Fine-tuning is the last step, not the first.
  2. 7.2Retrieval or Fine-Tuning?Knowledge Goes in Retrieval. Behavior Goes in Training.
  3. 7.3Kinds of Fine-TuningFull Training, Instruction Tuning and the Lightweight Method Most Teams Use
  4. 7.4Training Data for Fine-TuningThe Examples Decide the Result
  5. 7.5Small Models and ForgettingShrink the Model, and Keep What It Knew

Part 8

Quality, safety and operations

How do I know it works, keep it safe and run it?

Start this part

  1. 8.1What an AI Evaluation IsThe Test That Tells You If the System Works+1 more
  2. 8.2Golden Sets and AI JudgesA Trusted Answer Key, and a Fast Way to Grade Against It
  3. 8.3Evaluation-Driven DevelopmentLook at Failures First, Then Build
  4. 8.4How to Monitor AI Systems in ProductionTraces, sessions and dashboards that show what an AI system did and why.
  5. 8.5How to Build Safety into AI SystemsChecks on input, output and actions, with human approval where the risk is high.+1 more
  6. 8.6Security for AI AgentsAssume the Agent Can Be Tricked, and Limit the Damage+1 more
  7. 8.7The AI Bill of MaterialsKnow What Is Inside Every AI System You Run
  8. 8.8How to Release and Run AI SystemsVersion everything, release in steps and keep a way to roll back.
  9. 8.9How to Keep AI Costs Under ControlCost per task, routing and caching, and who owns the bill.

Part 9

The enterprise view

How do I organize teams, platforms and governance around this?

Start this part

  1. 9.1The AI Engineering PlaybookOne Life Cycle from Problem to Production, and Five Levels of Maturity
  2. 9.2DataOps, MLOps, ModelOps and AgentOpsWhat Each One Covers
  3. 9.3Combining AI TechniquesThe Best Systems Mix Rules, Machine Learning, Generative AI and Graphs
  4. 9.4The AI PlatformThe Shared Layers Every AI Team Should Not Have to Rebuild+2 more
  5. 9.5AI Teams and SkillsWho You Need and How to Organize Them+3 more
  6. 9.6An AI Operating Model for ManufacturingWhat to Centralize, What to Leave with the Business+1 more
  7. 9.7AI GovernanceClear Rules, Light Process, Real Checks+2 more

Resources

Checklists, templates and skills you can use.

Practical material that goes with the guide, free to download and adapt.

Open resources

Production readiness

Fifteen questions before anything goes live.

If a team can answer all fifteen with evidence, the system is ready for real users. If it cannot, the gaps are the plan.

Quality

  • A golden evaluation set built from real inputs
  • Retrieval measured separately from answers
  • Production failures turned into test cases

Safety

  • Acts with the user’s permissions and no more
  • Action limits enforced in the tools
  • Red-teamed, with every successful attack kept as a test

Operations

  • Every step traced and replayable
  • One-step rollback of prompt, model or tool
  • Model upgrades staged like releases

Economics

  • Cost per resolved task known
  • Spend limits per use case
  • Each step on the cheapest component that clears its bar

Ownership

  • A named business owner and a measured baseline
  • An owner for knowledge freshness
  • A switch back to human-only mode

The newsletter

Pilot to P&L.

One operator’s read on enterprise AI value, every other week. The argument developed further than a post allows, and one thing I got wrong.