跳到正文
@omarsar0· @omarsar0 · X·· 2026-08-26AI 评分55
AI 导读

一项研究在 20 种生产智能体配置上测量了上下文压缩的损耗:Claude Code 在 Sonnet 4.6 上的 compact 一轮后仅保留 53% 的安全规则,五轮后降到 10%。研究团队提出 Knowledge Triage,按类型分类知识库每一行并各自套用保留策略,由三个确定性算子分别处理压缩、分区和检索,在各比例下多保留 2 到 4 倍安全规则,五轮召回率达 96%。

正文

If you keep safety rules or coding standards in an AGENTS.md or a CLAUDE.md, this one is worth your time.

(bookmark it)

Researchers measured what context compaction actually destroys across 20 production agent configurations.

A safety rule and an episodic log compete for the same tokens, and when the budget overflows both get summarized at the same rate. Only the rule needs exact wording to stay enforceable.

Claude Code compact on Sonnet 4.6 preserves 53% of safety rules after one round. After five rounds, it goes to 10%.

Their fix is Knowledge Triage, which classifies each line of the knowledge base by type and routes each type through its own retention policy. Three deterministic operators handle compaction, partitioning, and retrieval, preserving 2 to 4x more safety rules at every ratio with 96% recall over five rounds.

Paper: https://t.co/iVYbNrTRJX

Track more trending AI papers in our academy: https://t.co/1e8RZKs4uX

来源:@omarsar0 · x.com