Augment before You Try: Knowledge-Enhanced Table Question Answering via Table Expansion

Yujian Liu, Jiabao Ji, Tong Yu, Ryan A. Rossi, Sungchul Kim, Handong Zhao, Ritwik Sinha, Yang Zhang, Shiyu Chang

Abstract

Table question answering is a popular task that assesses a model's ability to understand and interact with structured data. However, the given table often does not contain sufficient information to answer the question, necessitating the integration of external knowledge. Existing methods either convert both the table and external knowledge into text, which neglects the structured nature of the table; or they embed queries for external sources in the interaction with the table, which complicates the process. In this paper, we propose a simple yet effective method to integrate external information in a given table. Our method first constructs an augmenting table containing the missing information and then generates a SQL query over the two tables to answer the question. Experiments show that our method outperforms strong baselines on three table QA benchmarks.

1. Introduction

While Large Language Models (LLMs) have revolutionized natural language processing, their ability to reason over structured data remains a challenge, particularly when the data is incomplete. Tables found in the wild are rarely self-contained; answering a question like "How many chords in this list are based on a sharp or flat note?" requires external musical knowledge not present in the original schema. This paper introduces a novel "augment-then-generate" framework that decouples knowledge retrieval from logical reasoning, ensuring both structural integrity and execution reliability.

2. The Challenge of Knowledge-Enhanced Table QA

Existing approaches to Knowledge-Enhanced Table QA typically follow two paths, both of which have significant drawbacks:

  1. Linearization (Program of Thought): This method flattens the table into a text string. While simple, it destroys the structured nature of the data, making mathematical operations or comparisons difficult and often leading to "reading errors" as context windows are exceeded.
  2. Hybrid Queries (Binder): This approach attempts to embed LLM prompts directly into SQL statements (e.g., using custom functions like LLM_CHECK). This often results in "syntax soup," where the model struggles to generate valid, non-standard code, leading to high execution error rates.
Comparison of Table QA frameworks: Program of Thought (a), Binder (b), and the proposed Augment-then-Generate framework (c).

3. The "Augment before You Try" Framework

To address these issues, we propose a three-step pipeline that preserves the table's structure while seamlessly integrating external facts:

  • Step 1: Question Analysis: The LLM identifies the specific knowledge gaps by examining the question and table schema. It generates targeted queries to fetch missing information (e.g., "Is the root 'C#' a sharp or flat note?").
  • Step 2: Table Augmentation: The system retrieves the required information from a knowledge source—either the LLM's internal weights or external documents—and organizes it into a new, separate "augmenting table."
  • Step 3: SQL Generation: With all necessary data now in tabular form, the LLM generates a standard SQL query that joins the original table with the augmenting table. This allows the model to perform complex reasoning using standard, reliable code.

4. Experimental Results

We evaluated our framework on three major benchmarks: WikiTQ (open-domain), and TATQA/FinQA (financial domain). Our method demonstrated significant improvements in both accuracy and robustness.

On the WikiTQ test set, the framework achieved 55.69% Execution Accuracy (EA), substantially outperforming Program-of-Thought (53.02%) and Binder (35.45%). Notably, the method maintained steady performance even as table size increased, whereas linearized methods saw sharp declines.

Execution Accuracy and Error rates for Binder, Binder-separate, and the proposed method.

As shown in the results, a primary driver of this success is the drastic reduction in execution errors. By generating standard SQL rather than hybrid code, the framework avoids the syntax pitfalls that plague previous state-of-the-art models.

5. Discussion and Conclusion

The success of the "Augment before You Try" framework highlights the importance of decoupling information gathering from logical reasoning. By moving retrieval to a pre-processing step, we allow the LLM to focus on what it does best: writing clean, executable code. While the system's performance is currently tied to the underlying LLM's SQL capabilities, it provides a scalable and robust path forward for complex, knowledge-intensive table reasoning tasks.

Summary updated

BibTeX
@misc{liu2024augment,
  author = {Yujian Liu and Jiabao Ji and Tong Yu and Ryan A. Rossi and Sungchul Kim and Handong Zhao and Ritwik Sinha and Yang Zhang and Shiyu Chang},
  title = {{Augment before You Try: Knowledge-Enhanced Table Question Answering via Table Expansion}},
  year = {2024},
  eprint = {2401.15555},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.15555},
}
Figure