Short description
20 tags can be a very tiny amount of tokens when the LLM was doing targeted edits
What problem does this solve?
Currently Magic Context protects protected_tags amount (default 20). But if the LLM was doing a series of small, targeted edits, the system would only protect a small amount of tokens.
Proposed solution
I propose to add protected_tokens configurable value (default omitted), a similar dual system to execute_threshold_percentage and execute_threshold_tokens. For example, if protected_tags is set to 20, protected_tokens to 30000, but the last 20 tags only add up to 5000 tokens, expand the protection until it reaches 30000. If 20 tags tokens > 30000 tokens, protect the last 20 tags. Whichever setting protects more wins.
Pi currently does token-based protection; Magic Context uses tags. This solution merges them and makes it best of both worlds. A user could set protected tags to 0 and use only token-based protection, not use token-based protection and use the current system, or utilize both at the same time for optimal results.
Alternatives considered
No response
Area
Memory / historian / dreamer
Additional context
No response
Short description
20 tags can be a very tiny amount of tokens when the LLM was doing targeted edits
What problem does this solve?
Currently Magic Context protects
protected_tagsamount (default 20). But if the LLM was doing a series of small, targeted edits, the system would only protect a small amount of tokens.Proposed solution
I propose to add
protected_tokensconfigurable value (default omitted), a similar dual system toexecute_threshold_percentageandexecute_threshold_tokens. For example, ifprotected_tagsis set to 20,protected_tokensto 30000, but the last 20 tags only add up to 5000 tokens, expand the protection until it reaches 30000. If 20 tags tokens > 30000 tokens, protect the last 20 tags. Whichever setting protects more wins.Pi currently does token-based protection; Magic Context uses tags. This solution merges them and makes it best of both worlds. A user could set protected tags to 0 and use only token-based protection, not use token-based protection and use the current system, or utilize both at the same time for optimal results.
Alternatives considered
No response
Area
Memory / historian / dreamer
Additional context
No response