by Oras on 12/4/2024, 8:02:21 AM
by jonathan-adly on 12/4/2024, 1:02:17 PM
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.
by Jet_Xu on 12/7/2024, 5:52:59 AM
Interesting discussion! While RAG is powerful for document retrieval, applying it to code repositories presents unique challenges that go beyond traditional RAG implementations. I've been working on a universal repository knowledge graph system, and found that the real complexity lies in handling cross-language semantic understanding and maintaining relationship context across different repo structures (mono/poly).
Has anyone successfully implemented a language-agnostic approach that can: 1. Capture implicit code relationships without heavy LLM dependency? 2. Scale efficiently for large monorepos while preserving fine-grained semantic links? 3. Handle cross-module dependencies and version evolution?
Current solutions like AST-based analysis + traditional embeddings seem to miss crucial semantic contexts. Curious about others' experiences with hybrid approaches combining static analysis and lightweight ML models.
by krawczstef on 12/4/2024, 5:36:48 AM
+1 for vanilla code without LangChain.
by dmezzetti on 12/4/2024, 12:56:22 PM
Thanks for sharing.
If you want notebooks that do some of this with local open models: https://github.com/neuml/txtai/tree/master/examples and here: https://gist.github.com/davidmezzetti
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.