Splitting Work Between Agents and Code
Most AI automation projects fail by routing every task through an LLM. Reliable operational systems separate probabilistic edge capture from deterministic validation and calculation at a strict write boundary.
Workday's global survey of more than 6,100 professionals found that 82% of employees routinely act as manual translators moving data between disconnected systems. Separate enterprise benchmarks estimate that manual re-keying and routine copy-paste loops cost upwards of $28,500 per employee per year before accounting for downstream correction errors.
The immediate reaction in many organizations is to point a large language model at the entire workflow. That approach reliably breaks in production — not because AI agents are useless, but because probabilistic models and deterministic business logic solve opposite halves of the problem.
Getting reliable automation requires classifying operational work into four distinct layers and assigning each layer to the engine whose failure modes match the task.
Execution Boundary Matrix
Failure Modes Across Manual Work, Raw LLMs, and Split Architecture
1. Edge capture belongs to AI agents
Operational facts rarely arrive in normalized database rows. They arrive as:
- a field supervisor's 40-second WhatsApp voice note and three site photos;
- a supplier's PDF invoice attached to a forwarded email thread;
- a scope change buried inside a Telegram discussion or meeting transcript.
Rigid web forms fail here because external vendors, clients, and field crews will not log into a portal to re-type information they already sent in chat. Deterministic parsers fail because every supplier formats PDFs and messages differently.
This is where language models genuinely excel: transcribing audio, extracting structured fields from irregular documents, identifying the probable account or project, and preserving a direct citation link back to the original message so a human can verify the source in seconds.
2. Entity matching requires a hybrid boundary
A large share of weekly back-office time goes into proving that Record A in one tool is the same entity as Record B in another:
- deduplicating accounts across spreadsheets and email (
Acme Corp Pte. Ltd.vs.ACME Corporation); - matching supplier delivery orders against purchase orders and progress claims;
- linking field defect photos to the right building zone or subcontractor package.
Pure LLMs make dangerous mistakes here when two company names or job codes look nearly identical. Pure SQL fails when incoming messages contain typos or informal nicknames.
The reliable architecture is two-stage matching:
- Deterministic identity first: Normalized database keys, unique domain/registration identifiers, and source message IDs resolve exact matches with zero guesswork.
- Confidence-gated classification second: When no exact key exists, an AI classifier proposes candidate matches with an explicit confidence score. High-confidence matches file automatically; anything below threshold routes to a human review queue with one-click reassignment.
3. Validations and policies must be 100% deterministic
At a typical 1%–5% human inspection miss rate, a team reviewing 300 operational records a month will quietly ship 3 to 15 compliance defects every month. Prompting an LLM to "please check all company rules before saving" does not solve this — prompts drift, truncate under long context, and cannot be formally proven to an auditor.
Invariants that must live in deterministic database constraints and write contracts, never prompts:
- verifying an active worker certification and site permit before saving a job assignment;
- blocking duplicate photo evidence across progress claims;
- requiring approved, effective-dated employment facts before a payroll run executes;
- locking pricing once a quote reaches
sentoraccepted.
When those checks execute inside the write contract itself, invalid mutations are refused uniformly whether initiated by a human in a browser, a scheduled script, or an AI agent.
4. Financial and statutory math belongs in unit-tested code
Spreadsheets are effective scratchpads and fragile systems of record: one broken formula or stale tax bracket can silently distort margin or payroll for months. Asking an LLM to compute totals, retention, or statutory deductions is worse — language models approximate arithmetic and cannot guarantee bit-exact reproducibility.
Every calculation that touches money or compliance — multi-stage statutory payroll, construction BOQ valuations with cumulative retention, FX exposure, or margin rollups — belongs in unit-tested, exact-decimal (BigDecimal) code whose outputs trace directly back to immutable source facts.
The architectural rule of thumb
A simple litmus test separates durable operational AI from fragile demos:
- Is the input messy and unstructured, and is a small error recoverable via citation or review? Put an agent at the edge.
- Must the rule hold 100% of the time for finance, permissions, or compliance? Enforce it in deterministic code and database constraints at the core.
When those two halves meet at a typed write boundary, agents absorb the unstructured noise humans hate handling, while deterministic code guarantees the ledger stays auditable and exact.
Related reading: Measuring Operational Software ROI · Why AI-Built Apps Stall