Ask HN: What are you using to parse PDFs for RAG?
91–100 of 102 posts
Re: Ask HN: What are you using to parse PDFs for RAG?
#92Earlier quoted context omitted.
How do you combine the outputs? Wouldn't there be data duplication between unstructured text and tables?
We just skip several of unstructured's categories, such as tables and images. We also do some deduplication post-ANN as we want to optimize for novelty as well as relevance. That being said, how are you planning to embed an image or a table to make it searchable? It sounds simple in theory, but how do you generate an actually good image summary (without spending huge amounts of money filling OpenAI's coffers for negl…
Re: Ask HN: What are you using to parse PDFs for RAG?
#93I convert the PDF to images and then parse the images with tesseract OCR. That’s been the most consistent approach to run locally.
Thanks.
Re: Ask HN: What are you using to parse PDFs for RAG?
#94Have you tried https://github.com/VikParuchuri/marker ?
For my use case, overall Marker seems to work pretty well - but it has issues with tables. Merged cells, misplaced headers, and so forth. I'm currently extracting Polish PDFs that are //not// scanned When compared to Azure Document Intelligence, Marker is really cheap when self-hosted (assuming you fall under the license requirements), but it does not produce high quality data. YMMV.
Re: Ask HN: What are you using to parse PDFs for RAG?
#95I am surprised nobody has mentioned it yet. If this is for anything slightly commercial related you are probably going to have the best luck using Textract/Document Intelligence/Document AI. Nothing else listed in the comments is as accurate, especially when trying to extract forms, tables and text. Multi-modal will take care of your the images. The combination of those two will get you a great representation of the…
I completely agree. Like the previous comment mentioned, I've explored this area over the past year, and in my tests, the offerings from Amazon, Google, and Microsoft were far superior to the open-source options, especially for long documents. It's unfortunate, but that's the way it is. OCR itself isn't the issue; most open-source models handle that adequately. The problem lies in the lack of comprehensive features:…
Re: Ask HN: What are you using to parse PDFs for RAG?
#96My use case is research papers. That means very clear text, combined with graphs of varying form and quality and finally occasional formulas. Two approaches I had most, but not full, success with are: 1) converting to image with pdf2image, then reading with pytesseract 2) throwing whole pdfs into pypdf 3) experimental multimodal models You can get more if you make content more predictable (if you know this part is go…
Re: Ask HN: What are you using to parse PDFs for RAG?
#97Earlier quoted context omitted.
it is open-source, the main platform is - Unstract https://github.com/Zipstack/unstract
Nope, LLMWhisperer to parse PDFs is called through an paid API.
Let me break it down!
As one of the commenters mentioned, he/she uses four different tools to parse PDFs to handle common parsing cases — tables, tables with images, OCR, layouts, handwriting, etc.
With LLMwhisperer, you don't need that.
Parsing is just a part of the problem. Engineers still need to figure out what LLM models work/are sufficient, reduce costs(tokens) and performance(parsing a million pages), and make the AI stack production-ready.
LLMWhisperer at least handles most use cases and moves out of your way fast.
Also, LLMwhisperer is not open-source; it's API is charged based on pages parsed.
Re: Ask HN: What are you using to parse PDFs for RAG?
#98Tables are a hard case for RAG, even if you parse them perfectly into Markdown, the LLMs still tend to struggle with interpreting them.
Re: Ask HN: What are you using to parse PDFs for RAG?
#99Earlier quoted context omitted.
For my use case, overall Marker seems to work pretty well - but it has issues with tables. Merged cells, misplaced headers, and so forth. I'm currently extracting Polish PDFs that are //not// scanned When compared to Azure Document Intelligence, Marker is really cheap when self-hosted (assuming you fall under the license requirements), but it does not produce high quality data. YMMV.
Working on improving tables soon (I'm the author of marker)
Re: Ask HN: What are you using to parse PDFs for RAG?
#100Earlier quoted context omitted.
I have great news I wish someone delivered to me when I was in your shoes - try "GROBID". It parses papers into objects with abstract/body/figures! It will help you out a great deal. It is designed for papers and can extract the text almost flawlessly, but also give information on graphs for separate processing. I have several years experience with academic text processing (including presentations) working with an Ac…
I have no idea how did I miss them last time I was looking around, unless they grew significantly over last half a year or so. I'll check it out when I get back to this project, thanks. I wish I was hiring, if that's what you're asking ;) Otherwise, if you have any ideas for processing formulas (even just for reading them out, but any extra steps towards expressing what they mean - ' 'sum divided by count' is 'mean'/…
Neither will probably help you with a "readable" formula system because in my experience the readers that do this for LaTeX or normal formula text have flaws any way (it's also slightly cultural and dependent on field of study). Maybe the best bet is a prompt to a vision model with "read this formula out loud in a digestible, understandable concise way".. though this may have issues with the recall accuracy.