I've used the giant context in Gemini to dump a code base and say: describe the major data structures and data flows.
Things like that, overview documents, work great. It's amazing for orienting in an unfamiliar codebase.
Too much context can still confuse the LLMs in this situation, but they may be somewhat more resilient.
Many conflicting ideas are harder for models to follow than one large unified idea.
So we may have got to a local maximum regarding code helpers with LLMs and we'll have to wait for some breakthrough in the AI field before we get something better.
But the good thing is that DeepSeek proved those breakthroughs are going to happen one way or another, fast.
In one dialog, some 30k tokens later, Claude requested the contents of package.json... which was in the context window already - the whole file!
The strange thing was that after I said so, without re-inserting, Claude successfully read it from context to fill the gap in what it was trying to do.
It's as if a synopsis of what exists in-context delivered with each message would help. But that feels weird!
Most chat is just a long running prompt. LLMs have zero actual memory. You just keep feeding it history.
Maybe I misunderstood what you're saying but what you're describing is some kind of 2nd model that condenses that history and that gets fed; this has been done.
Really, what you probably need is another model managing the heap and the stack of the history and brining forward the current context.
But that's easy to say because we are humans.
I didn't 'fix' the problem by re-inserting the package.json. I just gave a reminder that it that it was already in context.
"I could confirm this root cause if I could see the contents of package.json".
"You can see it."
"Whoops, yes. Package x needs to bump from n to n+1."
The point being, even info inside the current context can actively be overlooked unless it is specifically referenced.
Imagine dumping the entire text of a large code repository in front of a human programmer, and asking them to fix a bug. Human programmers use IDEs, search through the code, flip back and forth between different functions, etc. Maybe with a better interface that the LLM could interact with, it would perform better.
Something: Filename: index.js Content: | Class Example...
Another item would be some kind of hyperlinking. Maybe you could load in a hrefs but there might be a more semantically popular way, but the data feeding these AIs just aren't constructed like that.
- Summarize topics (with references to shows) - Find quotes specific to a topic (again with references)
Anything above 32k tokens fails to have acceptable recall, across GPT-4o, Sonnet, and Google's Gemini Flash 1.5 and 2.0.
I suppose it kind of makes sense, given how large context windows are implemented via things like sparse attention etc.
That's a product choice from openAI, not a problem with LLM's long context window input capability.
Developing aider, I've seen this problem with gpt-4o, Sonnet, DeepSeek, etc. Many aider users report this too. It's perhaps the #1 problem users have, so I created a dedicated help page [0].
Very large context may be useful for certain tasks with lots of "low value" context. But for coding, it seems to lure users into a problematic regime.
[0] https://aider.chat/docs/troubleshooting/edit-errors.html#don...