Ask HN: How are you doing RAG locally?
31–40 of 166 posts
Re: Ask HN: How are you doing RAG locally?
#32Re: Ask HN: How are you doing RAG locally?
#33If your data aren't too large, you can use faiss-cpu and pickle https://pypi.org/project/faiss-cpu/
If the total size of your data isn't loo large...?
Data being a plural gets me.
You might have small datums but a lot of kilobytes!
Re: Ask HN: How are you doing RAG locally?
#34Don't use a vector database for code, embeddings are slow and bad for code. Code likes bm25+trigram, that gets better results while keeping search responses snappy.
Shameless plug: https://github.com/jankovicsandras/plpgsql_bm25 BM25 search implemented in PL/pgSQL ( Unlicense / Public domain )
The repo includes also plpgsql_bm25rrf.sql : PL/pgSQL function for hybrid search ( plpgsql_bm25 + pgvector ) with Reciprocal Rank Fusion; and Jupyter notebook examples.
Re: Ask HN: How are you doing RAG locally?
#35[flagged]
Also I've got no idea what this product does, this is just a generic page of topical ai buzzwords
Don't tell me what it is, /show me why/ you built it. Then go back and keep that reasoning in, show me why I should care
Re: Ask HN: How are you doing RAG locally?
#36Question being: WHY would I be doing RAG locally?
Re: Ask HN: How are you doing RAG locally?
#37Re: Ask HN: How are you doing RAG locally?
#38TL;DR: - chunk files, index chunks - vector/hybrid search over the index - node app to handle requests (was the quickest to implement, LLMs understand OpenAPI well)
I wrote about it here: https://laurentcazanove.com/blog/obsidian-rag-api
Re: Ask HN: How are you doing RAG locally?
#39This took about one hour to set up and works very well.
(+) At least, I don't think this counts as RAG. I'm honestly a bit hazy on the definition. But there's no vectordb anyway.