Understanding and reasoning over complex spreadsheets remain fundamental challenges for large language models (LLMs), which often struggle with accurately capturing the complex structure of tables and ensuring reasoning correctness. In this work, we propose SheetBrain, a neuro-symbolic dual workflow agent framework designed for accurate reasoning over tabular data, supporting both spreadsheet question answering and manipulation tasks. SheetBrain comprises three core modules: an understanding module, which produces a comprehensive overview of the spreadsheet - including sheet summary and query-based problem insight to guide reasoning; an execution module, which integrates a Python sandbox with preloaded table-processing libraries and an Excel helper toolkit for effective multi-turn reasoning; and a validation module, which verifies the correctness of reasoning and answers, triggering re-execution when necessary. We evaluate SheetBrain on multiple public tabular QA and manipulation benchmarks, and introduce SheetBench, a new benchmark targeting large, multi-table, and structurally complex spreadsheets. Experimental results show that SheetBrain significantly improves accuracy on both existing benchmarks and the more challenging scenarios presented in SheetBench. Our code is publicly available at https://github.com/microsoft/SheetBrain.
翻译:理解和推理复杂电子表格对于大语言模型(LLMs)而言仍是根本性挑战,这些模型通常难以准确捕捉表格的复杂结构并确保推理正确性。本文提出SheetBrain,一种专为表格数据精确推理设计的神经符号双工作流智能体框架,支持电子表格问答与操作任务。SheetBrain包含三个核心模块:理解模块——生成电子表格的全面概览(包括工作表摘要和基于查询的问题洞察以指导推理);执行模块——集成预载表格处理库的Python沙箱与Excel辅助工具包,实现高效的多轮推理;验证模块——核查推理与答案的正确性,必要时触发重新执行。我们在多个公开表格问答与操作基准上评估SheetBrain,并推出SheetBench——一个针对大型、多表格及结构复杂电子表格的新基准。实验结果表明,SheetBrain在现有基准和SheetBench提出的更具挑战性场景中均显著提升了准确率。代码已公开于https://github.com/microsoft/SheetBrain。