Models Propose. Workflows Decide.
What Happens After the Demo
Every document AI demo looks the same. A model reads an invoice, a contract or a datasheet, pulls out the right fields and explains its answer. It’s impressive, and it’s the easy part.
Production is different. The contract has three amendments, and one of them changes the notice period. The invoice table splits across two pages. A supplier PDF hides a line of white-on-white text that says “ignore previous instructions.” A worker restarts halfway through an ERP posting. Six months later, an auditor asks why the system approved a payment.
At that point the question is no longer “Can the model read the document?” It’s “Who is in charge when the model is wrong?” Our answer is simple: the model proposes, the workflow decides.
Two Defaults That Break
Most enterprise document automation lands in one of two places:
- The Rigid Pipeline: Classic intelligent document processing (IDP) encodes everything as rules and templates. It’s predictable, but every new vendor layout, clause variation or ambiguous table becomes an exception, and the exception queue grows faster than the automation rate.
- The Autonomous Agent: The newer instinct is to hand the whole process to an agent that reads the documents, decides what to do, calls the tools and finishes the job. It adapts well, but now the process lives inside a prompt. Order of operations, retries, approvals and side effects all depend on what the model decides on a given run, which is hard to test, hard to audit and hard to defend to a regulator.
The industry is converging on a middle path. Anthropic’s guidance on building effective agents distinguishes workflows, where models and tools follow predefined code paths, from agents, where the model directs its own process, and recommends workflows when predictability and consistency matter. Microsoft, Google, AWS and Camunda all describe a similar split: predefined orchestration for the paths you already know, and AI agents where the path isn’t known in advance. We call this deterministic macro-orchestration with bounded agentic reasoning.
The One Rule That Matters Most
If you take one idea from this post, take this one: separate decision suggestion from action authorization.
A model may suggest that an invoice matches a purchase order, that a contract clause carries risk or that a component is a viable substitute. Those are useful judgments. But before anything is posted, approved, sent or purchased, deterministic services verify the identifiers, the arithmetic, the policy, the user’s authority and the action’s preconditions. The model’s output is a typed proposal. It is never a command.
Four Planes, Two Kinds of Work
Document work mixes two very different kinds of tasks:
- Semantically Uncertain Work: Identifying a document type, interpreting a clause, aligning field names across vendors, inferring what a table means, reconciling conflicting passages and explaining a conclusion.
- Mechanically Verifiable Work: Hashing files, checking totals, validating dates, matching exact IDs, applying policy thresholds, controlling access and writing to systems of record.
Handle both with prompts and the application becomes fragile. Handle both with rules and the exception queue explodes. The architecture assigns each kind of work to the plane built for it:
- Process Control: Owns state transitions, branching, timers, retries, approvals and SLAs. It is fully deterministic.
- Reasoning: Owns interpretation, ambiguity resolution, retrieval planning, evidence comparison and explanation. It is probabilistic, but bounded.
- Policy and Action: Owns authentication, authorization, schema checks, calculations and side effects. It is fully deterministic.
- Evidence and Observability: Owns provenance, immutable artifacts, claim-to-source links, traces and review records. It keeps deterministic records of probabilistic work.
The workflow, not the model, owns lifecycle state, execution order, deadlines, budgets, approval gates and the final disposition. Models work inside scoped reasoning islands.
What Does “Bounded” Actually Mean?
A reasoning task isn’t bounded because its prompt says “do not.” Boundaries have to be enforced outside the model. A bounded reasoning island has:
- A Narrow Objective: A clear task with a typed input and output contract.
- Read-Only Tools: An allowlist of tools, with no write access inside the loop.
- Hard Limits: Caps on turns, tool calls, tokens and elapsed time.
- Injected Data Filters: Tenant, permissions and document version are set by code, not requested by the model.
- Explicit End States: Every run ends as SUPPORTED, CONTRADICTED, AMBIGUOUS or INSUFFICIENT_EVIDENCE.
In practice, each reasoning step is specified like a call to an unreliable external service. A clause check, for example, might be defined like this:
- Task: verify_clause_obligation
- Question: Does the agreement require 30-day breach notification?
- Authorized Evidence: Only items ev-17 and ev-29.
- Constraints: A maximum of 4 turns, 6 tool calls and 25 seconds.
- Returns: SUPPORTED, CONTRADICTED, AMBIGUOUS or INSUFFICIENT_EVIDENCE.
One caution: a strict output schema fixes the shape of an answer, not its truth. Schema validation has to be followed by evidence checks and business rules.
Documents Are Evidence, Not Instructions
Documents are untrusted, versioned data. They contain ambiguous language, nested tables, footnotes, contradictory amendments and, sometimes, deliberately malicious content. The OWASP AI Agent Security Cheat Sheet names indirect prompt injection through documents and emails as a core risk, and recommends treating all external content as untrusted and scoping every tool’s permissions.
In this architecture, document text never defines a tool, a credential or a workflow step. A model may read the document. Only the workflow decides what happens next.
The Output Is an Evidence Package, Not an Answer
“Extract the text and ask an LLM” produces an answer. Enterprises need something they can defend. The goal is an evidence package for every case, containing:
- Source Document: An immutable copy, hashed and versioned.
- Layout Model: A layout-preserving representation of pages, tables and figures.
- Typed Claims: Each one linked to the exact span, cell or region that supports it.
- Validation Results: Deterministic checks and policy findings.
- Model Proposals: Recorded with their confidence signals and abstentions.
- Human Decisions: Captured wherever policy requires them.
- Downstream Actions: Logged with receipts and a complete execution history.
The same themes of provenance and human oversight run through NIST’s Generative AI Profile.
Patterns That Hold Up in Production
The architecture isn’t one pipeline. It’s a set of patterns that share the same rules:
- Router with Deterministic Subflows: A bounded model picks a route from a closed list, and a gateway checks that the route is allowed. Use it for mixed inboxes of invoices, contracts and compliance packets.
- Fan-Out Specialists, Deterministic Fan-In: Specialists check in parallel, then code merges their claims and flags conflicts. Use it for contract review, due diligence and regulatory packets.
- Bounded Retrieve, Reason, Verify Loop: The agent hunts for evidence within a fixed iteration and budget cap, then abstains if it can’t find enough. Use it for questions whose proof sits in an appendix, an amendment or another document.
- Candidate, Critic, Gate: One model proposes, a critic hunts for gaps and a gate decides. Use it for high-stakes extraction and interpretation.
- Human Review as a Durable State: Review is a real workflow state that can wait for days, not a chat message. Use it for anything above a risk threshold.
- Saga for Document-to-Transaction: Each downstream write has a precondition, an idempotency key and a compensating action. Use it for posting invoices, creating suppliers and filing records.
Two details are easy to miss. In fan-in, don’t ask another unconstrained model to “decide who is right.” Normalize the outputs to claims, compute agreement in code and send genuine disagreements to a verifier or a human. And in a retrieval loop, stop when explicit coverage criteria are met, not when the model says it feels confident.
What This Looks Like: Invoice to ERP
Here is how a single invoice moves through the workflow, from upload to posting:
- Intake: An upload starts a durable workflow, keyed on tenant and content hash so duplicates are caught.
- Security Checks: File type, malware and authorization checks run deterministically.
- Layout: A layout service produces a structured model of the document.
- Proposal: A bounded model classifies the document and proposes fields, each with an evidence pointer.
- Validation: Code validates the supplier ID, currency, line arithmetic, tax, totals and duplicate status.
- Decision: Versioned rules decide whether to auto-post, send for review or reject.
- Review: If review is needed, the workflow pauses durably until a person decides.
- Posting: An idempotent ERP call posts the invoice, and the receipt joins the evidence package.
The model did real work at the proposal step. It never touched the ledger.
The same discipline matters even more for component substitution in manufacturing. Semantic similarity can surface candidate parts, but only explicit constraints and datasheet evidence should allow a system to label an alternate “compatible.” Unknowns stay unknown instead of being filled in by model inference.
How We Approach This at Aizen
This architecture is the foundation of Aizen Orchestrate, our durable, identity-governed runtime for enterprise agent work:
- The Workflow Is the Unit of Work: Orchestrate runs long-lived, cross-system work as a frozen, versioned execution contract. Agents take part in the workflow, but they don’t own it.
- Deterministic Where It Should Be: Known decisions stay deterministic. Models handle ambiguity, investigation and judgment, not routine orchestration. A workflow can be fully deterministic or selectively AI-assisted, and it can span specialist agents, people and systems.
- Durable by Default: Execution survives restarts, long waits and human approvals.
- Approvals Are First-Class: Human judgment is a step in the workflow, not an exception to it.
- Identity Travels with the Work: Delegated user identity is downscoped at every agent boundary, so each participant has only the authority it needs.
- Evidence Stays with the Workflow: Our Evidence Fabric gives each reasoning step the evidence its decision needs, with source and history attached. Every run can be replayed step by step, with full audit lineage.
The result is document AI that moves from pilot to production without trading away control.
The Takeaway
The next wave of enterprise document AI won’t be won by the most autonomous agent. It will be won by systems where reasoning is powerful, its boundaries are explicit and every decision can be traced back to its evidence. Let the model propose. Let the workflow decide.
Explore the Aizen Orchestrate architecture to see how this works across your document workflows.
