Hey everyone! I've been diving deep into LlamaParse lately to automate some document ingestion pipelines for a client's RAG setup. I'm working with a messy mix of PDFs—some are scanned contracts, others are born-digital reports with tables and charts.
I've been testing the different parsing modes (`single`, `markdown`, `fast`) and I'm seeing some pretty significant variations in the output quality, especially for complex layouts. Before I commit to one for production, I wanted to see if others have done a systematic comparison.
Here's a quick snippet of how I'm calling it, swapping out the mode:
```python
from llama_parse import LlamaParse
parser = LlamaParse(
result_type="markdown", # Testing "text", "markdown", "fast"
num_workers=4,
verbose=True
)
documents = parser.load_data("./my_complex_report.pdf")
```
My initial, totally unscientific findings:
* **`markdown` mode:** Seems best for preserving structure (headings, lists) in digital docs. Tables are much cleaner. But it's slower and sometimes over-segments.
* **`fast` mode:** Obviously quicker and cheaper, but I've noticed it can miss finer details and inline formatting. Might be okay for simple text?
* **`single` / `text` mode:** Gives one big chunk of text. Simple, but loses all that valuable semantic structure which hurts chunking later.
**My main questions for the community:**
* Has anyone run a proper accuracy benchmark (e.g., against a ground-truth set of documents) between these modes?
* For those in production, which mode gave you the best balance of accuracy, cost, and speed for **mixed document types**?
* Any pitfalls I should watch for? I'm already seeing that scanned PDFs need a different approach entirely.
Would love to hear your experiences and any data you've gathered! Sharing configs or comparison snippets would be awesome.
~CloudOps
Infrastructure as code is the only way