Skip to content

Proposals: versioning for responses in persistent multi-turn sessions and an option for a self-modifying system prompt #91

@TheGordon

Description

@TheGordon

Versioning for responses in persistent multi-turn sessions

I looked into #40 and it seems like there's no implementation for preserving/versioning final responses. This feels like an critical oversight for agentic turns as it means the RLM can't reference its past responses to retrieve important context. Do you think it would be beneficial to add a versioned responses to SupportsPersistence protocol such as final_0, final_1, ... ?

Option for a self-modifying system prompt for multi-turn sessions

This is an unusual feature, but it could address the concern for an RLM's growing response time due to a growing context length within a multi-turn session. If you allow the RLM to edit a length n portion of its system prompt (n << context window length), you could allow it to introspect/optimize its own behavior across turns. Functionally, it would serve as a dynamic compaction/guidelines of previous context, which could help smooth session flow and scalability for multi-turns.
The pseudo-code (based on the paper) for the self-modifying system prompt as SelfPrompt would probably look something like:

if state[Final] is set then
    if state[SelfPrompt] is set then
        SystemPrompt ← BaseSystemPrompt ∥ state[SelfPrompt] 
    return state[Final]

Or perhaps an interleaved self-prompting process between intra-completion turns/recursion subagents like:

while True do
    ...
    if state[SelfPrompt] is set then
        SystemPrompt ← BaseSystemPrompt ∥ state[SelfPrompt] 
    if state[Final] is set then
        return state[Final]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions