Anatomy of AI

Anatomy of AI

Not a glossary. One machine, in five stages, and what passes between them. Start with the five. Open one when you want its parts. Parts marked try it have something you can operate: run the real arithmetic, break it, and see what happens.

What we mean by "AI" here Start here if the word means several things to you

"AI" now labels a dozen unrelated machines. This one is ours

The word "AI" is applied to spam filters, chess programs, image generators, self-driving cars and chatbots at once. Nothing accurate can be said about all of them together.

This site explains one machine: the system built around a large language model. It has two halves, and confusing them causes most misunderstanding. First the model is made. Text is collected, turned into numbers, and used to adjust an enormous set of values until it predicts text well. That produces a fixed file. Second, that file is run: given text, it produces more text, one piece at a time. Everything else here, the tools and agents and memory, is scaffolding built around the second half.

Not thisNot every automated system is this. Image generation, robotics and classical statistics are different machines with different physics.

The machine · five stages

One request, end to end Watch one request go through all of it

Everything you have just met, working at once

Every part has now been examined on its own. None of them is ever used on its own, and a list of parts is not an understanding of a machine.

Follow one request all the way through. A sentence is cut into tokens, joined to a system prompt, a memory lookup and three retrieved passages, and assembled into one string. The file runs over that string and produces tokens until it asks for a tool. A program checks the permission, runs it, and pastes the result back as text. The loop turns four more times. An answer arrives, one token at a time. Nothing in that sequence was magic.

Not thisThere is no step in this trace that is not an ordinary program, a file of numbers, or arithmetic.

Built

How a model comes to exist. Runs once, before you ever touch it.

The junction

An inert file. Everything to the left made it; everything below runs it.

Run

What happens when you press enter. Runs again, in full, every turn.