KV 房租:前缀缓存命中率实验室
Prompt 块排序沙盘(append-only 纪律)· 盈亏平衡 × TTL(闭式解 + 蒙特卡洛双路互验)· 块对齐浪费锯齿 × 各家最小前缀门槛 · 路由器的反噬
Manus 官方博客原文:「the KV-cache hit rate is the single most important metric for a production-stage AI agent」,并给出 agent 场景 input:output ≈ 100:1。各家 read / write / TTL / 最小前缀四件套分栏并列,未回源的一律留白。
📄 Manus 官方博客(2025-07-18)原文:“If I had to choose just one metric, I’d argue that the KV-cache hit rate is the single most important metric for a production-stage AI agent.” —— 不是准确率,不是延迟,是一个缓存指标。原因也写在原文里:“In Manus, for example, the average input-to-output token ratio is around 100:1.”。 agent 每轮把整段上下文重发一遍,而「重读同一个前缀」的定价只有全新输入的 0.025×–0.1×。上下文窗口不是免费存储,是按 published rate card 付租金的记忆。
Prompt 块顺序
拖动 ↑↓ 改变顺序。命中长度逐块真算:稳定块全额计入,追加块只损失本轮新增,易变块直接断在这里
人设与规则,逐 byte 不变
+10.0k
计入前缀
工具 JSON Schema,逐 byte 不变
+2.5k
计入前缀
检索到的文档片段,本会话内不变
+2.0k
计入前缀
手写示例,逐 byte 不变
+1.5k
计入前缀