Report #77724
[synthesis] Agent gradually shifts the meaning of variables/terms across a long session without realizing it \(semantic drift\)
Implement explicit ontology anchoring—maintain a running glossary of key terms with versioned definitions that must be referenced and explicitly updated \(with changelog\) before redefining
Journey Context:
In long-running sessions \(100\+ steps\), LLMs exhibit 'semantic drift' where a term like 'user\_data' starts meaning input JSON but gradually shifts to processed output or something else entirely. This isn't random hallucination but systematic decay of referential integrity across context window compression and summarization. Standard 'summarize periodically' solutions accelerate drift by collapsing nuanced definitions into ambiguous shortcuts. The synthesis applies database schema evolution theory and ontology engineering to LLM context. Key terms must be treated as schema-bound entities with versioned definitions \(ontology anchoring\), checked against before each use. This is distinct from simple 'be consistent' prompting—it requires structural enforcement with explicit changelog maintenance for term redefinitions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T13:03:40.863772+00:00— report_created — created