Live data from Hacker News

Infinite Context LLMs: Going Beyond RAG with Extended Minds

blog.normalcomputing.ai

11–20 of 43 posts

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#12
This is great. Ive been using GPT based tools extensively for my side project which I have a demo for(http://drophere.co see code at https://github.com/itissid/drop_webdemo) one thing I think that is missing is a couple of agents that can pick out the right context from my code depending on what needs to get done. Let me explain:

They are a couple of patterns that I used to design chunks of the web app: One is to do a high level design brainstorming with an agent, write some pseudo code. Which is fine with regular GPTs with limited context lengths.

As I got into the implementation details, there are several sub components which themselves require a dedicated agent because they become 1 week sprints to complete with 100's of loc. But I need them to pull context from other agents of the project, which is missing.,

This latter part could be done by along the lines of this research.

I think a couple of projects are trying to do this using traditional RAG like GPTEngineer can benefit from this.

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#13

The blog post format is so much nicer than a PDF paper! More seriously, this does feel like a real advance. Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality. I've been wondering for the last year whether it's possible to extend the attention mechanism to more naturally connect to a bigger set of per-session weights or activations. The moment yo…

> 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?

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#14

The blog post format is so much nicer than a PDF paper! More seriously, this does feel like a real advance. Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality. I've been wondering for the last year whether it's possible to extend the attention mechanism to more naturally connect to a bigger set of per-session weights or activations. The moment yo…

> 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?

Well, 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.

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#16
> Finetuning seeks to extend the length of the context window itself.

Does it? I'd thought fine-tuning was more like transfer learning, adding highly specific data to the training set (e.g. your internal codebase) rather than actually modifying the architecture.

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#17

The blog post format is so much nicer than a PDF paper! More seriously, this does feel like a real advance. Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality. I've been wondering for the last year whether it's possible to extend the attention mechanism to more naturally connect to a bigger set of per-session weights or activations. The moment yo…

I've always considered the human ability to abstract things away - the capacity to say "this is like that" - as a kind of data compression mechanism. Instead of memorizing everything, we remember the first few things of that kind that we encountered, and then the differences between them and everything else that's sort of like them. The core memories being the root, and the differences being steps along the path of a trie -- both space and time efficient in storage and retrieval.

I think the addition of medium-term memory to an LLM system would mean an individualization / giving that system instance the means to become unique from its common starting point. We can already consider the context window as a short-term memory of sorts, but it's lobotomized every time. Having a persistent medium-term memory window (eg, via collecting summaries / tries of abstraction "keyframes" + diffs) would begin to pose some serious questions. If a mechanism was further developed to persist these medium-term data summaries into "long term memory" (adjusting weights and parameters), we would have continuous learning.

It's pretty wild stuff.

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#18

The most important bits about what they do to make this happen: > In addition to the causal self-attention integral to transformers, we also allow each query token to attend to a fixed number of “external memories”. These memories are stored in a non-differentiable cache. The choice of which memories to attend to is made using cosine similarity within each decoder layer and attention head. [...] > We create our exter…

Wouldn't it need to be retrained with that external memory?

Re: Infinite Context LLMs: Going Beyond RAG with Extended Minds

#20

The blog post format is so much nicer than a PDF paper! More seriously, this does feel like a real advance. Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality. I've been wondering for the last year whether it's possible to extend the attention mechanism to more naturally connect to a bigger set of per-session weights or activations. The moment yo…

> Vector search+context stuffing (RAG) is clearly a hack that doesn't resemble how we actually think or do things in reality.

Its actually a very close model of how people use external data sources to supplement thought in reality. Its a hack, but it is very much the same hack (indexing external data, and looking up and stuffing some in our brain temporarily at need) that humans have used forever (with a novel indexing method.)

Its not (intentionally, at least) a model of anything that happens inside the human brain, but what humans do in reality extends beyond what happens inside the brain.

Post reply on HN