Where Does RAG Actually Cost You Money? (Episode 2) A developer discovered that using a free PDF parser in a RAG pipeline silently destroyed document structure, leading to incorrect LLM answers and increased costs from retries. The engineer argues that document extraction is the first quality-versus-cost decision in the pipeline, and that cheap parsers can end up costing more in extra LLM calls than paid extraction services. I thought I had solved document extraction. My Node.js project could pull text out of a PDF. The library was free. No API bill, no config, no drama. I ran it on a few sample docs, the text came back clean, and I moved on to the "real" parts of the pipeline — chunking, embeddings, retrieval. Everything looked solved. Until I uploaded a real corporate document. The PDF opened fine. No errors. Text came back — a whole string of it, sitting right there in my terminal. Extraction "worked." And then my RAG system answered a simple question completely wrong. I did what anyone does — I blamed the usual suspects. Checked the LLM prompt. Checked the embeddings. Checked retrieval, checked the vector DB, checked if the right chunks were even being pulled. All fine. The bug wasn't in my LLM. It wasn't in my embeddings. It wasn't in retrieval. It started much earlier than any of that. The parser had quietly destroyed the document before the rest of my pipeline ever got a chance to see it. That was the moment it clicked for me: document extraction was never about "reading a PDF." It's about preserving knowledge before anything downstream can use it. And preserving knowledge, it turns out, costs money. Everything below comes back to one sentence: Document extraction is the first place in the RAG pipeline where you make a quality-vs-cost decision — whether you realize you're making it or not. Not "which library should I use." Not "OCR is hard." Just this: the moment a document enters your system, you're already choosing between cheap-and-lossy or expensive-and-faithful, and that choice quietly sets the ceiling for every stage that comes after it. Here's the sequence that fooled me, laid out plainly: Free parser │ ▼ Table becomes word soup / column order scrambled │ ▼ Chunk looks fine no error, just wrong │ ▼ Embedding of a wrong chunk │ ▼ Retrieved anyway — vector search doesn't know it's damaged │ ▼ LLM answers confidently... and wrong │ ▼ User asks again, rephrases, retries │ ▼ More LLM calls, more tokens, more cost Notice what's missing from that chain: an error message. A broken extraction almost never crashes anything. It just silently produces a confident, well-formatted, wrong answer — and the bill for that mistake doesn't show up on the extraction line. It shows up later, on the LLM line, disguised as "users retrying" or "hallucination rate." That's the trap. The cost didn't disappear when you picked the free parser. It just moved to the most expensive stage in the whole pipeline and hid there. Let's make this concrete instead of abstract. Say you're processing 1 million pages a month. API bill: $0/month But: