Resources
How AI Works
The big picture in six drawings and a set of dials, with every term explained in plain words. Click a term in a drawing to read what it means.
Token Tote by URLflows, a free Chrome extension, has these drawings and dials on its How AI Works page in Settings, and every term one click away in its panel.
Where it all fits
Each idea sits inside a bigger one. The chat assistants you use are the innermost: large language models, a kind of generative AI.
- Artificial intelligenceSoftware that does things we'd call smart
- Machine learningLearns from examples, not rules
- Deep learningNeural networks with many layers
- Generative AIMakes new text, images, audio and code
- Large language modelsClaude, GPT and Gemini: the chat assistants
- Generative AIMakes new text, images, audio and code
- Deep learningNeural networks with many layers
- Machine learningLearns from examples, not rules
How a model is made
Months of training first, then every question you ask runs the finished model. What it learned stays fixed until the next version.
- DataA vast amount of text, code and images
- PretrainingLearns to predict the next token, over and over
- Post-trainingFine-tuning and RLHF teach it to follow instructions, helpfully and safely
- The modelBillions of parameters, fixed at its training cutoff
- InferenceRuns each time you ask, and is what you pay for
What happens when you send a prompt
Everything the model sees is packed into its context window as tokens. It reads all of it, may think first, then writes the reply one token at a time.
0The context window, counted in tokensits limit
Turn the dials: what your choices cost in tokens
Every choice changes how many tokens the model reads and writes, and that is what you pay for. Move a dial to see which choices matter most.
A rough picture for learning, at typical API prices for each kind of model. Each message adds a short question and gets a 500-token reply; thinking is written fresh each time and not sent again. Caching makes re-reading cheaper, and on a monthly plan the same tokens use up your limits instead of costing money.
Companies, models and the tools you use
A few labs train the models. Each sells them in its own apps and to developers through an API, and other tools build on them too.
| Company | Models | Where you use them |
|---|---|---|
| Anthropic | Claude: Haiku, Sonnet, Opus and Fable | Claude, Claude Code and the API |
| OpenAI | GPT | ChatGPT, Codex and the API |
| Gemini | Gemini, AI Studio and the API | |
| Microsoft and GitHub | Several labs' models | Microsoft Copilot and GitHub Copilot |
| Many others | Their own, or open-weight models | Tools you already use, built on the models above |
How an agent works
An agent repeats a loop until the job is done. Each pass resends the growing context, which is why agents use far more tokens than a chat.
- GoalYou say what done looks like
- PlanIt picks the next step
- ActUses a tool: search, run code, edit a file, or another app through MCP
- CheckReads the result. Not done? Back to plan
- ReportYou review it: the human in the loop
Big jobs can split across several agents working side by side. Watch for prompt injection: an agent that reads a page can be told to do something you didn't ask.
Answering from your documents
A model's memory stops at its training cutoff, so tools look things up first and hand the model what they found. This is RAG, and it's how answers come with citations.
- Your question"What's our refund policy?"
- SearchYour files or the web, by meaning, using embeddings
- Best passagesAdded to the prompt with the question
- Answer with sourcesCheck them: models can still make things up
AI terms
Every term in the drawings, and more, in two or three sentences each: see all 63 AI terms.