Structuring the Unstructured

Cedric Clyburn, Red Hat20:41 · Jun 2026 · 2,344 views
Thumbnail for Structuring the Unstructured Watch on YouTube
TL;DR
  1. 1

    Unstructured documents can corrupt AI answers when tables, columns, images, or scanned text are extracted incorrectly.

  2. 2

    Docling converts documents locally into Markdown, JSON, HTML, dictionaries, and Pydantic data while preserving layout and relationships.

  3. 3

    A structured Docling document can support chunkless RAG, REST services, and agent workflows through an MCP server.

Summary

Cedric Clyburn argues that document processing determines whether an AI application can use enterprise data accurately. PDFs often contain tables, images, diagrams, headers, and scanned text that simple parsers flatten or merge. Frontier models can improve extraction, but their cost and non-deterministic output make them difficult to use across large document collections. Clyburn demonstrates Docling, an open-source local tool that combines OCR and layout analysis to export documents into formats such as Markdown, JSON, HTML, and Pydantic data. The demos cover table extraction, image content, layout bounding boxes, image descriptions from a local Granite model, and structured invoice fields. He also shows chunkless RAG, where an LLM searches a document outline instead of a vector database, then describes Docling Serve for larger deployments and a Docling MCP server for agent-driven processing.

Key ideas
02:05

Bad extraction can create false facts in downstream AI systems

Clyburn describes a scanned scientific article whose two words from separate PDF columns were merged by an AI system into a nonsensical term. That term then appeared in 20 scientific papers and was cited by other researchers. He uses the example to show why document structure matters before data reaches a RAG pipeline or a fine-tuned model. A simple parser can also flatten a table into a linear stream, truncate text, lose image content, and leave headers mixed with the body. In that form, a model cannot reliably answer questions about the source.

05:38

Docling keeps document structure while exporting usable data

Clyburn presents Docling as a local command-line tool and library for converting different input formats into Markdown, JSON, HTML, dictionaries, or Pydantic data. Its processing combines OCR with vision models and layout analysis. The output can preserve page structure, tables, images, captions, and relationships between elements. He says Red Hat uses it with thousands of product documentation PDFs, including in settings where teams need local execution, cannot send data to an outside service, or work in an air-gapped environment.

09:08

Structured extraction can target the fields an application actually needs

The examples go beyond converting a whole document. Clyburn shows an invoice where the desired output is the bill number, total invoice price, and sender name. Docling can return those fields in a Pydantic format instead of bringing along unrelated headings and titles. He also describes image annotation, where a vision-language model adds a description to an image in a PDF. That description gives a RAG system text it can retrieve when a user asks what an image contains.

09:49

Docling can extract tables, images, and layout elements separately

In the notebook demo, Clyburn converts an eight-page Docling research paper to Markdown and inspects its page count, tables, and other elements. He then extracts eight tables from the PDF and exports them to a data frame. A separate pipeline scales and inspects embedded images, exposing the source image, its caption, and text elements mapped to the picture. The layout visualizer shows bounding boxes for section headers, text, subtitles, and images, which helps preserve where each element belongs in the source.

13:18

Local vision models can enrich documents before retrieval

Clyburn configures a PDF pipeline to call a locally running Granite model through Ollama. The model produces a detailed description of an image instead of leaving the document with only its original caption. He presents this as a way to add searchable context for images and diagrams before building a RAG application. Docling can also identify content such as personally identifiable information in a document, which can help teams remove it before extracting the source into an application.

14:12

Chunkless RAG can search a document outline instead of a vector database

Clyburn demonstrates an agentic RAG pattern that uses the processed document outline as its retrieval index. Each section has a summary, and the LLM selects a relevant section before pulling the full text from the Docling document. The approach does not use a chunker, embedding model, or vector database. In one example, the agent iterates about five times over a document with 20 sections. A larger example uses an IBM 2025 annual report with 418 sections and asks about Red Hat's revenue growth.

16:43

Docling Serve and MCP extend document processing to services and agents

For collections containing hundreds or hundreds of thousands of PDFs, Clyburn shows Docling Serve as a REST API that can run as a container or through Kubernetes. The endpoint accepts options such as OCR, a processing backend, and image annotation. The Docling MCP server exposes conversion, generation, and manipulation tools to AI applications. Through configuration in an AI coding tool, an agent can convert a document, create a summary, combine action items from another PDF, or export the result as Markdown without the user managing every processing argument.

19:43

The project offers a local path from raw files to RAG inputs

Clyburn closes by describing Docling's pipeline as OCR and layout analysis followed by a Pydantic Docling document. That document can be exported into several formats, turned into datasets, and processed with the Hybrid Chunker when conventional chunking is needed. He says the project integrates with RAG frameworks and agent systems. The main practical choice he presents is to process documents on a user's own machine, without a GPU, while avoiding a proprietary service for the first stage of an AI workflow.

"The issue is is that a lot of this text has been truncated, has been merged, and isn't decipherable even by me as a human."04:01
Who should watch
  • You are building RAG or fine-tuning workflows from PDFs and need tables, images, captions, or scanned text to remain usable.
  • Your organization cannot send private documents to a hosted extraction service, or you need processing to run locally in an air-gapped environment.
  • You want an agent to process documents through an MCP server, or you need to move from notebook experiments to a REST service.