StructGPT: A General Framework for Large Language Model to Reason over Structured Data

Jinhao Jiang, Kun Zhou, Zican Dong, Keming Ye, Wayne Xin Zhao +1 more
5/16/2023
cs.CL

Official code: RUCAIBox/StructGPT (416 stars, Apache-2.0, last commit 2023-11-28).

Abstract

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 \textbf{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}.

View on arXivView PDF

Code Implementations(1)

RUCAIBox/StructGPTOfficial100%
Apache-2.0

The code and data for "StructGPT: A general framework for Large Language Model to Reason on Structured Data"

41636Shell, PythonMay 16, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{jiang2023structgpt,
  title  = {StructGPT: A General Framework for Large Language Model to Reason over Structured Data},
  author = {Jinhao Jiang and Kun Zhou and Zican Dong and Keming Ye and Wayne Xin Zhao and Ji-Rong Wen},
  year   = {2023},
  eprint = {2305.09645},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.09645v2}
}

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/2305.09645.svg)](https://codeofpaper.com/paper/2305.09645)

Discussion