Parsing turns a file into text a model can use, and it is where quality is quietly lost.
Plain text and Markdown are easy, and everything else is a negotiation.
PDFs are the hardest common case, because a PDF describes glyph positions rather than a document.
There is no structure inside saying this is a heading and this is a table.
Naive extraction reads a two-column page straight across, interleaving both columns.
The result is fluent nonsense that embeds cleanly and retrieves confidently.
Tables suffer worst, since a grid flattened to a line of numbers loses every association.
Scanned PDFs contain no text at all and need OCR before anything else.
Headings carry meaning, since the section a sentence sits under changes what it means.
Converting to Markdown preserves that structure for the chunker to use.
Layout-aware tools and vision models handle complex documents far better than text extraction.
They cost more, which is worth it for documents anyone will rely on.
Always read a sample of the parsed output rather than trusting the pipeline.
Bad parsing is invisible downstream, since retrieval will happily return garbled text.
Time spent here pays back more than any amount of prompt tuning.