Live data from Hacker News

Ask HN: How are you doing RAG locally?

news.ycombinator.com

31–40 of 166 posts

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

#34

Don'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.

You can do hybrid search in Postgres.

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]

A new account, named after the thinking you're linking just looks like spam.

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?

#39
I'm lucky enough to have 95% of my docs in small markdown markdown files so I'm just... not (+). I'm using SQLite FTS5 (full text search) to build a normal search index and using that. Well, I already had the index so I just wired it up to my mastra agents. Each file has a short description field, so if a keyword search surfaces the doc they check the description and if it matches, load the whole doc.

This 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.

Post reply on HN