Hacker News new | ask | show | jobs
by goldenarm 22 days ago
Grep is the fastest tool for many things, but for production RAG it cannot search with meaning, different languages or typos like hybrid vector search can. And it won't scale on terabytes of documents across distributed servers if you want to say under 1000ms.
2 comments

all true for a single grep invocation, however a capable LLM can drive grep using similar terms (`grep (red|maroon|scarlet|crimson)`, moving the measure of similarity from embedding/indexing time to inference time. There's benefits to that.
> red|maroon|scarlet|crimson

still doesn't include typo'ed variants for any of these

but a good combination of prompt, harness and model will easily close that gap. a more advanced (but equivalent) form of grep could also offer fuzzy matching/levenshtein distance function to augment that.
It will, but it does so by burning tokens. I'm sure you've also seen the output of an overly eager grep by an LLM.

I think we're verging on the point where people will care more about the most token-efficient ways to do a task than the lowest human effort version. Humans are expensive, humans using half as many tokens are cheaper.

This sounds like AOT vs JIT weights.
AOT vs interpreted maybe?

Because JIT goes fast after a while, while an LLM prodding tools won't go faster.

If the data is this large then why not ask the llm to build a query
That's more-or-less what RAG is; a tool to surface relevant data so that AI can make informed decisions. Efficient retrieval is important so that AI doesn't need to ingest the whole corpus for each query.
My case:

With a very large dataset of totally unnormalized data, semantic folding is a silver bullet.

latency is often the reason, distilling interactions into significantly better retrieval is the second.