Context surrogacy/decreasing boilerplate #2825
kfsone
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Especially once you are starting to work with longer source files etc, it can be very difficult to do anything with Roo because the context is a conversation rather than a discourse. There's no summation, no redaction.
In one example, I watched as Roo consumed a dictionary fragment, noticed it was incomplete and tried reading it again. On the 3rd read, it must have passed the context length, because the model dropped the original task and instead set to work completing the missing 99% of the dictionary.
There are numerous situations where, even without MCP, Roo ought to be able to have a way to redact: the most common, that I see, is when it reads a file, make several changes to it, and then reads the file again.
Take the following exchange:
the AI has added ~50 tokens to the context already, none of which have any real value. The user might - possibly - have avoided this by @ing foo.py in their request. This may seem like small waste but lets look at how this progresses.
If the AI nails it on this first try and you have nothing else to do, this is ok.
However, the way LLMs are extending their context windows means that most models will not know when to stop. Further, models are being biased towards a scattershot/"spew first, ask permission later" strategy.
For example, in the above case the model immediately started making changes without asking the user if there was a reason not to collect more than one shell at a time.
So, now the user responds, and I hope showing it this way drives home the issue and makes the need for surrogacy/compaction/redaction/resolution critical:
... Proposal ...
Instead of treating the context as linear text, Roo needs to tag/label/attribute portions of it; it needs to provide the AI with redactable tools, and perhaps the way to do this is to have the model take scoped actions.
Leaving this in the context exposes Roo to the risk of LLM-attention landing on things like "file not found" and "subdir1" without the assets/ prefix. It becomes increasingly likely as context progresses that it will use "subdir1" without "assets/" because it was mentioned at least twice.
The majority of this text is non-constructive: If you ran the same preceeding context with a different seed, chances are the model would do the right thing first time around.
The "TBD" here is where we need to introduce something new: a markup for the model to track that it is starting a subtask/activity, a way for it to indicate that follow-on sections are retries/doovers while temporarily leaving the intermediate tokens in the context, and finally a way for it to conclude the activity and discard the sub-activity token overhead entirely.
At this point, Roo can eliminate a bunch of deadweight:
Beta Was this translation helpful? Give feedback.
All reactions