Intelligent Document Processing on LLMs with an Agentic Layer

A European industrial equipment manufacturer automated 80% of supplier document handling with an LLM pipeline and AI agents that check certificates, match invoices, and post clean data to SAP.

Intelligent Document Processing on LLMs with an Agentic Layer

About the client

A German manufacturer of industrial pumps, with 6 plants across Europe, was buried in supplier paperwork and wanted to change that

About the Product

The product is an Intelligent Document Processing (IDP) system built into the client’s procure-to-pay and incoming-quality workflows. It ingests every supplier document, understands it with large language models, and turns it into structured, verified data.

How is it different from off-the-shelf solutions? On top of extraction sits an agentic layer: AI agent checks certificates against material specifications, matches invoices to orders and deliveries, chases suppliers for missing documents, and routes exceptions to the right person. Clean data is posted straight to SAP S/4HANA, with every value linked to its source page.

What are the documents to be processed? Typical documents handled:

  • Supplier invoices, order confirmations and delivery notes
  • Material test certificates and certificates of conformity
  • Inspection reports, calibration and heat-treatment records
  • Customs and shipping documents in 7 languages

Introduction

The client came to Devox Software to revamp its legacy OCR that relied on fixed supplier templates, so any layout change or poor scan broke it and clerks re-keyed data into SAP by hand.

As a result, we replaced template extraction with an LLM pipeline and added AI agents that do the matching, checking, and follow-up work the teams used to do manually. The first plant went live in 4 months; all 6 plants were on the platform within 6.

Project Team

1 Delivery Manager

1 Solution Architect

2 AI/ML Engineers (LLM, agents, evaluation)

2 Backend Engineers (Python)

1 SAP Integration Engineer

1 Frontend Engineer (React)

1 DevOps / MLOps Engineer

1 QA Engineer

1 Business Analyst

Challenges

  • Numerous supplier formats. Documents came from 1200+ suppliers as scans, photos, and PDFs in 7 languages. Template OCR missed or misread about 30% of fields.
  • Manual matching. Accounts payable matched each invoice to its purchase order and delivery note by hand. An invoice took about 12 minutes.
  • LLM reliability. Raw LLM output can hallucinate numbers. The client needed predictable results and clear confidence scores with a human check for anything uncertain.
  • Traceability and compliance. ISO 9001 and customer audits require proof of which certificate was accepted, by whom, and why.
  • Legacy ERP integration. The platform had to post to SAP S/4HANA and fit existing approval rules without stopping production or month-end close.

What Usually Goes Wrong and How We Avoided It

Most LLM document projects in manufacturing fail on small, domain-specific details. These are the traps we planned for from day one.

What goes wrong Why it happens How we avoided it
The decimal comma/calendar readings/time zone problem. 

For example: A German certificate’s tensile strength of “1.234,5” becomes 1.2345 MPa, and a good batch is rejected.

Suppliers write numbers by local convention, and LLMs default to the English format. Locale-aware number parsing by supplier country, plus a plausibility check: any value outside of the spec range goes to a human.
The wrong heat number. One certificate covers 3 heats, and the model attaches the first heat’s chemistry to the whole delivery. Extraction treats the certificate as one record instead of a table of heats. Line-level extraction keyed to the heat numbers on the delivery note. The spec-check agent rejects any heat it cannot match.
Unit mix-ups. Yield strength arrives in ksi from a US supplier and is compared directly with a spec in MPa. Units sit in column headers or footnotes, far from the value. A unit ontology (MPa, N/mm², ksi, psi) and conversion before every comparison; no unit found means no automatic decision.
Plausible hallucinations. A missing elongation value is filled with a typical 18%, which looks perfectly normal. LLMs complete patterns; a blank field looks like an error to them. No source, no value: every field needs page coordinates, and the schema allows “not found”. A value without a bounding box is dropped.
Recycled certificates. A supplier sends the same certificate for a new delivery, sometimes with a changed date. Old certificates are easier to resend than new tests are to run. A registry of certificate numbers flags any reuse for quality review.

The lesson: put domain rules and checks around the LLM, and let a human see anything the system is not sure about.

Tech Stack

Layer Technologies
LLMs GPT-4o, Claude (via Azure OpenAI and API), fine-tuned small model for document classification
Agent orchestration LangGraph, LangChain, custom tool layer
OCR and layout Azure AI Document Intelligence, Tesseract (fallback)
Retrieval PostgreSQL + pgvector for material specs, supplier master data and approval rules
ERP integration SAP S/4HANA (OData APIs, IDocs), SAP QM for inspection lots
Backend Python, FastAPI, Celery, Redis
Frontend React, TypeScript (review workspace)
Evaluation and monitoring Golden datasets, LangSmith, Prometheus, Grafana
Infrastructure Azure (AKS, Blob Storage, Key Vault), Terraform, GitHub Actions
Security EU data residency, private endpoints, role-based access, full audit log

Solution

We built the platform in 2 layers: an LLM document pipeline that turns any supplier document into structured data, and an agentic layer that verifies that data and posts it to SAP. As a result, every value reaches SAP with a confidence score and a link to its source page; anything below threshold goes to a buyer or quality engineer first.

  1. Document intake and classification. Documents arrive from supplier email inboxes, the supplier portal, and scanners at the goods receipt point. A fine-tuned classifier sorts them, standardizes them, and cleans up scans.
  2. LLM extraction. OCR supplies text and layout. The LLM extracts fields into strict JSON schemas per document type, with no supplier templates: line items, quantities, prices, heat numbers, chemical and mechanical values. Each value carries a confidence score and its page coordinates.
  3. Agentic layer. Four LangGraph agents work on each document set:
  • Spec-check agent compares certificate values with the material specification and tolerances retrieved from the vector store.
  • 3-way match agent matches invoice, purchase order, and delivery note by item, quantity, and price, within agreed tolerances.
  • Supplier follow-up agent detects missing or wrong documents and emails the supplier exactly what is needed.
  • Routing agent sends exceptions to the right buyer, AP clerk or quality engineer, and releases clean documents for posting.
  1. Human in the loop. A React review workspace shows each value next to its highlighted source. Reviewers accept or correct with one click; corrections feed the evaluation set.
  2. ERP posting and audit. Approved invoices post to SAP as ready-to-pay documents; accepted certificates release inspection lots in SAP QM. Every decision is logged for ISO 9001 and customer audits, and all data stays in the client’s EU Azure tenant.

Results

Metric Before After
Time to process one invoice ~12 minutes < 1 minute
Touchless invoices 0% 80%
Certificate check in incoming inspection Up to 2 days ~20 minutes
Field-level extraction accuracy ~70% (template OCR) 96%
Audit traceability Partial, paper-based 100% of values linked to source

Sum Up

Devox Software has turned a slow, template-bound paper process into an LLM-powered platform with an agentic layer that reads, checks, and posts supplier documents on its own. People stay in control of every exception, and every number is traceable to its source, saving resources for the client.

Book a call

Want to Achieve Your Goals? Book Your Call Now!

Having trouble booking? Open the booking page.

Contact Us

We Fix, Transform, and Skyrocket Your Software.

Tell us where your system needs help — we’ll show you how to move forward with clarity and speed. From architecture to launch — we’re your engineering partner.

Book your free consultation. We’ll help you move faster, and smarter.

Let's Discuss Your Project!

Share the details of your project – like scope or business challenges. Our team will carefully study them and then we’ll figure out the next move together.







    By sending this form I confirm that I have read and accept the Privacy Policy

    Thank You for Contacting Us!

    We appreciate you reaching out. Your message has been received, and a member of our team will get back to you within 24 hours.

    In the meantime, feel free to follow our social.


      Thank You for Subscribing!

      Welcome to the Devox Software community! We're excited to have you on board. You'll now receive the latest industry insights, company news, and exclusive updates straight to your inbox.