Back to blog

Prompts, Workflows and Agents: a Ladder, Not Three Different Tools

The longer the prompt, the stranger the answer. The solution came from an unexpected place: the divide-and-conquer principle applied to prompt engineering. How to build a pipeline of simple steps and not jump to agents when two prompts with a conditional would have been enough.

AI & Automation AIPrompt EngineeringWorkflowsAI AgentsSoftware Engineering

The spectrum of prompts, workflows and agents

I spent a fair amount of time trying to craft one perfect prompt that would cover everything at once. Every time I hit a dead end. The longer the instruction got, the stranger the answers the model returned. You would think more detail means a better response, but an overloaded prompt just breeds confusion: the model has to juggle dozens of disparate requirements and stumbles on something secondary, while the long preamble silently eats your token budget and leaves barely enough room for the output itself.

The way out came from where I least expected it: the good old divide-and-conquer principle, now applied to prompt engineering. Instead of one monstrous request, you build a chain of simple steps, each doing exactly one thing and doing it cleanly. The first step parses the input into structural units. The second validates completeness and correctness. The third assembles a draft against a strict template. The fourth runs the intermediate result through a discrete checklist of criteria. The fifth adapts the final output to the specifics of the target channel. Every step is a small, transparent prompt. When something goes wrong, you fix one link, not the whole structure. One curious side effect I noticed in practice: when a more powerful model comes along, you do not rewrite the architecture. You edit one prompt in one step. That is incomparably faster than rebuilding from scratch.

This spectrum is worth keeping in mind when designing any automation. Prompts, workflows and agents are not three different tools. They are rungs on the same ladder, each solving its own kind of problem at its own cost. A prompt is irreplaceable for a single isolated action: generate a product description, rewrite a paragraph while keeping the tone, translate a phrase. It is fast, transparent and easy to control. A workflow takes over when there are many steps, the sequence is stable from run to run and the route is known in advance: pull data from three sources, enrich it from a reference directory, deduplicate, send it to the database. An agent is needed when the trajectory is not predetermined and the system has to make decisions on the fly: analyse the request, pick the right tool, execute the action, evaluate the result and try a different approach if something does not work out.

The most common and expensive mistake is jumping straight to agents when a simple workflow of two prompts with a conditional would have been enough. I paid for it with a week of debugging before I realised that an agent is not inherently better than a workflow. It is merely more flexible, but flexibility comes at the cost of increased debugging complexity and fundamentally unpredictable trajectories. Pick the level by the principle of minimal sufficiency: start with the simplest solution and only level up when the previous one can no longer handle the load or the variability.

Another mistake I did not recognise right away is misplacing the boundary between automation and human responsibility. In a multi-step chain, every step must have a stopping point where the system can say “I am not sure” and call in a human. Without that, a cascade starts: the first step generates garbage, the second methodically improves it, the third checks it against garbage criteria, the fourth packages it into an immaculate document, and what comes out is brilliantly formatted nonsense. The quality of a chained result depends not on how powerful any single model is, but on which steps in the chain know how to admit failure.

You can start today. Take one repetitive task that eats fifteen to twenty minutes and break it into three simple steps. The first collects the data into a uniform format. The second processes it against one criterion. The third checks the result with an equally simple filter. Build a pipeline from three transparent prompts, run a real task through it, note where it breaks, fix one step, add a fourth.

In a week you will have a working system you trust, not yet another chat window where you ask, wait and copy-paste by hand.

More thinking