arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.26165cs.SEcs.AIcs.CL
收藏

工具模式压缩实现受限上下文预算下的智能体检索增强生成

Tool-Schema Compression Enables Agentic RAG Under Constrained Context Budgets

Independent Researcher(独立研究者)

Furkan Sakizli

AI总结:

针对智能体RAG系统中工具模式与检索上下文竞争资源的问题,提出工具模式压缩方法,在8K上下文预算下将平均精确匹配率提升20.5个百分点,并验证了压缩模式在超过800个工具时仍可运行。

摘要:

配备数十到数百个工具定义的语言模型的智能体RAG系统面临关键资源冲突:工具模式消耗了检索增强生成所需的相同上下文窗口。我们首次系统研究了这种工具-上下文权衡,评估了14个模型(涵盖1.5B-32B本地模型和一个前沿API模型),在三个上下文预算(8K、16K、32K)下使用28个工具定义进行了6,566次受控API调用。应用TSCG保守配置文件压缩(节省44-50%的模式令牌),我们观察到二元启用效应:在8K令牌时,JSON模式工具定义完全溢出上下文窗口,导致接近零的EM(平均2.6%),而压缩模式恢复了RAG功能,所有八个模型平均精确匹配提升20.5个百分点(六个表现出完全启用的模型平均提升24.7个百分点)。在32K(两种格式都适合)时,五个测试模型中的四个显示delta <= 1个百分点,确认该效应纯粹由预算驱动。在HotpotQA(50个多跳问题)上的外部验证显示,在相同溢出场景下EM提升48个百分点。前沿扩展测试表明,JSON模式在大约494个工具时溢出,而压缩模式在超过800个工具时仍可运行。我们的结果确立了工具模式压缩作为受限上下文部署中智能体RAG的必要基础设施层。所有代码、数据和检查点均已公开。

英文摘要:

Agentic RAG systems that equip language models with dozens to hundreds of tool definitions face a critical resource conflict: tool schemas consume the same context window needed for retrieval-augmented generation. We present the first systematic study of this tool-context trade-off, evaluating 14 models spanning 1.5B-32B local models plus one frontier API model across 6,566 controlled API calls at three context budgets (8K, 16K, 32K) with 28 tool definitions. Applying TSCG conservative-profile compression (44-50% schema token savings), we observe a binary enablement effect: at 8K tokens, JSON-schema tool definitions overflow the context window entirely, yielding near-zero EM (2.6% average), while compressed schemas restore RAG functionality with +20.5 pp average exact-match lift across all eight models (+24.7 pp among the six exhibiting full enablement). At 32K -- where both formats fit -- four of five tested models show delta <= 1 pp, confirming the effect is purely budget-driven. External validation on HotpotQA (50 multi-hop questions) shows +48 pp EM under the same overflow scenario. Frontier scaling tests demonstrate that JSON schemas overflow at ~494 tools while compressed schemas remain operational beyond 800 tools. Our results establish tool-schema compression as a necessary infrastructure layer for agentic RAG in constrained-context deployments. All code, data, and checkpoints are publicly available.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑