Live data from Hacker News

Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

github.com

11–20 of 29 posts

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#11
post #9
post #6

One of the challenges I have with RAG is excluding table of contents, headers/footers and appendices from PDFs. Is there a tool/technique to achieve this? I’m aware that I can use LLMs to do so, or read all pages and find identical text (header/footer), but I want to keep the page number as part of the metadata to ensure better citation on retrieval.

This might help you: https://github.com/langchain-ai/langchain/blob/master/cookbo...

Thank you, this is a mix of OCR and LLM, I was thinking if there might be a library to avoid using that.

A better approach will be using Textract as it maintains the flow, such as if you have a table going across multiple pages.

Btw, tesseract is not that good in getting accurate data from tables. Use it with caution especially in financial context.

I have made an open source tool to show missing data from tesseract and easy ocr https://github.com/orasik/parsevision/

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#12

Earlier quoted context omitted.

I haven't used it in a year, but my experience was it frequently broke in all sorts of ways. I have since avoided it like the plague.

I hear you. Had the same experience. It's matured a lot since then though. Got back to it a few weeks ago and it feels surprisingly stable.

Does it still have the "abstraction hell" issue when trying to work with it for custom, non out-of-the-box use cases?

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#14
post #6

One of the challenges I have with RAG is excluding table of contents, headers/footers and appendices from PDFs. Is there a tool/technique to achieve this? I’m aware that I can use LLMs to do so, or read all pages and find identical text (header/footer), but I want to keep the page number as part of the metadata to ensure better citation on retrieval.

I would check out vision models as a technique to go around OCR errors.

ColPali is the standard implementation & SOTA. Much better than OCR. We maintain a ready to go retrieval API that implements this: https://github.com/tjmlabs/ColiVara

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#15
I would strongly advise against people learning based on LangChain.

It is abstraction hell, and will set you back thousands of engineers hours the moment you want to do something differently.

RAG is actually very simple thing to do; just too much VC money in the space & complexity merchants.

Best way to learn is outside of notebooks (the hard parts of RAG is all around the actual product), and use as little frameworks as possible.

My preferred stack is a FastAPI/numpy/redis. Simple as pie. You can swap redis for pgVector/Postgres when ready for the next complexity step.

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#16
post #6

One of the challenges I have with RAG is excluding table of contents, headers/footers and appendices from PDFs. Is there a tool/technique to achieve this? I’m aware that I can use LLMs to do so, or read all pages and find identical text (header/footer), but I want to keep the page number as part of the metadata to ensure better citation on retrieval.

You’ll need other heuristics for ToC and indices but headers/footers are easy to detect via n-gram deduplication. You’ll want to figure out some rolling logic to handle chapter changes though.

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#18

I would strongly advise against people learning based on LangChain. It is abstraction hell, and will set you back thousands of engineers hours the moment you want to do something differently. RAG is actually very simple thing to do; just too much VC money in the space & complexity merchants. Best way to learn is outside of notebooks (the hard parts of RAG is all around the actual product), and use as little framework…

Those were exactly my thoughts.. however I haven’t been able to find much material on how to implement this without relying on LangChain.. do you know of any beginners material I could use to fill my gaps?

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#19
post #10

Earlier quoted context omitted.

I hear you. Had the same experience. It's matured a lot since then though. Got back to it a few weeks ago and it feels surprisingly stable.

it's much more stable now.

Does it still put you in dependency hell though, where you can't add new packages without causing tons of version conflicts?

Re: Show HN: Open-Source Colab Notebooks to Implement Advanced RAG Techniques

#20
post #18

I would strongly advise against people learning based on LangChain. It is abstraction hell, and will set you back thousands of engineers hours the moment you want to do something differently. RAG is actually very simple thing to do; just too much VC money in the space & complexity merchants. Best way to learn is outside of notebooks (the hard parts of RAG is all around the actual product), and use as little framework…

Those were exactly my thoughts.. however I haven’t been able to find much material on how to implement this without relying on LangChain.. do you know of any beginners material I could use to fill my gaps?

I will do it - you are right. Lots of materials in the space is basically people selling their complex tools w/ learning as a lower priority
Post reply on HN