Document parsers for RAG compared: choose how files become text
Decide first where documents are allowed to go, then which structure your retrieval needs to keep. Docling is a toolkit you can run locally; Unstructured's open-source library is for prototypes, with hosted APIs and pipelines for production; LlamaParse is a hosted parser with tiers that trade cost for accuracy; Azure Document Intelligence and Amazon Textract are cloud APIs built around layout, forms, tables and prebuilt document types. Parse a sample of your hardest pages with each before choosing.
Documentation checked . Compare workflows
Choose by workflow
Documented workflow links lead to primary sources. Fit and pilot questions are editorial recommendations. On small screens, scroll the table horizontally to read every column.
| Tool and source | Documented workflow | Consider when | Verify in your pilot |
|---|---|---|---|
| Unstructured | An Apache 2.0 Python library that partitions PDFs, HTML, Word files, images and other formats into typed elements, then cleans and chunks them; Unstructured's hosted API and pipelines cover production use. | You want a library you can run locally for prototypes, with a hosted path from the same vendor later. | The documented limits of the open-source library compared with the Unstructured API, and which calls route to Unstructured's paid service. |
| LlamaParse | A hosted parser from LlamaIndex with tier-dependent support for tables, charts, scanned pages and 130+ file types, returning Markdown, text or JSON, with tiers from Fast to Agentic Plus. | Your documents have complex tables and layouts and you can use LlamaIndex's hosted service, or an enterprise self-hosted (BYOC) deployment in your own cloud, which still calls OpenAI, Anthropic or Google models. | Which tier each document type needs, what the per-page cost is at that tier, how to pin a tier version so output stays reproducible, and, if self-hosting, which model provider endpoints your deployment calls. |
| Docling | An MIT-licensed toolkit that parses PDF, Office, HTML, image, audio and other formats into one DoclingDocument with layout, reading order and table structure, exported to Markdown, HTML or JSON. | Documents must stay on your own machines, including air-gapped environments. | Throughput on your hardware, and whether the default pipeline or a vision-language model pipeline handles your hardest pages. |
| Azure Document Intelligence | A Microsoft cloud service with read and layout models for text, tables and structure, prebuilt models such as invoices, and custom extraction and classification models trained on labeled documents. | You extract fields from known document types, or you already run on Azure. | Which model version and region you need, and whether the layout output keeps the structure your chunking depends on. |
| Amazon Textract | An AWS service that detects typed and handwritten text and extracts forms and tables, with Queries for named fields and dedicated APIs for invoices, receipts and lending packages. | You process forms, receipts or lending documents, or your documents already live in AWS. | Which API each document type needs, and how you will turn its blocks of text, forms and tables into chunks for retrieval. |
Start from the pages that break retrieval
Use these page types to stress-test a parser: tables split across pages, multi-column layouts read in the wrong order, scanned pages, charts with the numbers only in an image, and headers that repeat on every page. Pick twenty pages like that from your own collection before you open a vendor demo. A parser that handles a clean text PDF tells you little about the pages that cause wrong answers.
The PDF preparation explainer covers the pipeline from file to chunk. This guide covers choosing the parser. The documented workflows in the table come from the linked primary documentation, checked October 25, 2026. The fit questions and the pilot are our editorial recommendations. The five options illustrate different starting points; they are not a complete inventory or a ranking, and this guide reports no measured accuracy.
Compare where documents go and what comes back
Two questions narrow the field. Can the documents leave your network? And do you need text for chunking and search, or named fields such as an invoice total for a downstream system? The second is closer to intelligent document processing, and the cloud APIs here lean toward it.
Unstructured: the open-source overview describes a library that partitions PDFs, HTML files, Word documents, images and more into structured elements, with functions for cleaning and chunking. The same page says the library is a starting point for prototyping, is not designed for production scenarios, and points production work to Unstructured’s hosted pipelines. Calls that route to Unstructured’s service through partition_via_api need an Unstructured account for billing. The repository license is Apache 2.0, and the README documents a Docker image.
LlamaParse: the documentation describes a hosted parser with tier-dependent support for tables, charts, scanned pages and more than 130 file types, returning Markdown, text or JSON. Its tiers range from Fast through cost-effective and agentic tiers to Agentic Plus. Current Fast versions return Markdown and items; only versions before June 15, 2026 are text-only. A cost optimizer can send simple pages to a cheaper tier and complex pages to a premium one, and tiers are versioned so you can pin output for production. For documents that can’t go to a vendor’s cloud, LlamaIndex also offers an enterprise self-hosted (BYOC) deployment that runs LlamaParse on Kubernetes in your own AWS, Azure or Google Cloud account; it still calls OpenAI, Anthropic or Google models, through their APIs or your enterprise cloud endpoints, so it isn’t an offline option like Docling.
Docling: the repository README lists PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, audio, email and LaTeX among its input formats, with PDF layout, reading order, table structure, code and formula handling. Output goes into one DoclingDocument format and exports to Markdown, HTML or lossless JSON. The README lists local execution for sensitive data and air-gapped environments, and an optional vision-language model pipeline. Docling is MIT licensed, was started at IBM Research Zurich and is hosted by the LF AI & Data Foundation.
Azure Document Intelligence: the overview groups models into document analysis (Read for printed and handwritten text, Layout for text, tables and structure), prebuilt models such as invoices, and custom models trained on your labeled documents. Custom classifiers identify a document’s type before an extraction model runs. Microsoft now presents the service as part of Azure Content Understanding.
Amazon Textract: the developer guide describes detecting typed and handwritten text, extracting forms and tables through the Analyze Document API, asking for named fields with Queries and Custom Queries, processing invoices and receipts with AnalyzeExpense, and routing mortgage loan pages with Analyze Lending. Textract returns detected text, forms and tables, so turning that output into chunks for retrieval is still your pipeline’s job.
Conor worked at Galileo, and Galileo sponsored the show’s first season, most of its second and the first fifteen episodes of its third.
Run a hard-pages pilot
Suggested pilot, not a reported benchmark: parse the same twenty hard pages with each candidate and write down the correct text and table contents before you look at any output.
| Pilot page | What to check |
|---|---|
| A table that continues onto the next page | Whether rows stay in one table with their headers, or split into two unrelated pieces |
| A two-column page with a sidebar | Whether the reading order keeps each column together and the sidebar apart |
| A scanned page with handwriting | Whether the OCR text is usable, and how the parser marks text it is unsure of |
| A chart whose values appear only in the image | Whether the values are extracted, described or dropped |
| A page with a repeated header and footer | Whether that boilerplate ends up in every chunk |
| A password-protected or corrupted file | Whether the parser fails loudly or returns empty text that looks like success |
Then run a few retrieval queries against the chunks each parser produced. A parse that reads well can still split a table from the sentence that explains it, and only a retrieval test shows that.
Count what you will re-parse
Parsers change. New versions, tiers or models change the text they return, and a changed parse changes your chunks and embeddings. Record the parser version with each chunk, keep the original files, and plan how long a full re-parse of your collection would take and cost. For the retrieval system the chunks feed, see retrieval-augmented generation and the vector database comparison.
Where the interviews fit
LlamaIndex’s Jerry Liu described his company’s focus as turning a PDF into Markdown or extracted information that agents can read accurately, compared against both legacy OCR tools and sending page images to a frontier model. Unstructured CEO Brian Raymond described his company’s part of the pipeline as getting private data to models as cleanly structured as possible, and argued for sending the context window only what the model needs. These are the guests’ views. Liu’s company makes LlamaParse and Raymond’s makes Unstructured, both options above. Episode 2 was part of Galileo’s first sponsored season, with Galileo cofounder Yash Sheth hosting the session.
The conversations behind the decision
These guest perspectives explain the engineering problem. The linked documentation above supports the current product descriptions.
We're specifically interested in document context and turning a PDF into markdown or some extracted form of information that's like easy and accurate for the agents to understand.
You want to deliver to the context window exactly what the model needs, nothing more as efficiently as possible if you want to minimize cost, time, and also maximize performance.