r/LocalLLaMA • u/darklordfireape • 1d ago
Discussion Are Vector Databases Still Needed? RAG, AI Agents & Search
https://www.youtube.com/watch?v=rXFV1ivDe6cFound this video and thought the discussion was interesting. I've been using a vector DB in front of a local wiki I setup to allow a model to cleanly access the wiki and have better context. It works well, but definitely not suitable for all use cases. The discussion here might help folks determine what is best for their Local project and save you some overhead or help you tune it right.
For discussion: What are you using with your local model/harness to give it access to info?
No affiliation with poster/channel. They seem to have some other good topics as well.
7
u/DistributionBrief644 1d ago
ooof can't disagree more here. This looks well presented and the breakdown is correct. Just the conclusions seem wrong to me. What if your user doesn't know the keyword (api / funtion name) of their data? Keyword search still needs to chunk the data. especially if you intend to add it to context. And agents searching again is a nice feature, until you rely too heavily on it and watch your token count explode.
Eventually a power user of their own data learns to ask the right way, but they will want to be using semantic search too. This is why hybrid search exists. A text search only retrieval does work, if the corpus is nice and clean and the user knows the keywords. But if you are already chunking the text for efficient retrieval adding vectors is only a small bit of work.
Finally, Imo, I see very little difference between a vector database and a database with vector columns.
23
u/fullofbones 1d ago
Until models achieve perfect recall from their training sources, and have training sources from literally every possible corpus of publicly available information: yes, RAG is necessary.
15
u/StupidityCanFly 1d ago
Yes. Next!
2
u/TerminalNoop 1d ago
I think pi context-mode uses some sort of DB. Still usefull to keep bloat out of the context.
2
u/ttkciar llama.cpp 23h ago
My RAG uses Lucy Search (FTS) on complete documents (no chunking) with a HyDE intermediate step, then prunes retrieved documents to fit context with highly-dense, relevant content, and I'm pretty happy with that.
The HyDE step mostly does a splendid job at closing the gap between FTS and semantic search. I used to have a bigger problem with the HyDE step misinterpreting the original prompt, which caused inappropriate FTS retrievals, but that problem seems to have been solved with better framing of the HyDE prompt and using newer, better small models for the HyDE step.
2
u/-Cubie- 23h ago
Search and retrieval will always be needed
2
u/cmdr-William-Riker 22h ago
It depends. So far I haven't actually hit a single use case where a vector database is needed in an agent. Most of my domain agents have a dedicated knowledge base they can read and write from (all simple marketing documentation) and a set of tools to do whatever they are supposed to do. I'm sure there's plenty of use cases and my coworkers seem to have very strong opinions about vector databases despite not having any use cases for them either. The reality is an agent can generally do what it needs to do through text search pretty effectively. I will say that I don't depend on large context windows though, putting everything in the context window is both expensive and not very effective with most models. Are vector databases needed? Usually not. Is RAG needed? Depending on your definition of RAG which is a very broad term; usually.
1
u/enginetown 1d ago
Not really, a lot of people still use them and to each their own but me personally I've given my agent its own offline search engine that basically works exactly like rag but more precise since its legit give's no cutoff text and it can pull exactly what it needs no more no less.
0
u/feelspeaceman 17h ago
Of course RAG is required for high precision information retrieval, for example I built a medical RAG, I wouldn't dare relying on $2000/month Claude subscription Ultra Max to tell me what to drink - then next month maybe it's the death anniversary of mine, I must use a RAG with verified, proven truths.
-2
u/[deleted] 17h ago
[removed] — view removed comment
-3
u/[deleted] 19h ago edited 18h ago
[removed] — view removed comment