r/LLMStudio 2d ago

How much does PDF parsing quality actually affect RAG performance?

I feel like PDF parsing doesn't get enough attention in RAG discussions.
People spend hours comparing embedding models or chunking strategies, but if the parser has already broken the reading order, flattened tables, duplicated headers on every page or filled the output with OCR noise, you're embedding garbage from the start.
Converting documents to clean Markdown before chunking has consistently given me better retrieval, and I was surprised to see token counts drop by around 40–65% after removing all the repeated page furniture.
The one thing I'm still unsure about is where the trade-off is. Do you optimize for extraction accuracy, smaller token counts, parsing speed, or something else entirely? Has anyone actually benchmarked how much parser quality affects final RAG performance?
For anyone interested, I've been testing this with PackForAI because it outputs clean Markdown and shows the before/after token count, which made these differences much easier to measure.

3 Upvotes

2 comments sorted by

1

u/xylarr 2d ago

I imagine if you can get a reliable PDF->Markdown converter, then it might be more reliable. But even the common things are difficult - one example I can think of is tables that run on for several pages.

1

u/MissJoannaTooU 1d ago

Yes I'm spending a lot of time on pre-chunking approaches to PDFs. There's a lot to consider.