API-Assisted Code Generation for Question Answering on Varied Table Structures

Yihan Cao, Shuyi Chen, Ryan Liu, Zhiruo Wang, Daniel Fried
10/23/2023
cs.CLcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

A persistent challenge to table question answering (TableQA) by generating executable programs has been adapting to varied table structures, typically requiring domain-specific logical forms. In response, this paper introduces a unified TableQA framework that: (1) provides a unified representation for structured tables as multi-index Pandas data frames, (2) uses Python as a powerful querying language, and (3) uses few-shot prompting to translate NL questions into Python programs, which are executable on Pandas data frames. Furthermore, to answer complex relational questions with extended program functionality and external knowledge, our framework allows customized APIs that Python programs can call. We experiment with four TableQA datasets that involve tables of different structures -- relational, multi-table, and hierarchical matrix shapes -- and achieve prominent improvements over past state-of-the-art systems. In ablation studies, we (1) show benefits from our multi-index representation and APIs over baselines that use only an LLM, and (2) demonstrate that our approach is modular and can incorporate additional APIs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cao2023apiassisted,
  title  = {API-Assisted Code Generation for Question Answering on Varied Table Structures},
  author = {Yihan Cao and Shuyi Chen and Ryan Liu and Zhiruo Wang and Daniel Fried},
  year   = {2023},
  eprint = {2310.14687},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.14687v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.14687.svg)](https://codeofpaper.com/paper/2310.14687)

Discussion