Case Studies › Document Processing

Document Processing Pipeline

How a 30-person operations team replaced manual invoice handling with a local AI pipeline.

30-person operations team | Mac Studio M3 Ultra 512GB | Hermes document pipeline

The problem

A growing operations team receives 50-200 business documents per day — invoices, purchase orders, renewal notices, contracts, and quotes. They arrive as PDF attachments via email, shared drives, and portal downloads.

StepWho does itTime per documentDaily volume
Open and read the PDFAdmin assistant2-3 min50-200
Identify document typeAdmin assistant30 sec50-200
Extract key fields (invoice number, amounts, dates, parties)Data entry clerk3-5 min50-200
Check for missing or inconsistent informationSenior admin2-3 min50-200
File in correct folder, log in spreadsheetAdmin assistant1-2 min50-200
Route for approvalTeam lead1 min20-50

At 100 documents/day, that's 10-14 hours of human time per day spent on document triage and data extraction. Not analysis. Not decision-making. Just reading, classifying, and re-keying information that's already written down.

The cost:

What they tried first:

The Foundry setup

Foundry was installed on a Mac Studio (M3 Ultra, 512GB RAM) already in the office. The machine was being used for video editing — it had the capacity but wasn't doing anything AI-related.

What was configured:

  1. Local model — a 30B-parameter model running via llama.cpp, optimised for document understanding. Runs entirely on-device. No document ever leaves the Mac Studio.
  2. Hermes document pipeline — a watched-folder workflow: documents dropped into a secure intake folder, system classifies each document, extracts structured fields, flags missing or inconsistent information, preserves the original PDF untouched alongside the extracted data, all outputs marked "requires human review" before action.
  3. Observability dashboard — llm_stats shows model health and memory usage, documents processed/queued/flagged, processing time per document, any errors or anomalies.

What was NOT configured: No outbound internet access for document processing. No automatic payments, approvals, or system-of-record updates. No cloud API calls — everything runs locally.

What it looks like running

Before: Document arrives at 9:07 AM

An invoice lands in the intake folder. It's a 3-page PDF from Acme Marine Ltd — an invoice for managed local inference setup and workflow integration.

At 9:07:03 AM — Foundry picks it up
The Hermes pipeline detects the new file, assigns a document ID, and queues it for processing.

At 9:07:05 AM — Classification complete

Document ID: 2e8aeb98-01df-4af7-9564-6bc9af91c6ed Document type: invoice Source: watched folder Status: processing

At 9:07:08 AM — Field extraction complete

FieldExtracted value
CustomerAcme Marine Ltd
Customer contactJane Smith, jane@acme.test
Invoice numberINV-2026-001
Purchase orderPO-77
ProjectFoundry Pilot (FND-001)
Subtotal£12,000
Tax£2,400
Total£14,400
Issue date2026-04-29
Due date2026-05-29
Payment termsNet 30
Line item 1Managed local inference setup — £9,000
Line item 2Hermes workflow integration — £3,000

At 9:07:09 AM — Consistency check
The system cross-references extracted fields: Invoice total matches subtotal + tax ✅, Due date is 30 days from issue date (matches payment terms) ✅, Purchase order number present ✅, No missing required fields ✅

At 9:07:10 AM — Filed and logged
Original PDF preserved with file hash for integrity, extracted data saved as structured JSON, entry logged in the pipeline database, document status: awaiting approval.

Total processing time: 7 seconds. A human reviewer sees the extracted data and original PDF side by side, confirms accuracy, and approves. That takes 15-20 seconds — skimming, not reading from scratch.

The numbers

MetricBefore (manual)After (Foundry)Change
Time per document8-13 min20-30 sec (review only)95% reduction
Documents/day capacity100-120500+5x throughput
Processing lag24-48 hoursUnder 1 minuteInstant
Data entry errors3-8%<0.5% (model reads, human confirms)90%+ reduction
FTE required1.5-2.00.3 (review queue only)1.2-1.7 FTE freed
Monthly API cost£1,800 (OpenAI)£0 (local)£21,600/year saved
Audit trailNone (spreadsheet + shared drive)Full provenance (original hash, extraction log, review approval)Complete
Data leaves building?Yes (OpenAI API)No (local only)Compliant

Annual savings: £21,600 in API costs + £35,000-50,000 in freed staff time = £56,000-71,600/year.

Hardware cost: £0 (existing Mac Studio). Foundry setup: £999 + £99/month = £2,187 first year.

ROI: 25-32x in year one.

What stayed cloud

Not everything moved local. The team still uses cloud services for:

The point isn't "everything local." It's "the right workloads local, with a clear line between what stays cloud and what doesn't."

What it doesn't do

The team's experience

"Before Foundry, I spent my morning opening invoices. Now I spend my morning reviewing extracted data that's already 95% correct, and I have time to actually chase the late payers and talk to suppliers." Operations admin, 6 weeks after deployment
"We were going to hire another admin person. We didn't need to. The pipeline handles the volume we had and the growth we're planning for." Operations lead
"The audit trail alone justified it. When finance asked 'where did this number come from,' we could show them the original PDF, the extraction, and who approved it. That used to take an hour of folder-hunting." Team lead

Is this right for you?

This setup works well for teams that:

It's not a fit if you:

Want to see it running on your documents? Book a Foundry Fit Review →

Technical details (for evaluators)

Hardware
Mac Studio M3 Ultra, 512GB unified memory, 1TB SSD
Model
Qwen3-Coder-30B, Q5_K_M quantization, running via llama.cpp on port 8080
Memory footprint
~40GB resident (of 512GB available)
Processing speed
3-8 seconds per typical business PDF (2-5 pages)
Pipeline
Hermes watched-folder → classify → extract → validate → file → queue for review
Observability
llm_stats dashboard showing model health, memory pressure, throughput, and error rates
No-cloud posture
All processing local. No outbound API calls during document processing.
Original preservation
Source PDFs retain file hashes. Extracted data is stored separately as JSON. Working copies are clearly distinct from originals.

← Back to all case studies | Next: Conveyancing Intake →