用强化学习训练能真实操作Excel的AI助手,效果比传统方法提升一倍以上。
Spreadsheet-RL: Advancing Large Language Model Agents on Realistic Spreadsheet Tasks via Reinforcement Learning

- 通过强化学习在真实Excel环境中训练专用智能体,实现多步复杂任务
- 在通用和领域数据集上,准确率从12%提升至23.4%,最高达17.2%
- 适合想自动化财务、供应链等办公场景的研究者与开发者
电子表格系统(如Microsoft Excel、Google Sheets)在现代数据工作流中占据核心地位。随着AI智能体能力增强,构建基于AI的电子表格代理成为重要方向。现有方法依赖通用大模型的特殊提示,仅适用于简单操作,在真实复杂多步骤任务中表现不佳。本文提出Spreadsheet-RL,一个面向真实Excel环境的强化学习微调框架。该框架包含自动化收集在线论坛中起始-目标表格对的流水线,以及金融、供应链等领域的专用评估任务,形成新的Domain-Spreadsheet基准数据集。同时设计了Spreadsheet Gym环境,通过Python沙箱暴露完整Excel功能,并配备完善工具集与精细的工具路由规则,支持多轮强化学习。实验表明,Spreadsheet-RL显著提升智能体性能:Qwen3-4B-Thinking-2507在SpreadsheetBench上的Pass@1从12.0%提升至23.4%,在自建Domain-Spreadsheet数据集上从8.4%提升至17.2%。结果验证了该框架在真实场景中的泛化潜力与应用前景,为推进大模型与数据界面交互提供了新路径。
原文摘要 · Abstract (English)
Spreadsheet systems (e.g., Microsoft Excel, Google Sheets) play a central role in modern data-centric workflows. As AI agents grow increasingly capable of automating complex tasks, such as controlling computers and generating presentations, building an AI-driven spreadsheet agent has emerged as a promising research direction. Most existing spreadsheet agents rely on specialized prompting over general-purpose LLMs; while this design has potentials on simple spreadsheet operations, it struggles to manage the complex, multi-step workflows typical of real-world applications. We introduce Spreadsheet-RL, a reinforcement learning (RL) fine-tuning framework designed to train specialized spreadsheet agents within a realistic Microsoft Excel environment. Spreadsheet-RL features an automated pipeline for scalable collection of paired start-goal spreadsheets from online forums, as well as domain-specific evaluation tasks in areas such as finance and supply chain management, which we compile into the new Domain-Spreadsheet benchmark dataset. It also includes a Spreadsheet Gym environment designed for multi-turn RL: Spreadsheet Gym exposes extensive Excel functionality through a Python sandbox, along with a refined harness that incorporates a comprehensive tool set and carefully designed tool-routing rules for spreadsheet tasks. Through comprehensive experiments, we show that Spreadsheet-RL substantially enhances AI agent's performance on both general and domain-specific spreadsheet tasks: it improves Qwen3-4B-Thinking-2507's Pass@1 on SpreadsheetBench from 12.0% to 23.4%, and raises Pass@1 from 8.4% to 17.2% on our curated Domain-Spreadsheet dataset. These results highlight Spreadsheet-RL's strong potential for generalization and real-world adoption in spreadsheet automation, and broadly, its promise for advancing LLM-based interactions with data interfaces in everyday work.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。