Scaling Document Processing with LLMs and Human Review

vendr_/_extend · Tech · year n/a · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: SaaS contract and order-form processing

Vendr and Extend needed to convert more than 100,000 unstructured SaaS order forms and contracts into reliable structured catalog data.

Constraints:

Architecture

The system combines traditional OCR/document preprocessing, LLM entity extraction, catalog entity mapping, embeddings for document-similarity outlier detection, targeted human review in Extend and Vendr back-office tools, and feedback loops that affirm or correct mappings instead of reviewing every document manually.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  A["Order form PDFs"] --> B["OCR preprocessing"]
  B --> C["LLM extraction prompts"]
  C --> D["Entity mapping workflow"]
  C --> E["Document embeddings"]
  E --> F["Similarity review selector"]
  F --> G["Human review tools"]
  D --> G
  G --> H["Structured document catalog"]
  D --> H
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Order form PDFs Unstructured SaaS order forms and contracts to be processed. OCR preprocessing
OCR preprocessing Converts PDFs into text that LLM extraction can consume. Order form PDFs, LLM extraction prompts
LLM extraction prompts Extracts customer, seller, reseller, supplier, and other field candidates from documents. OCR preprocessing, Entity mapping workflow, Document embeddings
Entity mapping workflow Maps extracted names to canonical catalog entities. LLM extraction prompts, Structured document catalog, Human review tools
Document embeddings Represent documents for similarity and outlier detection. LLM extraction prompts, Similarity review selector
Similarity review selector Finds documents outside expected clusters to target human review. Document embeddings, Human review tools
Human review tools Allow reviewers to correct, affirm, and annotate extracted structured data. Similarity review selector, Entity mapping workflow, Structured document catalog
Structured document catalog Canonical repository used by back-office search, pricing comparison, and customer recommendations. Entity mapping workflow, Human review tools

Data flow

Order-form PDFs are converted into document text, LLM prompts extract entity names and other fields, names are mapped into a catalog of customers/sellers/resellers/suppliers, embeddings identify documents that are dissimilar to known clusters, and only targeted cases are routed to human review for corrections or affirmations.

3 supporting quotes
“we will focus exclusive exclusively on order forms and how we convert these to documents”transcript, stated
“we used open AI to calculate embeddings from each document's text we then calculated the cosign similarity among documents”transcript, stated
“document similarity allowed us to Target review efforts improve our structured repository and develop confidence in our entity predictions”transcript, stated

Why this architecture

The architecture separates extraction, mapping, and review because order forms are ambiguous: LLMs can take a first pass, but catalog usefulness depends on canonical entity mapping and targeted human correction of high-risk cases.

3 supporting quotes
“we will argue that entity mapping is Central to having a usable document repository”transcript, stated
“we feel relying entirely on real-time llms would result in too many mistakes including unknown unknowns”transcript, stated
“with these combined issues occurring more than 5% of the time some human review is today necessary”transcript, stated

Models used: OpenAI embeddings · LLMs for extraction · OCR systems

Scale

Alternatives considered (roads not taken)

Real-time LLM research without preprocessing

Rejected because: The team expected too many mistakes, including unknown unknowns, in complex seller/supplier/customer relationships.

“now you might ask whether one could use llms to do this research in real time rather than pre-processing with human review”transcript, stated

Review every document manually

Rejected because: The corpus was too large, so similarity-based targeting was used to route only suspicious or informative cases.

“how to ensure correct entities without reviewing every document manually”transcript, stated

One embedding representation for all review purposes

Rejected because: Different review questions required different embedding lengths and similarity signals.

“embedding differences May reflect different document lengths signifying an appendix or additional attachment armed with these findings we added a short embedding”transcript, stated

Patterns

human-in-the-loop-gate (governance)

Human reviewers correct and affirm LLM-extracted document mappings for targeted cases instead of trusting every extraction automatically.

“humans can come in have oversight over the entire process review results make Corrections and add in any notes as needed”transcript, stated

semantic-caching (retrieval)

Embeddings over document text are reused to compare documents, detect outliers, and focus review on unusual cases.

“if we could characterize each document in a document space we hypothesized we could determine whether an entity was misclassified”transcript, stated

structured-output-contract (data-extraction)

The pipeline converts order forms into structured catalog fields and canonical entity mappings.

“vender has used llms and human review to create structured catalog data”transcript, stated

eval-driven-development (evaluation)

Model and prompt choices depend on eval sets to catch regressions and field-level performance changes.

“you got to make sure you have eval sets uh because without eval sets it's going to be really hard to know hey are we introducing regressions”transcript, stated

Tradeoffs

Review strategy

Chose targeted human review over manual review of every document.

Rationale: Document similarity can surface likely mistakes and reduce review burden while maintaining confidence.

“document similarity allowed us to Target review efforts improve our structured repository and develop confidence in our entity predictions”transcript, stated

Extraction boundary

Chose preprocess and fix data before use over ask LLMs to resolve everything in real time.

Rationale: Unknown unknowns and clustered errors made real-time-only reasoning too risky.

“these errors are not always random and may occur in clusters therefore we argue that entity identification is a critical pre-processing step”transcript, stated

Model selection

Chose task-specific model optionality with eval sets over one default model for all document tasks.

Rationale: Accuracy, cost, latency, and visual performance differ by task and model family.

“model optionality uh is really important because performance can mean different things is it high accuracy is it low latency is it low cost”transcript, stated

Gotchas (what bit them)

Entity mapping matters as much as text extraction.

Root cause: Supplier, seller, reseller, and customer relationships can be ambiguous or change through acquisitions.

Resolution: Map extracted names into canonical catalog entries and send hard cases through human review.

“recognizing an entity means not simply identifying a name but m mapping to the corresponding entity in our catalog”transcript, stated

Incorrect mappings damage user trust and analytics.

Root cause: Misclassified entities hide relevant documents and corrupt aggregate contract-value calculations.

Resolution: Use preprocessing, catalog mapping, and targeted review before exposing structured data.

“if we misclassify the supplier entity three issues may arise first the users may lose trust due to incorrect results”transcript, stated

LLM confidence is not enough for mission-critical extraction.

Root cause: Models can be wrong and self-reported confidence is unreliable.

Resolution: Use logprob-style uncertainty signals, citations, validations, LLM judges, and human review.

“we can't ask the llm for its conf confidence that typically doesn't work well”transcript, stated

Evaluation

The team evaluates extraction quality with eval sets, targeted human-review corrections, validations, uncertainty signals, and document-similarity outlier checks.

Metrics: entity mapping correctness · field-level regressions · human correction rate · document similarity outliers · validation failures · review coverage

“without eval sets it's going to be really hard to know hey are we introducing regressions when we bring in different models”transcript, stated
“data validations which are really important for example if you're pulling invoice line items do the total of the line items add up to the total of the invoice”transcript, stated

Outcomes

The source emphasizes production process design and scale of document ingestion more than exact accuracy percentages after deployment.

“llms and hybrid human review has accelerated our ability to digest more than 100,000 documents”transcript, stated
“we feel this effort has been substantially faster and more successful than prior art with human coding of documents”transcript, stated