上下文工程的根定理
The Root Theorem of Context Engineering
AI总结:
本文提出上下文工程的根定理,通过形式化约束推导出信号-token比最大化原则,揭示了连续对话系统中信息质量退化与上下文窗口限制的本质规律。
摘要:
每维持一个大型语言模型的多轮对话系统都面临两个不可避免的约束:上下文窗口是有限的,且信息质量随累积体积而退化。我们正式将这些约束作为公理,并推导出一个单一的支配原则——上下文工程的根定理:在有界、失真的信道中最大化信噪比。从这一原则出发,我们推导出五个结论而无需额外假设:(1)一个降质函数F(P),其随注入的token体积单调递减,与窗口大小无关;(2)信号与token计数作为优化变量的独立性;(3)由保真度阈值触发的必要门机制,而非容量限制;(4)恒定持久性的不可避免性——积累、压缩、重写、舍弃——作为唯一能够持续维持理解的架构;(5)自指性质,即压缩机制在它所压缩的信道内部运作,需要一个外部验证门。我们证明了只附加工具的系统必然在有限时间内超过其有效窗口,检索增强生成解决搜索但不解决连续性,且该定理的约束结构通过独立推导从共享原则与生物记忆架构收敛。通过60多次会话的持续架构工程证明,展示了连续操作下的稳定内存足迹——将预测的发散性具体化。根定理确立了上下文工程作为信息论学科的正式基础,与提示工程在范围和方法上均不同。香农解决了点对点传输。上下文工程解决了连续性。
英文摘要:
Every system that maintains a large language model conversation beyond a single session faces two inescapable constraints: the context window is finite, and information quality degrades with accumulated volume. We formalize these constraints as axioms and derive a single governing principle -- the Root Theorem of Context Engineering: \emph{maximize signal-to-token ratio within bounded, lossy channels.} From this principle, we derive five consequences without additional assumptions: (1)~a quality function $F(P)$ that degrades monotonically with injected token volume, independent of window size; (2)~the independence of signal and token count as optimization variables; (3)~a necessary gate mechanism triggered by fidelity thresholds, not capacity limits; (4)~the inevitability of homeostatic persistence -- accumulate, compress, rewrite, shed -- as the only architecture that sustains understanding indefinitely; and (5)~the self-referential property that the compression mechanism operates inside the channel it compresses, requiring an external verification gate. We show that append-only systems necessarily exceed their effective window in finite time, that retrieval-augmented generation solves search but not continuity, and that the theorem's constraint structure converges with biological memory architecture through independent derivation from shared principles. Engineering proof is provided through a 60+-session persistent architecture demonstrating stable memory footprint under continuous operation -- the divergence prediction made concrete. The Root Theorem establishes context engineering as an information-theoretic discipline with formal foundations, distinct from prompt engineering in both scope and method. Shannon solved point-to-point transmission. Context engineering solves continuity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。