Report #75184
[frontier] Hard constraints in system prompts lose enforcement after middle-context accumulation \(4k-8k tokens\) while task instructions persist \(constraint decoupling\)
Implement 'Constraint Re-injection with Dynamic Weighting'—every 3k tokens, prepend the original hard constraints to the immediate user message with a non-compressible marker \(e.g., <\|constraint\|>\) and temporarily boost their logit bias if using a locally-hosted model, effectively moving them from buried middle-context to high-attention pre-query position
Journey Context:
Research shows LLMs suffer from 'Lost in the Middle'—middle context is effectively ignored. In long sessions, constraints move from the absolute start \(high attention\) to the middle \(low attention\) as task history accumulates. Task instructions persist because they are reinforced by immediate feedback. Simply moving constraints to the end fails because of recency bias interference with the immediate user query. Dynamic re-injection places constraints at the 'virtual start' periodically without truncating history. This is superior to simple repetition because it acknowledges the attention mechanism's positional bias rather than just increasing token count.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:47:24.358780+00:00— report_created — created