The solution is finding a way for models to recognise the absence of knowledge.
Ask HN: Is RAG the Future of LLMs?
31–40 of 108 posts
Re: Ask HN: Is RAG the Future of LLMs?
#32Both RAG and infinite contexts in their current states are hacks. Both waste compute because you have to re-encode things as text each time and RAG needs a lot of heuristics + a separate embedding model. Instead, it makes a lot more sense to pre-compute KV for each document, then compute values for each query. Only surfacing values when the attention score is high enough. The challenge here is to encode global positi…
Re: Ask HN: Is RAG the Future of LLMs?
#33From the video in this IBM post [0], I understand that it is a way for the LLM to check what its source and latest date of information is. Based on that, it could, in principle, say “I don’t know”, instead of “hallucinating” an answer. A RAG is a way to implement this feature for LLMs.
[0] https://research.ibm.com/blog/retrieval-augmented-generation...
Re: Ask HN: Is RAG the Future of LLMs?
#34It’s strange: most answers here assume the next gen models won’t be able to perform RAG on its own. IMO, it would be wise to assume the opposite - anything humans currently do to make models smarter will be built in.
You wouldn’t say a steering wheel is built into an engine. People just build cars with engines.
Re: Ask HN: Is RAG the Future of LLMs?
#35#1 motivation for RAG: you want to use the LLM to provide answers about a specific domain. You want to not depend on the LLM's "world knowledge" (what was in its training data), either because your domain knowledge is in a private corpus, or because your domain's knowledge has shifted since the LLM was trained. The latest connotation of RAG includes mixing in real-time data from tools or RPC calls. E.g. getting data…
One of these will remain true until every person has their own pet model which is fine-tuned, on keyup, on all public data and their own personal data. Still, something heinously parametric (like regional weather on some arbitrary date) I struggle to imagine fitting into a transformer.
Edit: I can imagine every user getting a LoRA.
Re: Ask HN: Is RAG the Future of LLMs?
#36#1 motivation for RAG: you want to use the LLM to provide answers about a specific domain. You want to not depend on the LLM's "world knowledge" (what was in its training data), either because your domain knowledge is in a private corpus, or because your domain's knowledge has shifted since the LLM was trained. The latest connotation of RAG includes mixing in real-time data from tools or RPC calls. E.g. getting data…
Among other things because it’s way too expensive and narrowing your scope cuts huge costs and isn’t hard to do at a high level
Re: Ask HN: Is RAG the Future of LLMs?
#37Re: Ask HN: Is RAG the Future of LLMs?
#38I believe RAG is a temporary hack until we figure out virtually infinite context. I think LLM context is going to be like cache levels. The first level is small but super fast (like working memory). The next level is larger but slower, and so on. RAG is basically a bad version of attention mechanisms. RAG is used to focus your attention on relevant documents. The problem is that RAG systems are not trained to minimiz…
Rag is not bad attention, rag is the user not knowing the context to give the LLM
Re: Ask HN: Is RAG the Future of LLMs?
#39For those of us who don’t know what RAG is (including myself), RAG stands for Retrieval Augmented Generation. From the video in this IBM post [0], I understand that it is a way for the LLM to check what its source and latest date of information is. Based on that, it could, in principle, say “I don’t know”, instead of “hallucinating” an answer. A RAG is a way to implement this feature for LLMs. [0] https://research.ib…
The art of implementing RAG is deciding what text should be pasted into the prompt in order to get the best possible results.
A popular way to implement RAG is using similarity search via vector search indexes against embeddings (which I explained at length here: https://simonwillison.net/2023/Oct/23/embeddings/). The idea is to find the content that is semantically most similar to the user's question (or the likely answer to their question) and include extracts from that in the prompt.
But you don't actually need vector indexes or embeddings at all to implement RAG.
Another approach is to take the user's question, extract some search terms from it (often by asking an LLM to invent some searches relating to the question), run those searches against a regular full-text search engine and then paste results from those searches back into the prompt.
Bing, Perplexity, Google Gemini are all examples of systems that use this trick.
Re: Ask HN: Is RAG the Future of LLMs?
#40It’s strange: most answers here assume the next gen models won’t be able to perform RAG on its own. IMO, it would be wise to assume the opposite - anything humans currently do to make models smarter will be built in.
Anything that can do RAG is, by definition, a system that wraps an LLM with additional code that performs the retrieval.
It's the difference between ChatGPT (software that wraps a model and can extra features such as tool usage, Code Interpreter, RAG lookup via Bing etc) and GPT-4 Turbo (a model).