Read first

Start Here

Master index for the extraction-stack deep dive. Three framings to carry through every chapter, a recommended reading order, and the vocabulary worth pinning before you dig in.

Scope & audience

This guide is the working reference for the extraction stack that turns unstructured business documents — contracts, invoices, purchase orders, supplier catalogs — into structured, queryable data. It's calibrated against platforms that ship SLA-backed extraction accuracy on non-templated documents, where the customer doesn't train models themselves.

You'll get the most out of this if you are:

  • An engineer or ML practitioner building or operating a production extraction system.
  • A Forward Deployed Engineer integrating an extraction platform into a customer's stack.
  • A technical PM scoping accuracy SLAs, eval methodology, or HITL workflow.
  • An analyst trying to understand why extraction quality on a specific document class is what it is.

It will not teach you to train an OCR or LayoutLM from scratch. It will teach you to reason about, debug, and operate a stack built on those primitives.

Three framings worth carrying

1. The stack is layered; errors compound

OCR errors propagate to layout analysis; layout errors propagate to field extraction; field-extraction errors propagate to downstream consumers. When something's wrong at the top, the diagnosis usually requires walking down through the layers. Chapter 10 is the catalog of how this looks in practice.

2. Quality is a first-class deliverable

Best-effort extraction is not the product. SLA-backed quality requires explicit measurement, calibrated confidence, an HITL workflow you can operate at customer scale, and proactive monitoring. The chapters on calibration (06), HITL (07), eval (08), and drift (09) are where the operational craft lives.

3. The differentiator is non-templated document handling

OCR + LayoutLM + LLM-as-extractor is the easy 80%. The hard 20% — the part that justifies SLA-backed pricing — is handling documents that don't conform to a template: 2008-era OEM agreements, customer-modified supplier templates, scanned faxes with handwritten amendments. Most of the engineering effort goes here. Watch for it in every chapter.

Reading order

End-to-end (if you're new to the domain)

Read 01 → 10 in order. Each chapter builds on the prior. Plan ~4–6 hours of focused reading; longer if you stop to follow citations.

Quality-focused (if you're operating an SLA)

Start with 01 for the stack mental model, then jump to 06 → 07 → 08 → 09 (the four quality chapters). Then revisit 02 / 03 / 04 only when a debugging question pushes you there.

Debugging-focused (if extraction is breaking and you need to fix it)

10 first — it's the catalog of failure modes. From the diagnosis there, jump to whichever layer chapter applies. The cross-references will guide you.

Designer-focused (if you're building a new extraction system from scratch)

01 for the stack model, 04 for the field-extraction architecture decision (rule vs model vs hybrid), 05 for the output schema (you'll regret it if you skip this), then 06 / 07 / 08 for the quality system. The build-along (Build a Contract-Intelligence Pipeline) is the companion that puts it all into code.

A note on vocabulary

  • Extraction — the whole pipeline from raw file to structured field. Sometimes the model-specific step in the middle (the LLM call). Context usually disambiguates.
  • Layout-aware — model that consumes both text and spatial position. LayoutLM family is the canonical example.
  • HITL — Human-in-the-Loop. The reviewer queue that catches low-confidence extractions.
  • Ground truth — the "right answer" used to measure model accuracy. Sourced from customer-supplied gold sets, internal analyst audit, or accumulated customer corrections.
  • Provenance — for an extracted value, the (document, page, bounding box) it came from. Required for audit-ready output.
  • SLA — Service Level Agreement. In this guide, almost always an accuracy SLA — a contractual commitment to a measured-accuracy threshold by document class.

Other vocabulary is introduced where it first matters, with one short definition per term.