4 ms·
> Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality. How do you know?
by naasking 3y ago
> Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality.
How do you know?
- mike_hearn 3y agoWell, RAG is a form of lookup operation from an external set of documents that tries to work around anterograde amnesia. Humans don't suffer from that condition unless something has gone badly wrong. We don't carry around sets of documents and constantly consult them because we forgot what we read 10 seconds ago. Instead we have instead short term memory (e.g. what was the last paragraph I just read), a sort of medium-term memory that can absorb lots of information (e.g. the contents of a textbook if you're studying a subject) but which will eventually be forgotten, and a general long term memory that is rarely forgotten (e.g. riding a bike, how to speak your mother tongue ....). In LLM terms the parameters are the long term memory, the activations whilst processing a prompt are the short term memory, but there's no medium term. This paper is about adding that sort of medium term memory, if I understood it correctly. RAG is quite the hack. All you start with is the question, but why should the documents you need for the answer be similar to the question? It can be true for some kinds of search-engine like queries, but it'll be false for others. And then the results are attempted to be stuffed into the short term memory, of course it doesn't fit so then RAG gets done at the paragraph level or whatever, at which point you may have lost vital context. It's just going to be a set of paragraphs that happen to resemble the question. And finally word vector similarity isn't necessarily useful and can easily hurt, e.g. France and Germany are considered close conceptually but if your question is about France then stuffing the context with stuff related to Germany is going to fail much harder than a classical keyword based search engine would. If you integrate memory with the attention mechanism then you can use "memories" captured at higher levels of abstraction and not just word-level documents, so it is potentially much more powerful.
- kristiandupont 3y agoI don't know, it actually feels quite similar to something that seems to happen in my head. In a certain context, my brain resurfaces a bunch of memories and thoughts of things that are similar, even if they are not necessarily valuable to the current situation. I am not saying that the how is equivalent, but the what certainly seems at least related.
- mike_hearn 3y agoYes but RAG isn't re-surfacing memories, it's re-surfacing documents i.e. the source of memories. That's what this new paper tackles: how do you resurface actual memories or the closest analogy at the neural architecture level.
- naasking 3y ago> Instead we have short term memory [...], a sort of medium-term memory that can absorb lots of information [...], and a general long term memory that is rarely forgotten This is basically folk psychology though, not necessarily representative of the actual mechanisms that are being used. This is a common mistake I see in comparisons of ML and neuroscience or psychology. ML is all about mechanistic models for things, where we know all the details. We simply don't have any such mechanistic models of how the brain works, all we have are speculative models and folk concepts, ie. how things seem to us not how they are. I'm just very skeptical that these are enough to be confident in claims like this not being how we actually do things in reality. For instance, the anteretrograde amnesia you describe certainly isn't a common feature of the brain as a whole, but can you really say that it isn't a feature of some parts of the brain responsible for cognition, and then some RAG-like mechanism isn't used to eliminate that problem to give the outward appearance of no amnesia?
- mike_hearn 3y agoSure it's just an analogy. We clearly don't have 3 distinct separate levels, it's more like one memory where recalling memories strengthens them (but can also change them). But whatever we have, it's clearly very different to an LLM. We don't even want to replicate the human mind exactly. If we did that what'd be the point? AI is useful exactly because it's not the same as how people work. I don't think RAG is a good analogy for how the brain works because RAG is about finding original concrete sources (like books), not about matching and recalling digested and abstracted thoughts inside the "mind" itself. The article does talk about this a bit at the beginning.
- naasking 3y ago> But whatever we have, it's clearly very different to an LLM. My only real quibble with your post is, again, that it seems different to an LLM. Current ML models are still multiple orders of magnitude away from being on the same order of complexity as the human brain, and scaling doesn't yet seem to have hit a limit (more a data limit). I just don't think we can draw such conclusions at this time.
- zby 3y ago> RAG is quite the hack. All you start with is the question, but why should the documents you need for the answer be similar to the question? I have always thought that a better RAG system would be to let the LLM use the search in the same way that a human would - think about good keywords and search the needed information iteratively until everything needed is retrieved. I have even wrote a proof of concept: https://github.com/zby/answerbot https://github.com/zby/answerbot and wrote a blog post (mostly) about that approach: https://zzbbyy.substack.com/p/design-principles-for-llm-based-systems https://zzbbyy.substack.com/p/design-principles-for-llm-base... But then I discovered that it is very hard to tell the LLM to both use its reasoning and the search - for example if I ask GPT-4 "What is the weight proportion of oxygen in water? Think step by step" it lays out a very good thought process that takes the facts that it knows about the chemical formula of water, the atomic weights of hydrogen and oxygen and does the math to arrive at the good answer. But if I just add wikipedia search functions to the llm call (https://github.com/zby/answerbot/blob/ea792fbc7a84c6683dc2f37a7880b726fff70558/react.py#L10 https://github.com/zby/answerbot/blob/ea792fbc7a84c6683dc2f3...) even without any additional prompting or examples in the prompt it starts searching and rather blindly - it stops any reasoning and tries to find the final answer in wikipedia instead of looking for the intermediate information - like the chemical formula, the atomic weights. I guess I'll find a workaround that problem with some clever prompting - but this difficulty surprised me.
- mike_hearn 3y agoI think it will have been fine-tuned to use functions if they exist, as for most use cases if you specify a function then it means the other end of the connection is an automated program and not a human, so returning pure text without a function call would be a failure.
- zby 3y agoMaybe - but why they forget all reasoning and try to jump directly to the answer?
- mike_hearn 3y ago