[Paper Review] StructGPT: A General Framework for Large Language Model to Reason over Structured Data
StructGPT introduces an Iterative Reading-then-Reasoning (IRR) framework that uses specialized interfaces to read structured data (KGs, tables, DBs) and lets LLMs reason over the collected evidence, improving zero-shot and few-shot QA over structured data.
In this paper, we study how to improve the zero-shot reasoning ability of large language models~(LLMs) over structured data in a unified way. Inspired by the study on tool augmentation for LLMs, we develop an \emph{Iterative Reading-then-Reasoning~(IRR)} approach for solving question answering tasks based on structured data, called extbf{StructGPT}. In our approach, we construct the specialized function to collect relevant evidence from structured data (\ie \emph{reading}), and let LLMs concentrate the reasoning task based on the collected information (\ie \emph{reasoning}). Specially, we propose an \emph{invoking-linearization-generation} procedure to support LLMs in reasoning on the structured data with the help of the external interfaces. By iterating this procedures with provided interfaces, our approach can gradually approach the target answer to a given query. Extensive experiments conducted on three types of structured data demonstrate the effectiveness of our approach, which can significantly boost the performance of ChatGPT and achieve comparable performance against the full-data supervised-tuning baselines. Our codes and data are publicly available at~\url{https://github.com/RUCAIBox/StructGPT}.
Motivation & Objective
- Motivate improving LLM reasoning over structured data without task-specific fine-tuning.
- Propose a unified interface-augmented IRR framework (StructGPT) for KG, table, and DB data.
- Design task-specific interfaces to read structured data and an invoking-linearization-generation procedure for iterative reasoning.
Proposed method
- Define specialized interfaces for KG, table, and database data to enable precise data access and filtering.
- Develop an invoking-linearization-generation loop where LLMs read via interfaces, linearize the extracted evidence, and generate answers or SQL.
- Use two prompt styles to elicit evidence selection and answer generation from the linearized information.
- Instantiate IRR for KGQA, TableQA, and Text-to-SQL tasks with corresponding data flows and interfaces.
- Demonstrate zero-shot and few-shot improvements across eight datasets compared to baseline LLMs.
Experimental results
Research questions
- RQ1How can LLMs reason over structured data in a unified framework without task-specific fine-tuning?
- RQ2Can interface-based reading combined with iterative reasoning improve KGQA, TableQA, and Text-to-SQL performance?
- RQ3What are the gains of IRR across zero-shot and few-shot settings on diverse structured data types?
Key findings
- Zero-shot and few-shot IRR with StructGPT improves KGQA Hits@1 on WebQSP and MetaQA datasets when compared to direct LLM usage.
- IRR consistently enhances TableQA denotation accuracy and accuracy across WTQ, WikiSQL, and TabFact datasets for both Davinci-003 and ChatGPT.
- In Text-to-SQL, IRR yields higher execution accuracy across Spider variants, especially with few-shot prompts.
- Across three data types (KG, table, DB), IRR demonstrates substantial performance gains over direct prompting without model fine-tuning.
- Error analysis identifies selection and reasoning as key bottlenecks, guiding future prompt and interface refinements.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.