Deloitte LuxembourgProfessional services

Assigning Rules RPA and Agents to a Business Workflow

An invoice can be blocked by missing purchase-order information or an expired automation session. The workflow needs different owners and recovery steps for those two situations.

System overviewVisual summary
Give each step the right kind of control
  1. LLM · read the invoice

    Propose fields with source quotations.

    Uncertain text
  2. Rules · check the proposal

    Resolve suppliers, purchase orders and totals.

    Explicit checks
  3. Human · approve a snapshot

    Review the source, exceptions and version.

    Accountability
  4. RPA boundary · enter approved data

    Resume a fixed job in the mock ERP.

    Controlled action

Persist the handoff between steps.
A restart should recover the work item, not ask a model to start again.

Independent local invoice experiment. The RPA boundary is simulated; no ERP or payment system is connected.

An invoice waiting for information is not a failed robot

An accounts-payable analyst receives a supplier invoice. Its amounts may be readable, yet the purchase-order reference is missing or does not match the supplier. Another invoice has already passed review but cannot reach the legacy application because the automation session expired. Both appear as unfinished work; they require different next actions.

The first needs a business clarification. The second needs a controlled technical retry. Sending both back to a language model wastes the reviewed work and can introduce different field values. The useful deliverable is a reviewable posting packet with its current state, evidence, blocking reason and next owner.

Deloitte Luxembourg’s published Intelligent Automation & Agentic AI Engineer role combines UiPath, document understanding, GenAI, Dataiku workflows and Python. Deloitte AI Institute’s July 2025 report illustrates invoice intake, extraction, ERP entry and exception handling, then presents possible agent enhancements. These are role requirements and an illustrative global scenario, not evidence of this workflow operating inside Deloitte Luxembourg. Sources checked on 30 November 2026. Published role · Illustrative invoice process, pp. 10–11

The independent lab uses synthetic invoice text and a local mock ERP. It does not implement OCR, UiPath or Dataiku, and it performs no payment.

Put variability at the extraction boundary

Five authored inputs cover a labelled invoice, prose wording, a missing PO, inconsistent totals and an unknown supplier with an ambiguous date. A fixed regex parser and a local Qwen extractor face the same inputs and business checks. This separates extraction coverage from the rules deciding whether a packet is ready for review.

The model proposes nine literal strings or nulls: invoice, supplier and PO identifiers; invoice and due dates; currency; net, tax and total amounts. Each value needs a unique source quote. This provides a review location, not proof that the selected phrase has the correct business meaning.

Rules check required fields, ISO dates, Decimal arithmetic and consistency with the synthetic supplier/PO registry. Rules calculate net + tax = total; extraction supplies the candidate amount strings. Supplier identity, currency and the PO’s authorised amount belong to reference-data checks. A missing PO must not be invented from an otherwise plausible invoice.

These rules cover positive EUR invoice postings, without assessing tax treatment. The regex baseline remains useful where a stable labelled format already provides the fields.

Uber’s invoice-processing engineering case, included in the supplied CSV, separates model extraction from business post-processing, human review and downstream integration. That is the mechanism adapted here. Its OCR, training, production scale and reported gains are not reproduced. Uber engineering

Give each component one accountable responsibility

Keep interpretation, checks and execution in separate workflow steps

Logical modules in the local Python prototype, with production connections shown separately.

INPUT

A bounded invoice work item

A fictional invoice text and its source fingerprint enter the local workflow. Public material supplies process context, not invoice data.

work item + source text + source version

PROCESSING RESPONSIBILITIES

  1. Interpret unfamiliar wording

    A fixed parser and a real local LLM propose invoice fields. The model retains source quotations and has no approval or ERP tools.

    invoice text → candidate fields + evidence
  2. Apply deterministic business checks

    The same rules resolve the supplier and purchase order, compare currency and amounts, and expose missing or conflicting inputs for review.

    candidate + reference data + rule version
  3. Persist the reviewed snapshot

    SQLite checkpoints retain candidate, checks and workflow state. Human approval is bound to the snapshot rather than to a mutable invoice label.

    source + candidate + references + rules → snapshot
  4. Resume a controlled posting job

    The simulated RPA boundary consumes the approved snapshot. Reopening the workflow recovers its checkpoint and downstream state instead of repeating extraction.

    approved snapshot → mock ERP receipt

REVIEW OUTPUT

An inspectable posting handoff

Reviewers can see what was read, why an invoice was held, what was approved and where interrupted work resumed. A mock posting is not a payment.

state + findings + approval + simulated receipt

DATA AND STATE KEPT BY THE PROTOTYPE

Source and extraction record

Original text, model response, parser output and their producing versions remain distinguishable.

Workflow checkpoints

Persisted stages and events explain which work is complete and which step must resume.

Approval and execution binding

A reviewed snapshot and downstream identity prevent a restart from silently changing the approved data.

Human decision

A named local fixture actor approves a checked snapshot. The model cannot grant approval, resolve every exception or decide that a downstream write has succeeded.

Production connections · proposed

Document intake and OCR → authenticated reviewers → authoritative procurement data → an actual ERP/RPA connector with documented lookup, retry and reconciliation behaviour.

Component or actorResponsibility in this design
ExtractorPropose source-bound fields from variable text.
Rules and reference dataCheck types, amounts, supplier and PO consistency.
ReviewerDecide whether the checked snapshot may proceed.
Workflow coordinatorPersist completed stages, blockers and the permitted next step.
Simulated RPA workerPerform a fixed mock posting operation from an approved packet.

The coordinator is an explicit workflow, not an autonomous LLM agent. The path is known, approval is a business decision, and the final data-entry operation is constrained. An agent could be considered for open-ended exception investigation, but it is an unexecuted architecture alternative here.

SQLite holds the source/candidate context and workflow checkpoints. Reopening the database should recover the work item without asking the model to interpret the same invoice again. A production worker, reviewer interface and enterprise identity system remain separate integration work.

Follow the packet from intake to a recoverable handoff

From incoming information to an accountable handoff

People and systems have separate responsibilities. Dashed steps connect the prototype to a proposed operational process.

  1. Invoice intake

    Create one durable work item

    Retain the incoming text and fingerprint before any interpretation. The lab starts from text and does not implement mailbox intake or OCR.

  2. Extraction model

    Read the uncertain wording once

    Produce a candidate with evidence quotations. Store the original response so that a later restart does not produce a different interpretation.

  3. Rules and reference data

    Explain what needs attention

    Check the candidate against the same purchase-order and supplier data as the parser baseline. Keep missing data and mismatches visible.

  4. Human reviewer

    Approve the current snapshot

    Inspect the source, candidate and findings. Changed inputs or reference versions require a new check and approval.

  5. Workflow and simulated RPA

    Recover the unfinished handoff

    Reopen persisted state and continue the approved job. Distinguish a pre-write interruption from uncertain downstream completion.

  6. Service ownerProposed integration

    Connect operational systems separately

    A production release needs real identity, connector semantics, document quality and exception ownership. The local fixture does not establish those properties.

The independent lab runs invoice extraction locally and simulates the RPA/ERP handoff. A free-running agent is an architectural alternative discussed in the article, not an executed comparison arm.

Interpret once · inspect · resume

Follow an invoice through its actual handoffs

The model proposes fields. Business rules and the workflow decide what can proceed. These are recorded local runs; the page does not call a model or an ERP.

What this example shows

The first-pass model packet passed bounded rules. An authored checker approves its exact snapshot; an injected RPA-session failure stops before writing. Reopening and refreshing the mock session resumes posting without another extraction.

Persisted workflow state

POSTED

Next responsibilityMock ERP handoff complete

Workflow packet origin: model validated.

Business checks and exceptions

No issue was returned by the bounded invoice rules. Human approval and downstream completion remain separate workflow steps.

Read the synthetic invoice text
SYNTHETIC INVOICE - NOT A PAYMENT INSTRUCTION
Invoice ID: INV-1001
Supplier ID: SYN-SUP-001
PO ID: PO-001
Invoice date: 2026-11-30
Due date: 2026-12-15
Currency: EUR
Net amount: 1000.00
Tax amount: 170.00
Total amount: 1170.00

Source SHA-256 · 16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5

Compare fields before trusting the workflow

Both extraction paths face the same rules. A literal quotation establishes where a value appeared; it does not prove that the interpretation is correct.

Fixed parser · business checks
valid
LLM proposal · business checks
valid
FieldFixed parserLLM proposalModel’s source quotation
InvoiceINV-1001INV-1001Invoice ID: INV-1001
SupplierSYN-SUP-001SYN-SUP-001Supplier ID: SYN-SUP-001
Purchase orderPO-001PO-001PO ID: PO-001
Invoice date2026-11-302026-11-30Invoice date: 2026-11-30
Due date2026-12-152026-12-15Due date: 2026-12-15
CurrencyEUREURCurrency: EUR
Net amount1000.001000.00Net amount: 1000.00
Tax amount170.00170.00Tax amount: 170.00
Total amount1170.001170.00Total amount: 1170.00
Inspect extraction checks and original candidate

The parser and model share the business validator. This record also retains model parsing and source-binding findings.

{
  "baseline": {
    "candidate": {
      "fields": {
        "invoice_id": {
          "value": "INV-1001",
          "quote": "Invoice ID: INV-1001"
        },
        "supplier_id": {
          "value": "SYN-SUP-001",
          "quote": "Supplier ID: SYN-SUP-001"
        },
        "po_id": {
          "value": "PO-001",
          "quote": "PO ID: PO-001"
        },
        "invoice_date": {
          "value": "2026-11-30",
          "quote": "Invoice date: 2026-11-30"
        },
        "due_date": {
          "value": "2026-12-15",
          "quote": "Due date: 2026-12-15"
        },
        "currency": {
          "value": "EUR",
          "quote": "Currency: EUR"
        },
        "net_amount": {
          "value": "1000.00",
          "quote": "Net amount: 1000.00"
        },
        "tax_amount": {
          "value": "170.00",
          "quote": "Tax amount: 170.00"
        },
        "total_amount": {
          "value": "1170.00",
          "quote": "Total amount: 1170.00"
        }
      }
    },
    "validation": {
      "status": "valid",
      "issues": [],
      "normalized": {
        "invoice_id": "INV-1001",
        "supplier_id": "SYN-SUP-001",
        "po_id": "PO-001",
        "invoice_date": "2026-11-30",
        "due_date": "2026-12-15",
        "currency": "EUR",
        "net_amount": "1000.00",
        "tax_amount": "170.00",
        "total_amount": "1170.00"
      },
      "source_spans": {
        "invoice_id": {
          "start": 58,
          "end": 66,
          "text": "INV-1001",
          "quote": "Invoice ID: INV-1001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "supplier_id": {
          "start": 80,
          "end": 91,
          "text": "SYN-SUP-001",
          "quote": "Supplier ID: SYN-SUP-001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "po_id": {
          "start": 99,
          "end": 105,
          "text": "PO-001",
          "quote": "PO ID: PO-001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "invoice_date": {
          "start": 120,
          "end": 130,
          "text": "2026-11-30",
          "quote": "Invoice date: 2026-11-30",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "due_date": {
          "start": 141,
          "end": 151,
          "text": "2026-12-15",
          "quote": "Due date: 2026-12-15",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "currency": {
          "start": 162,
          "end": 165,
          "text": "EUR",
          "quote": "Currency: EUR",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "net_amount": {
          "start": 178,
          "end": 185,
          "text": "1000.00",
          "quote": "Net amount: 1000.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "tax_amount": {
          "start": 198,
          "end": 204,
          "text": "170.00",
          "quote": "Tax amount: 170.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "total_amount": {
          "start": 219,
          "end": 226,
          "text": "1170.00",
          "quote": "Total amount: 1170.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        }
      }
    }
  },
  "model": {
    "candidate": {
      "fields": {
        "invoice_id": {
          "value": "INV-1001",
          "quote": "Invoice ID: INV-1001"
        },
        "supplier_id": {
          "value": "SYN-SUP-001",
          "quote": "Supplier ID: SYN-SUP-001"
        },
        "po_id": {
          "value": "PO-001",
          "quote": "PO ID: PO-001"
        },
        "invoice_date": {
          "value": "2026-11-30",
          "quote": "Invoice date: 2026-11-30"
        },
        "due_date": {
          "value": "2026-12-15",
          "quote": "Due date: 2026-12-15"
        },
        "currency": {
          "value": "EUR",
          "quote": "Currency: EUR"
        },
        "net_amount": {
          "value": "1000.00",
          "quote": "Net amount: 1000.00"
        },
        "tax_amount": {
          "value": "170.00",
          "quote": "Tax amount: 170.00"
        },
        "total_amount": {
          "value": "1170.00",
          "quote": "Total amount: 1170.00"
        }
      }
    },
    "parse_error": null,
    "binding_issues": [],
    "validation": {
      "status": "valid",
      "issues": [],
      "normalized": {
        "invoice_id": "INV-1001",
        "supplier_id": "SYN-SUP-001",
        "po_id": "PO-001",
        "invoice_date": "2026-11-30",
        "due_date": "2026-12-15",
        "currency": "EUR",
        "net_amount": "1000.00",
        "tax_amount": "170.00",
        "total_amount": "1170.00"
      },
      "source_spans": {
        "invoice_id": {
          "start": 58,
          "end": 66,
          "text": "INV-1001",
          "quote": "Invoice ID: INV-1001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "supplier_id": {
          "start": 80,
          "end": 91,
          "text": "SYN-SUP-001",
          "quote": "Supplier ID: SYN-SUP-001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "po_id": {
          "start": 99,
          "end": 105,
          "text": "PO-001",
          "quote": "PO ID: PO-001",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "invoice_date": {
          "start": 120,
          "end": 130,
          "text": "2026-11-30",
          "quote": "Invoice date: 2026-11-30",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "due_date": {
          "start": 141,
          "end": 151,
          "text": "2026-12-15",
          "quote": "Due date: 2026-12-15",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "currency": {
          "start": 162,
          "end": 165,
          "text": "EUR",
          "quote": "Currency: EUR",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "net_amount": {
          "start": 178,
          "end": 185,
          "text": "1000.00",
          "quote": "Net amount: 1000.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "tax_amount": {
          "start": 198,
          "end": 204,
          "text": "170.00",
          "quote": "Tax amount: 170.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        },
        "total_amount": {
          "start": 219,
          "end": 226,
          "text": "1170.00",
          "quote": "Total amount: 1170.00",
          "source_sha256": "16eb71024ac61437b39064452251555db06d4f54da83c6c96d917064b6163ff5"
        }
      }
    },
    "raw_call_ref": "STRUCTURED"
  }
}

Recover the work item at its checkpoint

  1. 01
    intakeRECEIVED

    Synthetic text saved with its source digest

  2. 02
    extractionEXTRACTED

    First-pass model candidate retained; no execution authority

  3. 03
    rulesVALIDATED

    Shared invoice/PO rules passed; awaiting human review

  4. 04
    reviewAPPROVED

    Demo checker approved this exact source/candidate/reference/rule snapshot

  5. 05
    rpaPOST QUEUED

    Deterministic RPA reads the approved normalized snapshot, never model prose

  6. 06
    rpaRPA BLOCKED

    Injected expired mock session; stopped before any ERP write

  7. 07
    sessionRPA BLOCKED

    Authored operator refresh restored the mock session after database reopen

  8. 08
    rpaPOST QUEUED

    Deterministic RPA reads the approved normalized snapshot, never model prose

  9. 09
    rpaPOSTED

    Local mockERP receipt saved; this is an invoice posting, never a payment

Inspect the approval, simulated events and mock receipt

The named actors, session failure and ERP receipt belong to this synthetic fixture. They are not evidence of a real approval, RPA connection or payment.

{
  "approval": {
    "reviewer": "checker-demo",
    "snapshot_sha256": "26c7ad82eb1d1da4f5ce73c2baf81676bf85005ff2fc6eff867a55e218ed172a",
    "valid": true,
    "origin": "authored_local_review_action"
  },
  "erp_receipt": {
    "origin": "local_mock_erp",
    "posting_id": "mock-ea88af6394d9d6fe",
    "job_id": "STRUCTURED",
    "snapshot_sha256": "26c7ad82eb1d1da4f5ce73c2baf81676bf85005ff2fc6eff867a55e218ed172a",
    "payload": {
      "currency": "EUR",
      "due_date": "2026-12-15",
      "invoice_date": "2026-11-30",
      "invoice_id": "INV-1001",
      "net_amount": "1000.00",
      "po_id": "PO-001",
      "supplier_id": "SYN-SUP-001",
      "tax_amount": "170.00",
      "total_amount": "1170.00"
    },
    "payment_executed": false
  },
  "packet_origin": "model_validated",
  "simulated_events": [
    "EXPIRED_SESSION_BEFORE_WRITE",
    "DATABASE_REOPEN",
    "OPERATOR_SESSION_REFRESH"
  ],
  "resume": {
    "database_reopens": 1,
    "model_calls_before": 1,
    "model_calls_after": 1,
    "additional_model_calls": 0,
    "rpa_attempts": 2,
    "skipped_stages": [
      "extraction"
    ]
  }
}
Inspect the experiment identity and source manifest
{
  "experiment": {
    "id": "deloitte-invoice-checkpoints-v1",
    "model": {
      "name": "qwen3-vl:4b-instruct-q4_K_M",
      "model": "qwen3-vl:4b-instruct-q4_K_M",
      "modified_at": "2026-11-25T21:56:46.663784614+01:00",
      "size": 3337226771,
      "digest": "8708ab6acc5eed95c57d3d4b68c08f85eb197840827c097c7d9ed49f2a030c6e",
      "details": {
        "parent_model": "dhiltgen/qwen3-vl:4b-instruct-q4_K_M-llamacpp",
        "format": "gguf",
        "family": "qwen3vl",
        "families": [
          "qwen3vl",
          "clip"
        ],
        "parameter_size": "4.0B",
        "quantization_level": "Q4_K_M",
        "context_length": 262144,
        "embedding_length": 2560,
        "runner": "llamacpp"
      },
      "capabilities": [
        "completion",
        "vision",
        "tools"
      ]
    },
    "runtime": {
      "version": "0.40.18"
    },
    "recorded_at": "2026-11-30T13:18:27.006192+00:00",
    "repository_anchor": "cb9d6c2fd8847e0e7c1313349834102b52aa91a5",
    "prompt_sha256": "beed9241fbfaed003b8b93bd695d7f1e48bc373ccc282fe5d91a472d322638dd",
    "schema_sha256": "42f305cbae321d54874f4a350a5085be7d2b854072a792655bc90f427f21498f",
    "source_hashes": {
      "extraction.py": "32bb617fcfb221efaf904790360eaffb2f85a54842fc64ea37c0506fe23daeff",
      "validation.py": "c13e61d4e5b13421b955323c7de5f6f61331b37794f276a33ab9d93665098fc6",
      "run.py": "a79b661c26792d8aafee13acb4034480fd44c7492eef113ca2fbc2213e9aea38",
      "fixtures.json": "8abfe7547a10d7588e040af662978b6f13a7be7dba320eb434eb36408ac070a5",
      "registry.json": "69b4ed927a7d5b8881e55804fe086a6516ea525aaf44c3bad6831ad3450a3ee7",
      "rules.json": "0cba1a70dfb89e5bf04a5a3ef10d85de7242830877b95587e114a5c1e5776b04",
      "expected.json": "b5c2a3ee386a66aedf155237fa0047fa3cf2cfa30a9c5673dd8418c282ca7f26"
    },
    "workflow_source_hashes": {
      "workflow.py": "8aaf628e40eb6334c44b55169bac411c93e3493a21d104fcdd8bba17f378256a",
      "replay.py": "80226db6d29eb6e39e03dec8af96087b26f9dea040069a614f2c1fb01855a401"
    },
    "boundary": "Five real first-pass local text extractions, then deterministic persistent-workflow execution over retained candidates. Authored human actions/restarts/session fault; local mockERP only. No Deloitte integration, OCR, actual RPA product, autonomous agent or payment."
  },
  "summary": {
    "real_extraction_calls": 5,
    "additional_resume_model_calls": 0,
    "boundary": "Counts identify this recording; no pooled accuracy, production impact, autonomous-agent comparison or fresh latency benchmark."
  },
  "source_manifest": {
    "company_context": {
      "title": "Generative AI agents in collaborative automation",
      "publisher": "Deloitte AI Institute",
      "date": "2025-07",
      "url": "https://www.deloitte.com/content/dam/assets-shared/docs/about/2025/generative-ai-agents-in-collaborative-automation.pdf",
      "location": "Printed pages10–11; PDF pages10–11",
      "supported_context": "The invoice-processing discussion is an illustrative collaborative-automation scenario. It is not evidence that Deloitte Luxembourg deployed this lab or this architecture.",
      "boundary": "Independent synthetic-text experiment; no Deloitte internal invoice, infrastructure, OCR/RPA product or ERP integration."
    },
    "design_references": [
      {
        "title": "Advancing invoice document processing using GenAI",
        "publisher": "Uber Engineering",
        "date": "2025-04-17",
        "url": "https://www.uber.com/in/en/blog/advancing-invoice-document-processing-using-genai/",
        "bibliography": "Reference CSV physical row62, as verified during case research",
        "adaptation": "Separate extraction proposals from business post-processing and human review. This lab implements its own small SQLite workflow and does not claim Uber's production scale or framework."
      },
      {
        "title": "The LinkedIn Generative AI Application Tech Stack — Extending to Build AI Agents",
        "publisher": "LinkedIn Engineering",
        "url": "https://www.linkedin.com/blog/engineering/generative-ai/the-linkedin-generative-ai-application-tech-stack-extending-to-build-ai-agents",
        "bibliography": "Reference CSV physical row201, as verified during case research",
        "adaptation": "Make task history, registry contracts and execution boundaries explicit; no LinkedIn framework is imported."
      }
    ],
    "data_and_rights": "All five invoice texts, purchase orders, suppliers, reviewer identities, expected labels and workflow actions are authored synthetic fixtures. No complete third-party document, model weights, customer records or private runtime log is redistributed.",
    "provenance_anchor": "cb9d6c2fd8847e0e7c1313349834102b52aa91a5",
    "scope": "Five actual first-pass local model calls plus separately executed deterministic workflow scenarios. Agent-vs-workflow discussion is an unexecuted architecture tradeoff, not a benchmark."
  }
}

Counts identify this recording; no pooled accuracy, production impact, autonomous-agent comparison or fresh latency benchmark.

The analyst reviews the source and candidate together, then examines the rule exceptions. A supplier or PO problem is visible business work; an automation-session problem is operational work. The workflow records this distinction instead of treating every incomplete invoice as the same error.

Both methods pass the labelled invoice. On the prose input, the model candidate passes the same bounded checks while the fixed-label regex misses required fields. This is the observed role for language handling; neither validated packet is automatically approved.

The remaining inputs stay in REVIEW_REQUIRED. The missing PO is null, but the model supplies a non-null quote, violating the null/quote contract; missing-field and PO checks also block progress. For the disputed invoice, the model correctly preserves the stated total of 600: rules reject 500 + 85 ≠ 600 instead of repairing the source. The unknown supplier and literal 03/04/2027 date trigger registry and ISO-date review. Those are business exceptions, not evidence that every extracted number is wrong.

Approve a snapshot, then resume the unfinished stage

Approval identifies the source, candidate, normalised payload, PO reference and rule snapshot the reviewer saw. The implementation recomputes the snapshot hash and checks its components before approval and resumption. If they change, the old decision cannot authorise a revised packet. The recorded checker action is explicitly authored, not a model decision or a production authentication event.

Bind approval to the reviewed workflow snapshotPython12 lines
def approve_snapshot(self, item_id, expected_snapshot_sha, reviewer):
    with self.transaction():
        row = self.item(item_id)
        if reviewer not in self.registry["reviewers"]:
            raise WorkflowError("Reviewer is not in the trusted demo registry")
        if row["state"] != "VALIDATED" or row["snapshot_sha"] != expected_snapshot_sha or not self.is_current(row):
            raise WorkflowError("Stale or unvalidated approval snapshot")
        approval = {"reviewer": reviewer, "snapshot_sha256": expected_snapshot_sha,
                    "valid": True, "origin": "authored_local_review_action"}
        self.db.execute("UPDATE items SET state='APPROVED',approval=? WHERE id=?", (json.dumps(approval), item_id))
        self.event(item_id, "review", "APPROVED", "Demo checker approved this exact source/candidate/reference/rule snapshot")
    return self.receipt(item_id)

The structured packet follows VALIDATED → APPROVED → POST_QUEUED → RPA_BLOCKED. An injected expired session stops before any ERP write. After closing and reopening SQLite, an authored operator refresh restores the mock session. Resumption reaches POSTED using the same approved packet: two RPA attempts, one mock row, no repeated extraction. The receipt records a local invoice posting, not payment.

Inspect the resume boundary
Resume persisted work without invoking extractionPython25 lines
def resume_workitem(self, item_id):
    row = self.item(item_id)
    if row["state"] in ("REVIEW_REQUIRED", "REEXTRACTION_REQUIRED", "REVALIDATION_REQUIRED", "POSTED"):
        return self.receipt(item_id)
    if not self.is_current(row):
        self.db.execute("UPDATE items SET state='REVALIDATION_REQUIRED',approval=NULL WHERE id=?", (item_id,))
        self.event(item_id, "resume", "REVALIDATION_REQUIRED", "Reference/rule/source snapshot changed; prior approval cannot be reused")
        return self.receipt(item_id)
    if row["state"] == "VALIDATED":
        self.event(item_id, "resume", "VALIDATED", "Reopened at human-review checkpoint; extraction is not repeated")
        return self.receipt(item_id)
    approval = json.loads(row["approval"] or "null")
    if not approval or not approval["valid"] or approval["snapshot_sha256"] != row["snapshot_sha"]:
        raise WorkflowError("A current snapshot-bound approval is required before RPA")
    self.db.execute("UPDATE items SET state='POST_QUEUED',rpa_attempts=rpa_attempts+1 WHERE id=?", (item_id,))
    self.event(item_id, "rpa", "POST_QUEUED", "Deterministic RPA reads the approved normalized snapshot, never model prose")
    try:
        receipt = self.erp.post(item_id, row["snapshot_sha"], json.loads(row["snapshot"])["normalized"])
    except SessionExpired:
        self.db.execute("UPDATE items SET state='RPA_BLOCKED' WHERE id=?", (item_id,))
        self.event(item_id, "rpa", "RPA_BLOCKED", "Injected expired mock session; stopped before any ERP write")
        return self.receipt(item_id)
    self.db.execute("UPDATE items SET state='POSTED',receipt=? WHERE id=?", (json.dumps(receipt), item_id))
    self.event(item_id, "rpa", "POSTED", "Local mockERP receipt saved; this is an invoice posting, never a payment")
    return self.receipt(item_id)

The prose case separately reopens at the committed human-review checkpoint, then proceeds only after the checker approves. A sixth workflow scenario reuses the structured model candidate and changes the source due date from 15 to 22 December. Its approval becomes invalid and the state is REEXTRACTION_REQUIRED; no sixth model call or ERP write occurs. The displayed original candidate still refers to the original source.

LinkedIn’s agent-stack article, also in the CSV, uses persistent history and retry mechanisms for long-running work. The local adaptation is a stored workflow checkpoint and explicit recovery step, rather than its messaging or agent infrastructure. LinkedIn engineering

Use an agent only where the workflow needs one

The decision is about task boundaries. Variable invoice text may justify model assistance; arithmetic and reference matching need deterministic checks. Human approval belongs to an accountable reviewer. A fixed legacy entry step needs a constrained worker, while persistence protects progress across waits and restarts.

For these five authored documents, the model adds useful prose-format coverage, while the shared rules and reviewer preserve the posting boundary. This supports a small hybrid workflow, not a general extraction-accuracy claim. An explicit coordinator also makes the next owner and recovery point inspectable. No single-agent alternative was executed, so the recording does not establish that a workflow outperforms an agent.

Inspect the recordings and reproduce the local workflow

The downloadable lab retains five actual first-pass local Qwen text extractions, their regex comparisons and six workflow scenarios. There are no model retries, repaired outputs or human field fallbacks. Approval, source revision, session failure and restart are labelled authored events. Database reopen and mock posting execute locally.

From the standalone folder, run python3 replay.py, python3 verify_recording.py and python3 smoke.py. They use saved candidates without inference. At portfolio root, npm run prepare:deloitte exports the page recording and package. The lab does not measure production latency, handling-time savings or autonomous-agent performance.