ST-Raptor: LLM-Powered Semi-Structured Table Question Answering
Zirui Tang, Boyu Niu, Xuanhe Zhou, Boxiu Li, Wei Zhou, Jiannan Wang, Guoliang Li, Xinyi Zhang, Fan Wu
2025-08-26
Summary
This paper introduces a new system called ST-Raptor designed to automatically answer questions about complex tables you often find in things like financial reports or medical records, tables that aren't neatly organized like a spreadsheet.
What's the problem?
Currently, understanding these complex tables and answering questions about them requires people to manually interpret the layout, which takes a lot of time and money. Existing automated methods either lose important information when trying to simplify the table, or they struggle to understand the table's complicated structure with things like merged cells and headers that span multiple rows or columns. Basically, computers aren't very good at 'reading' these tables like humans are.
What's the solution?
ST-Raptor tackles this by creating a special 'tree' structure that maps out exactly how the table is organized, capturing all the complexities. It then breaks down a question into smaller steps, figuring out which operations to perform on the table to find the answer. It also has a built-in checking system to make sure each step is correct and that the final answer makes sense, verifying both as it goes and after it finds a potential answer.
Why it matters?
This work is important because it moves us closer to automating the process of understanding and extracting information from real-world tables. This could save a lot of time and effort in fields like finance, healthcare, and business analytics, allowing people to quickly get answers to important questions without having to manually sift through complex documents. They even created a new dataset to test their system and showed it performs better than existing methods.
Abstract
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.