ZR-001 Position paper Workflow design

Exact where possible, reasoned where necessary: the case for controlled workflows in accounting practice

Abstract

Software for accounting firms currently follows one of two approaches. Rule-based systems are exact but cannot cope with anything their rules did not foresee. General-purpose AI assistants are flexible, but their answers can vary, they are costly to run and they are hard to keep within limits. We argue that neither suits a profession whose figures must be exact, repeatable and open to audit. We propose instead that document work be built as controlled workflows: reusable sequences of steps in which calculations, tax rules and matching are done by ordinary code, and AI models are used only where a step needs judgement, such as reading a scanned invoice. Each AI step receives only the information it needs, and a security layer keeps client data away from the model and from other clients. We describe Ziffa Flows, a workflow system we are designing on these principles. We also argue that such workflows should be available to AI assistants as tools, so that an assistant can direct the work without doing the calculations or seeing the client's documents.

1. Introduction

Accounting firms have two kinds of software for document work. The first is rule-based: practice management systems, bookkeeping software and bank feeds that apply fixed rules to structured data. These are exact, but they cannot read a scanned invoice or handle a case their rules did not foresee. The second is the general-purpose AI assistant: a large language model that is given documents and asked to do the work. Assistants are flexible, but their answers can vary, they depend on how they are asked, and they usually see more client data than the task needs.

We argue that neither approach is right for accounting practice. We propose a third: controlled workflows, in which each step uses the simplest tool that does it reliably, and AI models are used only where a step needs judgement.

2. Accounting is an exact profession

Most of the work that follows a document is calculation. Net plus VAT must equal the total. A VAT return adds up classified transactions. A bank reconciliation matches amounts and dates. Depreciation, payroll and tax follow published rules. Each has one correct answer, and the firm is responsible for it.

Language models are a poor fit for this work, for three reasons.

  • Their answers are not guaranteed. A model generates the most likely answer, not a computed one. A model that adds up correctly 99.9% of the time is not good enough when ordinary code is correct every time. An error rate that is excellent for sorting documents is unacceptable in a tax calculation.
  • Their answers are not repeatable. The same input can give a different answer on another run, or after the model is updated. A firm must be able to show how a figure was produced, and produce it again.
  • Their working cannot be fully checked. Ordinary code can be read, tested and explained. A model can describe its reasoning, but that description cannot be verified in the same way.

This is not a criticism of language models. It is a matter of using the right tool: a calculation that can be written down exactly should be done by a tool that follows it exactly.

3. Where judgement is required

Some steps cannot be written down exactly. A scanned invoice must be read, and its layout is not known in advance. A PDF holding several documents must be split into them. A supplier must be matched to an account in the client’s chart of accounts when the description is unclear. A document must be judged acceptable, or not, as proof of address. These steps require interpreting documents, and here language models are genuinely useful.

These steps have two useful properties. First, they are narrow: each takes a clear input and gives a clear output, such as a page range, a document type or a set of fields. Second, their output can usually be checked. Extracted amounts can be checked against each other, a suggested account against the chart, and a split against the page numbers printed on each page. So an AI step does not have to be trusted on its own. Its output can be checked by code, and sent to a person when a check fails or the model is unsure.

4. The right tool for each step

If judgement is needed only in narrow steps, most steps do not need a large model, and many need no model at all. We propose giving each step the simplest tool that does it reliably, in roughly this order:

  1. Ordinary code for arithmetic, tax rules, dates, exact matching and any calculation with a fixed answer.
  2. Established tools and classical models for well-understood problems: reading text from digital PDFs, optical character recognition (OCR) for scans, approximate matching of names and references, and classifiers trained on the firm’s own past work.
  3. Small language models for narrow judgement steps, given precise instructions and a fixed format for their answer.
  4. Large frontier models only where a step needs broad knowledge or long reasoning that smaller models cannot provide.

Our own work on splitting multi-document PDFs shows this. A small, low-cost model, given a precise task and the right information, split 98–100% of test files exactly right [2]. A frontier model would have been slower and more expensive, with nothing to gain. We expect the same for most document steps in accounting: what matters is giving the model the right information and checking its answer, not the size of the model.

This also lowers cost. A workflow’s cost depends on how many model calls it makes and how large the models are. A workflow where most steps are ordinary code, and the rest use the smallest model that works, costs a fraction of one where a frontier model does the whole task.

5. The workflow supplies the context

A general-purpose assistant has to be told what to do each time. Firms make up for this with long prompts, saved instructions or “skills”, and by handing over whole folders in the hope that the right information is in there. This causes three problems: the result depends on how well the task was described, the model reads far more than it needs, and client data is shown to a system that does not need most of it.

In a controlled workflow, the workflow decides what each AI step sees, not the user. The step that suggests a ledger account receives the supplier, the description and the client’s chart of accounts, and nothing else. The step that reads an invoice receives only that invoice. Instructions and answer formats are written once, tested once and reused for every client.

This makes room for a security layer between client data and the model:

  • Data minimisation. Each step receives only the fields it needs.
  • Pseudonymisation. Names, account numbers and other identifiers that a step does not need are replaced with placeholders before the model sees them, and put back afterwards.
  • Isolation. A step working on one client’s documents cannot reach another client’s data. The workflow enforces this; it does not rely on instructions to the model.
  • Audit trail. Every step records what went in, what came out, and which tool and version produced it, so the path from a document to a figure can be traced.

These protections are hard to guarantee when an assistant is given broad access and trusted to behave. They are simple to enforce when the workflow decides what the assistant can see.

6. A proposal: Ziffa Flows

We are designing Ziffa Flows, a workflow system built on these principles. It is not yet available. In outline:

  • Flows are made of typed steps that fit together. Each step states what it takes in and what it gives back, and either passes its result to the next step or produces a result of the flow. A step can be ordinary code, a classical model, a language model or a human review. Human review steps are assigned and completed in Ziffa’s practice management, alongside the firm’s other work.
  • AI steps are tightly limited. Each has fixed instructions, a fixed answer format, the smallest model shown to do it reliably, and a check by ordinary code afterwards.
  • Uncertain cases go to a person. When a check fails or the model is unsure, the item is held for review with the reason stated, and the flow continues once a person has decided.
  • Flows are reusable and versioned. A firm designs a flow once, for example for purchase invoices, and uses it for all its clients. Each change creates a new version, so any past result can be traced to the version that produced it.
  • Client data stays behind the security layer described in Section 5.

On screen, a flow looks like those in general workflow automation tools, with steps connected on a canvas. The difference is in what is guaranteed: the type of each step fixes what it may calculate, what data it may see and how its answer is checked.

7. Flows as tools for AI assistants

Workflows and AI assistants can work together. The Model Context Protocol (MCP) [1] is an open standard that lets an assistant find and use external tools. A flow can be offered as one of these tools. The assistant chooses which flow to run and with what inputs, and the flow does the work under its own rules.

This divides the work sensibly. The assistant does what it is good at: understanding a request in plain language, choosing the right procedure and presenting the result. The flow provides exactness, repeatability and data protection. Where the firm chooses, the assistant receives only the result of a flow, such as a reconciliation summary or a list of documents held for review, and never the client’s documents. A partner could ask an assistant to “prepare the VAT workpapers for this client for the third quarter”, and the assistant would run the matching flow rather than attempt the calculations itself.

8. Objections

Flows take effort to design. Designing a flow is more work than writing a prompt. We think this is appropriate. An accounting firm’s procedures are already designed, documented and reviewed, and a flow is simply a precise version of a procedure the firm already follows. Once built, it is reused for every client it applies to.

Flows are rigid. No flow can foresee every case. That is why flows include human review, and why an assistant can still be used for genuinely new work. The claim is not that every task should be a flow, only that recurring ones should.

Models keep improving. Better models will make fewer mistakes. They will not make a generated answer the same as a calculated one, remove the need to show how a figure was produced, or make it right to give a model more client data than a task needs.

9. Conclusion

Accounting is an exact profession that increasingly receives messy input. The answer is neither to avoid AI nor to hand it the whole task. It is to use AI only for the steps that need judgement, surround those steps with ordinary code and checks, and control what data it sees. Controlled, reusable workflows make this possible. They lower the cost of AI in practice, and AI assistants can still direct them through open standards. We believe this is where document software for accounting practice should go, and it is where we are taking Ziffa Flows.

References

  1. Model Context Protocol. Specification. https://modelcontextprotocol.io
  2. Micallef, D. Page-boundary detection in multi-document accounting PDFs: an evaluation of windowed recurrent segmentation. Ziffa Research, 2026. /research/splitting-multi-document-pdfs
← All research