Books › AI Foundations: from zero

Chapter 12 ยท 5 min read

Putting it all together

In one sentence: A trustworthy AI system is the model plus many ordinary parts around it, such as safety checks, a library, approvals and records, and the main book is about building those parts.

The whole picture

You now know every main piece. Let us follow one request from start to finish, and see where each piece fits.

Asha's customer writes: "Please order twenty eggless rolls for Friday, and cancel my other order."

Nine boxes in two rows and one at the bottom. A person asks, a safety door, get ready, find knowledge, the AI writes, check the draft, ask a person, do it safely, and write it all down.

1. A person asks. The system first asks: who is this, and are they allowed to ask this? 2. The safety door. The message is checked for tricks and risky requests before the AI sees it. Cancelling an order is marked as a change, so it needs extra care. 3. Get ready. The AI gets its standing instructions first and the customer's message last. Steady parts first, changing parts last (Chapter 8). 4. Find the knowledge. RAG looks up the menu and the cancellation rules (Chapter 10). 5. The AI writes. The model drafts a reply and a plan, using only what was found (Chapters 6 to 8). 6. Check the draft. Each claim is checked against the sources. A claim with no source is removed or flagged. 7. Ask a person, when it matters. Cancelling is risky, so a person says yes, and the yes is for this exact cancellation only (Chapter 11). 8. Do it safely. The tool runs once. If the call times out, the system checks before trying again, so the order is never cancelled twice. 9. Write it all down. Every step is recorded. Mistakes become new tests, so they cannot come back.

Notice that the AI model is only one box, number 5. The other eight are ordinary engineering. That is the central lesson of this whole journey: a model is the engine, but a trustworthy system is the whole car, with brakes, mirrors and a seat belt.

What real systems add

As a system grows, teams add more pieces around this core.

  • A router: sends easy questions to a cheaper, smaller model and hard ones to a stronger one.
  • A gateway: one door through which all AI calls pass, so rules, records and keys are managed in one place.
  • Caching: reusing work already done, so repeated questions are quicker and cheaper.
  • Guardrails: checks on what goes into the model and what comes out.
  • Monitoring: watching quality, speed and cost every day.
  • Testing before release: a fixed list of questions that must pass before any change goes live.

Where each idea lives in the main book

The main book, From One Call to a Platform, takes each box and asks: what breaks without it, and how do you build it properly? The first four chapters are free to read.

Idea from this bookWhere to go deeper in the main book
Prompts and instructions (Chapter 8)Chapter 4, prompt engineering
What goes in front of the model (Chapters 7 and 8)Chapter 5, context engineering
Tools and safe retries (Chapter 11)Chapter 6, harness engineering; Chapter 19, reliability
Memory (Chapter 11)Chapter 9, memory architecture
RAG (Chapter 10)Chapter 10, RAG and knowledge graphs; Chapter 15, retrieval at scale
Checking answers against sources (Chapter 9)Chapter 11, grounding and citations
Testing before release (Chapter 9)Chapter 12, evaluation engineering
A person's yes (Chapter 11)Chapter 13, human-in-the-loop and approval
Limits and safety checks (Chapters 9 and 11)Chapter 14, control engineering
Records and watching (Chapter 11)Chapter 18, observability

Good next reads in the Journal

Twelve ideas to keep

1. Software asks, servers answer, and AI is one more helper behind the server. 2. Most AI learns from examples instead of following hand-written rules. 3. Keep an exam pile secret, or the score means nothing. 4. A neural network is many tiny voters whose weights are learned by walking downhill. 5. Computers need meaning as numbers: tokens, then embeddings on a map of meaning. 6. Attention helps each word find the words that matter most to it. 7. A language model writes by choosing the next token, again and again. 8. Training changes the model. Using it does not. 9. AI can sound sure and be wrong, so build checks around it. 10. RAG gives the AI a library to read before it answers. 11. Agents act through tools, so they need limits that are earned with tests. 12. A trustworthy system is the model plus everything around it.

Words explained

  • Router: a part that sends each request to the best model for it.
  • Gateway: a single door that all AI calls go through.
  • Trace (record): a written history of each step, so people can see what happened.
  • Release gate: a rule that decides whether a change may go live, based on tests.

The limits of this chapter

  • Real systems vary a lot. This picture is a common shape, not the only one.
  • The table maps ideas to chapters as a guide. Many chapters touch several ideas.

For engineers

  • A typical production path has: authentication and rate limits; input guardrails (injection and policy checks); context construction (instructions, retrieved context, memory); model routing through a gateway; output checks including grounding against sources; an action policy with exact-action approval for consequential steps; idempotent execution; and tracing with evaluation fed back from failures.
  • The main book's chapters on control, approval, grounding, evaluation and observability are the deeper treatment of the boxes marked in the picture. Chapter 26 covers releasing changes safely.
  • Several of these controls are demonstrated with small, fully mocked tests in the open-source repository linked from the article on earned autonomy.

Check yourself

  • In the nine-step picture, which step is the AI model? Answer: Step 5, where the AI writes. The other eight steps are ordinary engineering around it.
  • Why does a risky action need a person's yes for the exact action? Answer: So that a yes for one thing cannot be reused for something different, such as another amount or another customer.
  • Where should you go next? Answer: The main book, From One Call to a Platform, starting with its free first four chapters.
Plain-words explanations in the author's own words. The examples are invented, and no real company, product or customer is described. Simplified on purpose: where a detail matters, the "For engineers" part says so. Disclaimers