You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I found myself repeatedly thinking about the trade-offs of the compaction / auto-compaction concept for context management that is currently prevalent in most harnesses. It seems to me that it is backward-looking rather than forward looking. It summarizes the work that was done, rather than focusing on what context is needed for the work that is planned next. In long-running agentic tasks where the model follows a stable plan, we should be able to do better.
I implemented a proof-of-concept that attempts to empower the model to curate its own context by using reflection and autonomous tool calls to filter no longer needed context blocks from the context. Since pi has been my favorite harness for every day work for many weeks, and I have collected a generous set of extensions, it was an obvious choice to use it as a base for my proof of concept. For more details on the idea and the implementation, see the readme files in the fork.
I want to make some things clear:
This is an experiment. A proof of concept. It is not intended for daily or productive work. It is unfinished (see future work section in the README). I do not currently target inclusion of the feature into pi proper. It remains to be evaluated if the idea has merit at all, and if current models can handle this kind of meta-cognitive task. There are also several adjacent questions raised, like KV-cache related tradeoffs with frequent granular pruning, which I don't have an answer for at the moment. The readme in the fork repo does contain a link to a document where I am daily updating my evaluation results so far.
So, give it a try if you are interested and experimentally-minded. I am certainly interested in your feedback. But don't complain if it doesn't work, you have been warned.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
Recently, I found myself repeatedly thinking about the trade-offs of the compaction / auto-compaction concept for context management that is currently prevalent in most harnesses. It seems to me that it is backward-looking rather than forward looking. It summarizes the work that was done, rather than focusing on what context is needed for the work that is planned next. In long-running agentic tasks where the model follows a stable plan, we should be able to do better.
I implemented a proof-of-concept that attempts to empower the model to curate its own context by using reflection and autonomous tool calls to filter no longer needed context blocks from the context. Since pi has been my favorite harness for every day work for many weeks, and I have collected a generous set of extensions, it was an obvious choice to use it as a base for my proof of concept. For more details on the idea and the implementation, see the readme files in the fork.
If anyone is interested to take a look, the fork is here: https://github.com/bendelec/reflective-pi
I am open to all kinds of feedback.
I want to make some things clear:
This is an experiment. A proof of concept. It is not intended for daily or productive work. It is unfinished (see future work section in the README). I do not currently target inclusion of the feature into pi proper. It remains to be evaluated if the idea has merit at all, and if current models can handle this kind of meta-cognitive task. There are also several adjacent questions raised, like KV-cache related tradeoffs with frequent granular pruning, which I don't have an answer for at the moment. The readme in the fork repo does contain a link to a document where I am daily updating my evaluation results so far.
So, give it a try if you are interested and experimentally-minded. I am certainly interested in your feedback. But don't complain if it doesn't work, you have been warned.
Christian
All reactions