BuildSpark AI
Dismiss

BuildSpark AI: practical AI concepts for builders. New here? Start with Tokens.

Home · Retrieval & Grounding · 08 · Document parsing

Concept card · Retrieval & Grounding

Document parsing

Document parsing turns a file, such as a PDF or a page, into text and structure you can chunk.

Turning a file, such as a PDF or a page, into text and structure you can chunk.

Last checked 2026-10-18 Free card 5 min

Ask about Document parsing

What changed

Oct 18: First card. The picture shows one page as a flat line, then as a heading, a sentence, and a table. Sources are Azure Document Intelligence v4.0 and the current LlamaParse docs.

1 What it is

Azure Document Intelligence's layout model, v4.0 (API version 2024-11-30, generally available), takes a PDF, an image, or an Office file and returns text, tables, selection marks, and structure. The layout guide separates a geometric role, such as a table, from a logical role, such as a heading. Microsoft's version table lists v4.0 with no announced end of support. It lists v2.1 end of support as September 15, 2027, so this card cites v4.0. LlamaParse's current docs say Parse converts PDFs, scans, and Office files to markdown or JSON, and that the older llama-parse package is deprecated. This card cites the current docs. The picture is one page, two ways. It does not call either API.

Illustration. One page, as a flat export and as labelled pieces. It is not a parse of a real file.

Plain exportRefund window 14 days from the charge North 1240 South 980

The picture is one flattened line. A later cut can keep "14" and drop what it counts.

2 Why it matters

Cost

Azure's layout guide says the paid tier accepts a file up to 500 MB, and the free tier up to 4 MB. PDFs and TIFFs can run to 2,000 pages, and the free tier processes the first two pages. Those are limits on that API, not a price. LlamaParse's current docs show a parse call and do not state a page rate on the page this card cites. This card does not add one.

Quality

A table that comes back as one line can be split through the middle of a row. Azure's layout response can keep a table as a table, and a heading as a heading. LlamaParse's docs show markdown with a heading and a table.

Risk

Azure's layout guide says a password-locked PDF must be unlocked before you submit it. A parse can still drop a footer or a scanned line. The chunk you search is only as complete as the text you kept.

3 How to apply · try today

Take one PDF you would put in the support bot. Read the text you would chunk. If a table row no longer names its column, parse for structure before you split.

Common mistake

Chunking a plain-text export of the PDF and treating a broken table row as a fact.

Self-check

A parsed row says "14." The heading "Refund window, days" was on the line above, and the export dropped it. What is wrong?

Questions

What is document parsing?
Document parsing turns a file, such as a PDF or a page, into text and structure you can chunk.
Which Document Intelligence version does this card cite?
v4.0, API version 2024-11-30. Microsoft's version table lists no announced end of support for v4.0. v2.1 is listed with an end of support on September 15, 2027.
What goes wrong with a flat export?
A row can lose the heading that says what the number counts, and retrieval can return that row alone.