News for hackers. Stuff that matters.
Re:Show HN: Open-source Rule-based PDF parser for RAG by guidedlight on Wednesday January 24, 2024 @01:51AM (#39114407)
How does this differ from Azure Document Intelligence, or are they effectively the same thing?
Re:Show HN: Open-source Rule-based PDF parser for RAG by StrauXX on Wednesday January 24, 2024 @02:29AM (#39114599)
Last I used it, Azure Document Intelligence wasn't all that smart about choosing split points. This seems to implement better heuristics.
Re:Show HN: Open-source Rule-based PDF parser for RAG by infecto on Wednesday January 24, 2024 @08:04AM (#39116778)
What is a split point? I use Textract a lot and from my testing, always beats out any of the open source tooling to extract information. That could also be highly dependent on the document format.
Re:Show HN: Open-source Rule-based PDF parser for RAG by batch12 on Wednesday January 24, 2024 @08:12AM (#39116853)
I think it is a reference to the place a larger document is split into chunks for calculating embeddings and storage.
Re:Show HN: Open-source Rule-based PDF parser for RAG by asukla on Wednesday January 24, 2024 @09:38AM (#39117807)
I wrote about split points and the need for including section hierarchy in this post: https://ambikasukla.substack.com/p/efficient-rag-with-docume...

All this is automated in the llmsherpa parser https://github.com/nlmatics/llmsherpa which you can use as an API over this library.

Re:Show HN: Open-source Rule-based PDF parser for RAG by cdolan on Wednesday January 24, 2024 @07:46AM (#39116617)
I am also curious about this. ADI is reliable but does have edge case issues on malformed PDF

I fear tesseract OCR is a potential limitation though. I’ve seen it make so many mistakes

Re:Show HN: Open-source Rule-based PDF parser for RAG by asukla on Wednesday January 24, 2024 @09:07AM (#39117484)
No, we are not doing the same thing. Most cloud parsers use a vision model and they are lot slower, expensive and you need to write code on the top of these to extract good chunks.

You can use llmsherpa library - https://github.com/nlmatics/llmsherpa with this server to get nice layout friendly chunks for your LLM/RAG project.

Re:Show HN: Open-source Rule-based PDF parser for RAG by ramoz on Wednesday January 24, 2024 @09:09AM (#39117508)
There’s no ocr or ai involved here (other than the standard fallback).

What this library, and something like fitz/pymupdf, allow you to do is extract the text straight from the pdf, using rules about how to parse & structure it. (Most modern pdfs you can extract text without ocr).

- much cheaper obviously but doesn’t scale (across dynamic layouts) well so you likely are using this when you can configure around a standard structure. I have found rule-based text extraction to work fairly dynamically though for things like scientific pdfs.