用结构化意图分解提升智能体缓存准确率,大幅降低大模型调用成本。
Why Agent Caching Fails and How to Fix It: Structured Intent Canonicalization with Few-Shot Learning
- 提出W5H2框架,通过结构化分解意图提升缓存键一致性
- 在MASSIVE数据集上达到91.1%准确率,响应时间仅2ms
- 适合需要低成本高效率的个性化智能体系统开发者
个人AI代理因重复调用大模型而产生高昂成本。现有缓存方法失效:GPTCache在真实基准上准确率为37.9%;APC准确率为0-12%。根本原因在于优化目标错误——缓存有效性依赖键的一致性与精确性,而非分类准确率。我们发现缓存键评估等价于聚类评估,并在包含8,682个样本的MASSIVE、BANKING77、CLINC150和新构建的NyayaBench v2(8,514条多语言交互数据,528个意图,20类W5H2属性,63种语言)上应用V-measure分解进行分离分析。提出W5H2结构化意图分解框架,结合SetFit使用每类8个样本,实现91.1%±1.7%准确率,耗时约2ms——相较GPTCache的37.9%与3,447ms的200亿参数大模型的68.8%表现显著更优。在20类的NyayaBench v2上,跨30语言的SetFit达55.3%准确率。五级级联处理85%请求本地完成,预估可降低97.5%成本。通过九种边界族的RCPS提供风险可控的选择性预测保障。
原文摘要 · Abstract (English)
Personal AI agents incur substantial cost via repeated LLM calls. We show existing caching methods fail: GPTCache achieves 37.9% accuracy on real benchmarks; APC achieves 0-12%. The root cause is optimizing for the wrong property -- cache effectiveness requires key consistency and precision, not classification accuracy. We observe cache-key evaluation reduces to clustering evaluation and apply V-measure decomposition to separate these on n=8,682 points across MASSIVE, BANKING77, CLINC150, and NyayaBench v2, our new 8,514-entry multilingual agentic dataset (528 intents, 20 W5H2 classes, 63 languages). We introduce W5H2, a structured intent decomposition framework. Using SetFit with 8 examples per class, W5H2 achieves 91.1%+/-1.7% on MASSIVE in ~2ms -- vs 37.9% for GPTCache and 68.8% for a 20B-parameter LLM at 3,447ms. On NyayaBench v2 (20 classes), SetFit achieves 55.3%, with cross-lingual transfer across 30 languages. Our five-tier cascade handles 85% of interactions locally, projecting 97.5% cost reduction. We provide risk-controlled selective prediction guarantees via RCPS with nine bound families.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。