Design & Patterns
Planning, reflection, task decomposition, which pattern fits.
29 posts · showing 21–29
-
Getting an Agent to Say How Sure It Is
Ask a model how confident it is and you get a plausible number that doesn't move with difficulty. Five signals that actually correlate with being right — and the calibration check that tells you if yours is noise.
-
State Machines for Agents in Regulated Flows
When doing steps out of order is a compliance failure regardless of outcome, a model-decided control flow is the wrong shape. Put the ordering in code, the conversation in the agent, and scope the tools per state.
-
The Verifier in the Loop: Designing an Oracle Your Agent Can Iterate Against
Coding agents work as well as they do because compilers exist. In other domains the oracle is something you build — and most tasks have one hiding in them if you spend ten minutes looking.
-
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.
-
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.
-
Designing for Resumability: Agents That Survive a Restart
Serializing the message array is the obvious approach and it produces subtly wrong resumptions. What has to survive a crash is a work ledger, idempotent side effects, and enough state to rebuild context from scratch.
-
One Prompt Per Job Beats One Prompt For All: The Router Pattern
Every new case adds a paragraph, and adherence to all of them drops. Classify first and run a small prompt built for that class — with per-route tools, limits, and approval policy.
-
The Planner That Plans Too Much: When Upfront Decomposition Hurts
An agent found the root cause in step one and executed the remaining seven steps anyway. Plans in context outweigh the evidence that should kill them — unless revision is something the loop can actually do.
-
Reflection Loops Are Not Free: When Self-Critique Makes the Output Worse
A critique step can only catch what was already derivable from the context — and asked to find problems, a model will find them in passages that were fine. Here's when the pattern earns its doubled token bill.