#tutorial
Every post tagged "tutorial".
92 posts · showing 71–80
-
Fan-Out, Fan-In: Parallelism Inside a Single Agent
Twelve independent checks shouldn't cost twelve turns, each re-sending the whole context. Three levels of parallelism inside one agent — and the fan-in is where the pattern usually goes wrong.
-
When the Worker Needs to Ask the Supervisor a Question
A blocked worker with no channel back will guess, and the guess is invisible in what it returns. Making "needs input" a result type costs nothing — and the questions it logs are a to-do list for your delegation template.
-
Migrating Model Versions Without Breaking Your Agent
The new model is better at nearly everything and different at everything, and tool selection is what shifts first. Replay a frozen eval set against both — and put the cost-per-task row in the comparison.
-
Model Routing: Using the Cheap Model for the Cheap Steps
Classification, extraction, and formatting move to a cheaper tier safely. Tool selection and planning don't — and the failure looks like a tool-description bug, so you'll debug the wrong thing for a week.
-
Designing a Kill Switch That Works Mid-Run
Killing the process leaves side effects in an unknown state. A stop that works checks between steps — before every model call and before every tool call — and the difference matters most at 2am.
-
Building an Eval Set From Production Traces
Hand-written cases test what you thought of. A user rephrasing the same request three times is a labelled failure sitting in your logs — here's how to turn a week of traces into a suite that catches the real ones.
-
The Escalation Path Is Part of the Design
An agent with no defined way to stop will improvise one, and its improvisation is a confident answer. Escalation deserves a tool, a destination, and a metric — and one field that stops the human starting over.
-
Format Tool Output for a Model, Not for a Log File
A bare empty array means "none exist" and "we couldn't check" at the same time, and the agent will pick the confident reading. Six changes to what your handlers return, in order of payoff.
-
Cost Attribution: Finding Which Feature Is Eating Your Token Budget
Agent spend is dominated by a tail of expensive runs, so every averaged chart hides the cause. Five tags on each model call, one table of your twenty priciest runs, and the mystery usually resolves in an afternoon.
-
Where You Put Things in the Context Changes the Answer
Same instructions, same documents, different results — because the constraint sat in the middle of a long array. Two ordering rules, one of which also decides whether your prompt cache ever hits.