CASE STUDY 02 / 16 · AGENTIC AISOURCE-GROUNDED IMPLEMENTATION RECORD

Glyph.

A document engine that turns PDFs, scans and photos into structured data, then classifies, cross-checks and recommends. It never acts on its own.

VIEW THE SYSTEM DESIGN
DOCUMENTED DELIVERY STAGERunning

Extraction is running. Cross-document checks, exception recommendations and the DocHawk approval handoff are still being built.

CORE OPERATIONAL PROBLEMShipping paperwork arrives as scans and PDFs. People retype it into systems and compare documents line by line.
MY CONTRIBUTIONBuilt the document reading and extraction pipeline, including page-level OCR decisions and a private JSON output path.
TECHNOLOGY STACKPython 3.11 / PyMuPDF / PaddleOCR / Ollama / Mistral 7B / SQLite
01 / THE CHANGE

BEFORE
& AFTER.

01 — BEFORE

The manual / previous workflow

Staff read scanned shipping paperwork, type fields manually and compare invoices, packing lists and bills of lading line by line.

02 — AFTER / TARGET

What changed

Running: page-level embedded-text extraction or OCR, local-model structured output and shipment record storage. In build: cross-document validation and recommendations.

IMPLEMENTATION BOUNDARY Extraction is running. Cross-document checks, exception recommendations and the DocHawk approval handoff are still being built.

02 / SYSTEM DESIGN

UNDER
THE HOOD.

Built from source-described project workflows. Arrows retain execution and data dependencies.

SYSTEM ARCHITECTUREGlyph / PROCESS GRAPH
↓ SVG
Flow n_in->n_check n_check->n_text has text n_check->n_ocr scanned n_text->n_llm n_ocr->n_llm n_llm->n_classify n_llm->n_cross n_classify->n_rec n_cross->n_rec n_rec->n_db n_rec->n_out n_in PDF, scan or photo n_check Check each page for embedded text n_text Digital page: read the text directly n_ocr Scanned page: PaddleOCR n_llm Local model structures the text into JSON n_classify Classify the document n_cross Cross-check the documents n_rec Recommend: approve, correct or review n_db Database n_out DocHawk approval queue
PROCESS / STORE AGENT HUMAN APPROVAL NOT YET COMPLETE

Follow the workflow

STEPS / 10
  1. 01

    PDF, scan or photo

    Any document: digital, scanned or photographed.

  2. 02

    Check each page for embedded text

    PyMuPDF tests every page, so OCR only runs where it is needed.

  3. 03

    Digital page: read the text directly

    Fast and exact.

  4. 04

    Scanned page: PaddleOCR

    Returns text with confidence scores and bounding boxes.

  5. 05

    Local model structures the text into JSON

    Fields such as parties, quantities, weights and HS codes.

  6. 06

    Classify the document

    Invoice, packing list, draft bill of lading, final bill of lading or EIR.

  7. 07

    Cross-check the documents

    Quantities, weights, parties, HS codes and values must agree.

  8. 08

    Recommend: approve, correct or review

    Each recommendation carries its reasons.

  9. 09

    Database

    Bill of lading data, shipment state and history.

  10. 10

    DocHawk approval queue

    A person decides. Glyph never contacts a carrier.

03 / ENGINEERING

WHY THIS
DESIGN.

DESIGN DECISION

Technology with a specific job.

Use PyMuPDF when the page contains digital text; invoke PaddleOCR for scans. This preserves quality and avoids unnecessary OCR work.

TOOLS IN CONTEXT
Python 3.11PyMuPDFPaddleOCROllamaMistral 7BSQLite

System integrations and capabilities follow the maturity statement above; the diagram is not proof that every stage is deployed.

04 / THE EVIDENCE

IMPACT,
WITHOUT
GUESSWORK.

DOCUMENTED EVIDENCE

Working extraction and bill-of-lading database storage; validated field accuracy and minutes saved not supplied.

REALIZED AED CASH SAVINGSAWAITING MEASUREMENTNo project-specific realized AED figure supplied.
THE NEXT MEASURE

Manual minutes reviewing one bill of lading and accuracy on a signed-off field-level sample.

RECORDS NEEDED TO VERIFY

Document-level baseline review times, reviewed output by field, OCR confidence, exceptions, hours spent correcting records, and volume by document type.

Capacity released, avoided future expenditure and actual cash reductions are distinct. Do not allocate the portfolio-wide 20+ hours/week or 22% result to this individual case without supporting measurement.

OPEN THE AED SCENARIO CALCULATOR
05 / CONNECTED WORK

THE SYSTEM
IS CONNECTED.