Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Document Ingestion Pipelines

Free · sign in to start and track progress

1 · Reading real-world documents

  • 1What a real case file contains
  • 2Parsing: text layers to vision models

    Exercise answers

    • Answer: Run a four-way parser bake-off
    • Answer: Self-host an open parsing model
  • 3Tables, plans and handwriting
  • 4Structured extraction at scale

2 · Running ingest in production

  • 5Durable ingest pipelines
  • 6Re-ingestion, versioning and backfills
  • 7PII detection and redaction
  • 8Ingest evals and the hand-off
CapstoneIngest a case file end to endReference implementation

Module 1 · Reading real-world documents · Lesson 2

Parsing: text layers to vision models

How text-layer extraction, OCR, layout-model pipelines and vision-language models each turn a page into text, how their failures differ, what the benchmarks do and don't tell you, and how to route each page to the cheapest parser that is accurate enough.

80 min 1 video 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvOCR and PDF parsing: Tesseract and DoclingRun GPU code on ModalServe a model with vLLMGet an OpenRouter keyLocal models with Ollama

By the end of this lesson you can

  • Explain how text-layer extraction, classical OCR, layout-model pipelines and end-to-end vision-language models work, and the characteristic failure of each
  • Compare current tools (Docling, marker, MinerU, olmOCR, PaddleOCR-VL, Mistral OCR, Reducto, LlamaParse, Unstructured and Claude's PDF input) on how they work, licensing and deployment
  • Read OmniDocBench, olmOCR-Bench and ParseBench results critically, including what each metric rewards and who built the benchmark
  • Compute per-page and per-case parsing cost for several designs and implement a routing policy with escalation

On this page

  • Intuition: four ways to copy a page
  • The four approaches, precisely
  • Text-layer extraction
  • Classical OCR
  • Layout-model pipelines
  • End-to-end vision-language models
  • Reading the benchmarks
  • Worked example: what parsing a matter costs
  • A routing policy
  • Where the data goes
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: four ways to copy a page
  2. 02The four approaches, precisely
  3. 03Reading the benchmarks
  4. 04Worked example: what parsing a matter costs
  5. 05A routing policy
  6. 06Where the data goes
  7. 07Connections
  8. 08Summary

Sources & further reading

  • OmniDocBench: Benchmarking Diverse PDF Document Parsing with Comprehensive AnnotationsPaper · Ouyang et al. · Shanghai AI Laboratory · 2024CVPR 2025. The most widely reported end-to-end parsing benchmark. Read section 3 for the page types and the metrics (normalised edit distance for text, TEDS for tables, CDM for formulas), then check the live leaderboard on its GitHub page.
  • olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language ModelsPaper · Poznanski et al. · Allen Institute for AI · 2025A fully open 7B parsing model and olmOCR-Bench, a benchmark of 1,400 PDFs scored by binary checks. The cost comparison (about 176 USD per million pages self-hosted against over 6,240 USD with GPT-4o at the time) is the clearest statement of why specialist models exist.
  • olmOCR 2: Unit Test Rewards for Document OCRPaper · Poznanski, Soldaini, Lo · Allen Institute for AI · 2025Trains the parser with reinforcement learning against binary unit tests (text present, reading order, table cell relations). The idea transfers directly to how you should evaluate parsers on your own documents.
  • ParseBench: A Document Parsing Benchmark for AI AgentsPaper · Zhang et al. · LlamaIndex · 2026About 2,000 human-verified enterprise pages scored on tables, charts, content faithfulness, semantic formatting and visual grounding. Useful framing for agent use; note that the vendor's own product tops it.
  • Docling Technical ReportPaper · Auer et al. · IBM Research · 2024The best-documented open modular pipeline (layout model trained on DocLayNet, TableFormer for tables, pluggable OCR). Read it to understand what a layout pipeline does at each stage.
  • PDF support (Claude API docs)Docs · AnthropicHow Claude reads a PDF (each page as an image plus its extracted text), the page and size limits, and how to estimate tokens per page.
  • Mistral OCR (Document AI docs)Docs · Mistral AIA hosted vision-model parser returning markdown per page, tables as HTML or markdown, optional headers and footers, and block bounding boxes on OCR 4 and later.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 8 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks