PDF Extraction Pipeline with Docling
A PDF processing workflow that extracts text, tables, and clauses into structured data for review and analysis.
Builds on Docling with optional clause extraction and reconciliation across document sections.
Overview
A Python workflow that uses Docling to convert PDFs into structured text and tables for document review and downstream analysis. Insurance policies are the running example. The workflow combines Docling conversion and hierarchical chunking with optional two-pass extraction and document-graph output.
Features
- Docling conversion with Markdown, JSON, picture captions, and table structure.
- Hierarchical chunking with section metadata, neighbor context, per-chunk column estimates, and serialized tables.
- Optional multi-pass LLM extraction with caching, verbatim provenance, clause/tariff schemas, and token usage telemetry.
- Document graph output that stitches sections, chunks, detections, clauses, tariffs, and potential conflicts.
Why two passes
The first pass runs over chunks and extracts candidate clauses with strict provenance (verbatim spans only). The second pass reconciles candidates across chunks — same concept appearing in different sections is merged with the surface forms preserved.
Scripted demonstration. This walkthrough uses example data and does not call live services or run operations on your systems.
The scripted walkthrough illustrates conversion, chunking, and extraction with example documents and output.