arXiv:2601.11687cs.SEcs.AI2026-01

用语义缓存和意图驱动优化,让自然语言转代码更准更快

Semantic Caching and Intent-Driven Context Optimization for Multi-Agent Natural Language to Code Systems

  • 通过语义缓存与等价检测,缓存命中率达67%
  • 双阈值机制分离精准匹配与参考生成,提升效率
  • 按表信息过滤上下文,降低40%-60%令牌消耗

我们提出一种面向结构化数据查询的生产级多智能体系统,将自然语言转化为可执行的Python代码。不同于依赖昂贵前沿模型的系统,本方法通过三项关键创新实现高精度与低成本:(1) 基于大模型的语义缓存系统,包含等价性检测与结构化适配提示,在生产查询上实现67%的缓存命中率;(2) 双阈值决策机制,将精确匹配检索与参考引导生成分离;(3) 意图驱动的动态提示组装系统,通过表感知上下文过滤,减少40%-60%的令牌消耗。该系统已在企业库存管理场景中上线,处理超10,000条查询,平均延迟8.2秒,语义准确率达94.3%。本文详述架构设计,展示生产部署实证结果,并讨论大规模部署大模型分析系统的实际考量。

原文摘要 · Abstract (English)

We present a production-optimized multi-agent system designed to translate natural language queries into executable Python code for structured data analytics. Unlike systems that rely on expensive frontier models, our approach achieves high accuracy and cost efficiency through three key innovations: (1) a semantic caching system with LLM-based equivalence detection and structured adaptation hints that provides cache hit rates of 67% on production queries; (2) a dual-threshold decision mechanism that separates exact-match retrieval from reference-guided generation; and (3) an intent-driven dynamic prompt assembly system that reduces token consumption by 40-60% through table-aware context filtering. The system has been deployed in production for enterprise inventory management, processing over 10,000 queries with an average latency of 8.2 seconds and 94.3% semantic accuracy. We describe the architecture, present empirical results from production deployment, and discuss practical considerations for deploying LLM-based analytics systems at scale.

自然语言转代码多智能体语义缓存推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。