Live data from Hacker News

Ask HN: How are you doing RAG locally?

news.ycombinator.com

131–140 of 166 posts

Re: Ask HN: How are you doing RAG locally?

#131

More of a proof of concept to test out ideas, but here's my approach for local RAG, https://github.com/amscotti/local-LLM-with-RAG Using Ollama for the embeddings with “nomic-embed-text”, with LanceDB for the vector database. Recently updated it to use “agentic” RAG, but probably not fully needed for a small project.

Thank you for being the kind of person who explains what the abbreviation RAG stands for. I have been very confused reading this thread.

Re: Ask HN: How are you doing RAG locally?

#132
I made an obsidian extension that does semantic and hybrid (RRF with FTS) search with local models. I have done some knowledge graph and ontology experimentation around this, but nothing that I’d like to include yet.

This is specifically a “remembrance agent”, so it surfaces related atoms to what you’re writing rather than doing anything generative.

Extension: https://github.com/mmargenot/tezcat

Also available in community plugins.

Re: Ask HN: How are you doing RAG locally?

#133

Claude code / codex which internally uses ripgrep, and I'm unsure if it's using parallel mode. And, project specific static analyzers. Studies generally show when you do agentic retrieval w/ text search, that's pretty good. Adding vector retrieval and graph rag, so the typical parallel multi-retrieval followed by reranking, gives a bit of speedup and quality lift. That lines up with my local flow experience, where it…

Cursor uses a vector index, some details here: https://cursor.com/docs/context/semantic-search

Re: Ask HN: How are you doing RAG locally?

#134
post #87

For the retrieval stage, we have developed a highly efficient, CPU-only-friendly text embedding model: https://huggingface.co/MongoDB/mdbr-leaf-ir It ranks #1 on a bunch of leaderboards for models of its size. It can be used interchangeably with the model it has been distilled from ( https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1... ). You can see an example comparing semantic (i.e., embeddings-based) s…

How does performance (embedding speed and recall) compare to minish / model2vec static word embeddings?

Re: Ask HN: How are you doing RAG locally?

#135

More of a proof of concept to test out ideas, but here's my approach for local RAG, https://github.com/amscotti/local-LLM-with-RAG Using Ollama for the embeddings with “nomic-embed-text”, with LanceDB for the vector database. Recently updated it to use “agentic” RAG, but probably not fully needed for a small project.

Thank you for being the kind of person who explains what the abbreviation RAG stands for. I have been very confused reading this thread.

I feel this pain! It feels like in the world of LLMs there is a new acronym to learn every day!

For the curious RAG = Retrieval Augmented Generation. From wikipedia: RAG enables large language models (LLMs) to retrieve and incorporate new information from external data sources

Re: Ask HN: How are you doing RAG locally?

#136
Store fp16 vector blobs in sqlite. Load the vectors after filter queries into memory and do a matvec multiplication for similarity scores (this part will be fast if the library (e.g. numpy/torch) uses multithreading/blas/GPU). I will migrate this to the very based https://github.com/sqliteai/sqlite-vector when it starts to become a bottleneck. In my case the filters by other features (e.g. date, location) just subset a lot. All this is behind some interface that will allow me to switch out the backend.

Re: Ask HN: How are you doing RAG locally?

#137
post #128

Earlier quoted context omitted.

The download links for binaries 404 for me.

Will fix the links. Meanwhile here is the releases page. I develop on gitlab and mirror to github. Need to make that clear as well. https://gitlab.com/rhobimd-oss/shebe/-/releases

Ah, I tried the gitlab and the tarballs 404 for me there, sorry I should have been more specific in the original post!

fwiw this does look interesting.

Re: Ask HN: How are you doing RAG locally?

#140

Claude code / codex which internally uses ripgrep, and I'm unsure if it's using parallel mode. And, project specific static analyzers. Studies generally show when you do agentic retrieval w/ text search, that's pretty good. Adding vector retrieval and graph rag, so the typical parallel multi-retrieval followed by reranking, gives a bit of speedup and quality lift. That lines up with my local flow experience, where it…

Cursor uses a vector index, some details here: https://cursor.com/docs/context/semantic-search

Thanks!

Their discussion is super relevant to exactly what I wrote --

* They note speed benefits * The quality benefit they note is synonym search... which agentic text search can do: Agents can guess synonyms in the first shot for you, eg, `navigation` -> `nav|header|footer`, and they'll be iterating anyways

To truly do better, and not make the infra experience stink, it's real work. We do it on our product (louie.ai) and our service engagements, but real costs/benefits.

Post reply on HN