Papers
Topics
Authors
Recent
Search
2000 character limit reached

ST-Raptor: LLM Framework for Semi-Structured Table QA

Updated 3 July 2026
  • ST-Raptor is an LLM-powered framework that models semi-structured tables using a Hierarchical Orthogonal Tree (HO-Tree) to capture complex header and cell structures.
  • It employs modular atomic tree operations along with a two-stage verification process to enhance retrieval precision and mitigate hallucinations.
  • Evaluated on the SSTQA benchmark, ST-Raptor achieves 72.4% exact-match accuracy and outperforms nine baseline methods in handling intricate table layouts.

ST-Raptor is a LLM-powered framework designed for question answering over semi-structured tables, which are common in real-world settings such as financial documents, medical records, and transactional data. Unlike strictly relational tables, semi-structured tables feature hierarchical and merged headers, variable subtable arrangements, and non-uniform layouts, rendering conventional parsing and information extraction techniques inadequate. ST-Raptor addresses key challenges—structural modeling, complex cell retrieval, and answer verification—by introducing a Hierarchical Orthogonal Tree (HO-Tree) representation, modular atomic tree operations for data manipulation, LLM-driven operation pipelines, and a two-stage verification mechanism. On the SSTQA benchmark, which consists of 764 questions over 102 real-world tables, ST-Raptor achieves 72.4% exact-match accuracy and shows significant improvements over nine baseline methods (Tang et al., 25 Aug 2025).

1. Problem Motivation and Pipeline Overview

Semi-structured tables in environments such as Excel, PDF, or enterprise portals present distinct features—hierarchical headers, merged cells, embedded subtables, and non-uniform grids—posing substantial challenges for automated question answering (QA). Existing systems relying on schema conversion (NL2SQL, NL2Code) experience severe information loss when flattening non-relational layouts, while vision-LLMs (e.g., VLMs that interpret tables as images) sacrifice text precision, scale poorly to large tables, and demand costly fine-tuning.

ST-Raptor targets three core challenges:

  • C1: Structure understanding: Differentiating header and content cells, accurately modeling nesting and spatial containment.
  • C2: Retrieval complexity: Supporting diverse access strategies (top-down, bottom-up, left-right, etc.) within a unified operational framework.
  • C3: Verification: Ensuring answers are both correctly derived and reliably grounded, mitigating hallucinations and analytical errors.

ST-Raptor operationalizes these goals via a multi-stage pipeline: (1) conversion of a table to HO-Trees; (2) decomposition of questions into sub-tasks and the synthesis of tree operation pipelines; (3) sequential execution and LLM-driven reasoning; (4) systematic answer verification (Tang et al., 25 Aug 2025).

2. Hierarchical Orthogonal Tree (HO-Tree) Formalism

ST-Raptor represents semi-structured tables using the Hierarchical Orthogonal Tree (HO-Tree), a composite data structure that explicitly models header and body hierarchies, enabling fine-grained and context-sensitive access.

2.1 Structure and Formal Definition

An HO-Tree is a triple: HO-Tree={MTree,BTree,MB}HO\text{-}Tree = \{\,MTree,\,BTree,\,M \xrightarrow{} B\,\}

  • MTree (Meta Tree): Rooted, ordered tree encoding hierarchical headers; each root-to-leaf path forms a header stack defining a column structure.
  • BTree (Body Tree): Rooted, ordered tree representing data cells; each root-to-leaf path enumerates a row, with tree depth matching the number of header levels.
  • Mapping (MBM\xrightarrow{}B): Each terminal header (leaf MNodeMNode in MTreeMTree) is mapped to a corresponding column depth in BTreeBTree, ensuring headers are properly associated with body cells.

2.2 Construction Algorithm

A recursive construction procedure detects meta-information (headers) through VLM and embedding techniques, then partitions the table into orthogonally-organized subtables using three partitioning principles:

  • P1: Full-row/column merged cells trigger new header-orthogonal tables.
  • P2: Disambiguation between top/left headers by cell count heuristics.
  • P3: Orthogonal subtable splits for complex layouts.

Each subtable is recursively converted, combining results into a global HO-Tree. Algorithmic steps are formalized as follows:

MNodeMNode2

2.3 Illustrative Example

A table with a top-level merged cell (e.g., "TD Tech") is treated as an L4 layout. It is split into component subtables according to contained topics (e.g., "Basic Info," "Employee Info"), with dedicated header-body structures for each, thereby preserving intra-table hierarchy and semantics.

3. Atomic Tree Operations for QA

ST-Raptor defines nine atomic operations that operate over HO-Trees, supporting both retrieval and compositional logic. Key classes of operations include:

Category Operation (Signature) Description
Retrieval CHL(V)CHL(V), FAT(V)FAT(V), EXT(V1,V2)EXT(V_1,V_2) Children, ancestors, column/row intersection
Manipulate Cond(D,f)Cond(D, f), Math(D,f)Math(D, f), MBM\xrightarrow{}B0, MBM\xrightarrow{}B1 Filtering, aggregation, comparison, execution
Alignment MBM\xrightarrow{}B2 Map operation parameters to table nodes
Reasoning MBM\xrightarrow{}B3 LLM-based generation of free-form answers

The alignment operation grounds operation arguments to actual table entities based on embedding similarity, and the reasoning operation invokes LLMs for open-ended tasks such as summarization.

Each QA pipeline is composed from these primitives, ensuring that retrievals are tightly scoped to relevant subtrees, manipulations apply necessary logic, and summarization leverages LLM capabilities only where strictly needed.

4. Question Decomposition and Pipeline Generation

ST-Raptor uses LLM prompting (with few-shot demonstrations) to decompose complex user questions into sequences of sub-questions. For each sub-question:

  • The LLM receives the textual sub-question, the HO-Tree header paths (in JSON form), and available operation signatures.
  • It outputs an ordered list of atomic operations, which are algorithmically aligned to HO-Tree nodes.

Operation–table alignment is performed immediately for every generated operation, grounding free-text arguments to actual table entities via embedding similarity. For large trees, a pruning step constrains searching to subtrees determined by named entity extraction.

Example: To answer “What is the highest salary in 2022?”:

  1. Retrieve all salaries for 2022: MBM\xrightarrow{}B4
  2. Compute the maximum: MBM\xrightarrow{}B5

5. Two-Stage Verification for Reliability

ST-Raptor employs a dual-phase verification mechanism:

  • Forward Validation: For each operation, checks are performed to ensure argument alignment, non-empty results, and semantic relevance (via LLM cross-examination of interim outputs).
  • Backward Validation: After producing the answer, the system prompts the LLM to generate alternative phrasings of the original question. For each, it derives the corresponding operation pipeline and computes a reliability score (average similarity between derived and original pipelines). If reliability falls below a threshold (e.g., MBM\xrightarrow{}B6), the answer is flagged as low-confidence or triggers pipeline regeneration.

Mathematically, the reliability score is: MBM\xrightarrow{}B7 where MBM\xrightarrow{}B8 is the original pipeline, MBM\xrightarrow{}B9 are alternate pipelines, and MNodeMNode0 is a normalized sequence similarity metric.

6. Dataset and Experimental Results

The SSTQA benchmark comprises 764 question-answer pairs over 102 real-world semi-structured tables spanning 19 domains. The dataset exhibits an average nesting depth of 2.52, a merge ratio of 5.44%, and 147 cells per table. Question difficulty is stratified into simple (299), medium (284), and hard (178) classes based on reasoning complexity.

ST-Raptor is evaluated against nine baselines including NL2SQL (OpenSearch-SQL), agent-based, vision-language, and foundation LLMs (e.g., GPT-4o, DeepSeekV3). Metrics include exact-match accuracy and ROUGE-L for summarization.

Summary of Results:

Model Accuracy ROUGE-L
ST-Raptor 72.39% 52.19
GPT-4o 66.45% 43.86
TableLLaMA lower lower

Performance stratified by difficulty shows ST-Raptor superior for simple (93.97%), medium (62.66%), and hard (58.43%) questions. Qualitative analysis highlights successful handling of multi-level nested headers and accurate summarization where baselines miss merged cells or hallucinate content (Tang et al., 25 Aug 2025).

7. Implementation Details and Reproducibility

ST-Raptor integrates several model and system components:

  • Meta-information Detection: InterVL2.5 (26B) serves as the vision-language backbone for header detection, with Multilingual-E5-Large embeddings for similarity matching.
  • Pipeline Decomposition/Reasoning: DeepSeekV3 (MoE LLM) generates question decompositions, operation sequences, and executes semantic reasoning.
  • Prompting Strategy: 3–5 few-shot instances for each subtask guide LLM outputs.
  • Key Hyperparameters: Alignment threshold set to 0.6, backward verification using MNodeMNode1 alternate questions, early stopping after 3 unsuccessful regeneration attempts.

Reproducibility is enabled via open-source code and dataset at https://github.com/weAIDB/ST-Raptor, with instructions for table preprocessing, tree construction, pipeline QA, and evaluation provided (Tang et al., 25 Aug 2025).


ST-Raptor exemplifies a shift toward explicit, structural QA over semi-structured data. By making table structure first-class through HO-Trees, combining atomic operation pipelines, and enforcing dual-stage answer verification, the system addresses the critical requirements of structural fidelity, retrieval precision, and reliability in practical semi-structured table QA.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ST-Raptor.