A finance team processes invoices through five fixed steps that run in the same order for every invoice: extract fields, validate totals, classify the cost centre, check the amount against an approval threshold, and write a record to the ledger. The steps never vary, the team must be able to point at which step failed for any given invoice, and an audit requirement says the sequence of steps must be reproducible six months later. Which architecture fits these constraints best?
- AAn agent given the five steps in its system prompt and a set of tools, left to decide the order of tool calls for each invoice as it reasons through the document.
- BA deterministic workflow that calls Claude at the individual steps that need language understanding, with the ordering, branching and error handling expressed in application code. Correct
- CA manager agent that delegates each of the five steps to a dedicated subagent and merges their results once every subagent has reported back on the invoice.
- DA single model call that receives the whole invoice and the five step descriptions and returns the ledger record, with a validation pass over the returned structure.
Why A is wrong: Tempting because a model that can call the same five tools looks equivalent and needs less orchestration code, but the order becomes a model decision that can differ per invoice, which defeats both the per-step failure attribution and the reproducibility requirement.
Why B is correct: Correct: the path is fixed and known in advance, so the control flow belongs in code, and each model call sits at a named step whose input, output and failure are individually observable and repeatable.
Why C is wrong: Tempting because one subagent per step maps neatly onto the five steps, but delegation buys context isolation for open-ended exploration, and here it adds a coordination layer and a nondeterministic ordering decision that the fixed sequence does not earn.
Why D is wrong: Tempting because it is the cheapest thing to build and structured output does catch malformed results, but collapsing five steps into one call leaves nothing to attribute a failure to, and validating the final shape says nothing about which step went wrong.