用树结构解析复杂表格,让大模型准确回答自然语言问题。
ST-Raptor: LLM-Powered Semi-Structured Table Question Answering
- 构建分层正交树(HO-Tree)建模表格布局,避免信息丢失。
- 通过树操作流水线分解问题,实现93.6%的准确率,比基线高20%。
- 适合金融、医疗等需处理复杂表格的场景,提升自动化分析效率。
半结构化表格广泛应用于财务报告、医疗记录、交易订单等真实场景,其布局灵活复杂(如嵌套表头、合并单元格),通常依赖人工分析师解读并回答自然语言问题,成本高且效率低。现有方法面临两大挑战:一是NL2SQL等方法需将表格转为结构化形式,导致信息损失;二是NL2Code和多模态大模型难以理解复杂布局,答不准。为此,我们提出ST-Raptor,一种基于树结构的大语言模型半结构化表格问答框架。首先,引入分层正交树(HO-Tree)建模复杂布局,并设计高效构造算法;其次,定义一组基础树操作,引导大模型执行常见问答任务;用户提问时,系统将其分解为子问题,生成树操作流水线,并进行操作-表格对齐以精准执行。第三,引入两阶段验证机制:前向验证检查执行步骤正确性,后向验证通过从答案重构查询评估答案可靠性。为评估性能,我们构建SSTQA数据集,包含102张真实世界半结构化表格上的764个问题。实验表明,ST-Raptor在答案准确率上优于九个基线,最高提升20%。代码已开源:https://github.com/weAIDB/ST-Raptor。
原文摘要 · Abstract (English)
Semi-structured tables, widely used in real-world applications (e.g., financial reports, medical records, transactional orders), often involve flexible and complex layouts (e.g., hierarchical headers and merged cells). These tables generally rely on human analysts to interpret table layouts and answer relevant natural language questions, which is costly and inefficient. To automate the procedure, existing methods face significant challenges. First, methods like NL2SQL require converting semi-structured tables into structured ones, which often causes substantial information loss. Second, methods like NL2Code and multi-modal LLM QA struggle to understand the complex layouts of semi-structured tables and cannot accurately answer corresponding questions. To this end, we propose ST-Raptor, a tree-based framework for semi-structured table question answering using large language models. First, we introduce the Hierarchical Orthogonal Tree (HO-Tree), a structural model that captures complex semi-structured table layouts, along with an effective algorithm for constructing the tree. Second, we define a set of basic tree operations to guide LLMs in executing common QA tasks. Given a user question, ST-Raptor decomposes it into simpler sub-questions, generates corresponding tree operation pipelines, and conducts operation-table alignment for accurate pipeline execution. Third, we incorporate a two-stage verification mechanism: forward validation checks the correctness of execution steps, while backward validation evaluates answer reliability by reconstructing queries from predicted answers. To benchmark the performance, we present SSTQA, a dataset of 764 questions over 102 real-world semi-structured tables. Experiments show that ST-Raptor outperforms nine baselines by up to 20% in answer accuracy. The code is available at https://github.com/weAIDB/ST-Raptor.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。