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
  • 3Tables, plans and handwriting
  • 4Structured extraction at scale

    Exercise answers

    • Answer: Extract lease terms with page-verified evidence
    • Answer: Compare long-document strategies

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 4

Structured extraction at scale

Turning parsed pages into versioned, schema-validated records per document type, with evidence quotes tied to pages, normalised values, cross-document checks and a cost you can predict across thousands of cases.

75 min 1 video 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uv

By the end of this lesson you can

  • Design a versioned schema registry keyed by document type and edition, within the JSON Schema subset that structured outputs support
  • Implement extraction with evidence quotes tied to page numbers, and verify each quote against that page's parsed text
  • Choose between whole-document, sectional and locate-then-extract strategies for long documents
  • Write cross-document consistency checks for a case file and estimate extraction cost per case

On this page

  • Intuition: the paralegal's checklist, multiplied
  • A schema registry, not a schema
  • Extraction with verified evidence
  • Why not the built-in citations?
  • Long documents
  • Cross-document checks
  • Worked example: extraction cost per matter
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Intuition: the paralegal's checklist, multiplied
  2. 02A schema registry, not a schema
  3. 03Extraction with verified evidence
  4. 04Long documents
  5. 05Cross-document checks
  6. 06Worked example: extraction cost per matter
  7. 07Connections
  8. 08Summary

Sources & further reading

  • UNIKIE-BENCH: Benchmarking Large Multimodal Models for Key Information Extraction in Visual DocumentsPaper · Ji et al. · 2026ACL 2026. A recent benchmark of key information extraction from document images across layouts and qualities; shows that accuracy varies sharply with layout and field type, which is why you evaluate per field.
  • Lost in the Middle: How Language Models Use Long ContextsPaper · Liu et al. · Stanford · 2023TACL 2024. The position effect behind the long-document strategies in this lesson. Current models are much better, but measure on your own long leases.
  • Document Parsing Unveiled: Techniques, Challenges, and Prospects for Structured Information ExtractionPaper · Zhang et al. · 2024The later sections cover the step from parsed content to structured information, including the trade-off between pipeline extraction and end-to-end models.
  • How to read a title registerLab research · HM Land RegistryThe domain model for the register schema, and the source of several cross-document checks (the property register of a leasehold title records the lease's date and term).
  • Structured outputs (Claude API docs)Docs · Anthropicoutput_config.format with a JSON Schema, the Python SDK's messages.parse with Pydantic models, and the list of unsupported schema features (numeric and string-length constraints, recursive schemas). Read the limitations section before designing schemas.
  • Citations (Claude API docs)Docs · AnthropicBuilt-in citations with character and page locations. Note two limits that matter for ingest - citations cannot be combined with structured outputs, and scanned PDFs without extractable text cannot be cited.
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