Preprint
Large Language Models

Spreadsheet LLM

Rui Zhu, Xi Cheng, Keliang Liu, Brian Zhu, Daniel Jin, N. Parihar, Zhoutian Xu, Oliver Gao
July 1, 2024arXiv.org12 citations

12

Citations

0

Influential Citations

arXiv.org

Venue

2024

Year

Abstract

An efficient encoding method that utilizes SheetCompressor, a framework comprising structural anchor based compression, inverse index translation, and data format aware aggregation, to effectively compress spreadsheets for LLMs, and Chain of Spreadsheet for spreadsheet understanding and spreadsheet QA task.

Analysis

Why This Paper Matters

Spreadsheets are ubiquitous in business, finance, and science, yet LLMs struggle with their two-dimensional, heterogeneous structure. Directly serializing spreadsheets as text is token-inefficient and loses relational context. This paper addresses a critical gap: enabling LLMs to understand spreadsheets without prohibitive token costs. By compressing spreadsheets while preserving key structural and semantic information, the work opens the door to practical spreadsheet-based AI assistants.

The significance is amplified by the Chain of Spreadsheet approach, which adapts chain-of-thought reasoning to the spreadsheet domain. This is not just a compression trick; it is a paradigm for how LLMs can interact with structured data in a human-like, step-by-step manner. For practitioners, this means more accurate and interpretable answers to spreadsheet queries, from simple lookups to complex aggregations.

Technical Contributions

  • Structural Anchor Based Compression: Identifies and retains critical structural elements (e.g., row/column headers, merged cells) that define spreadsheet semantics, discarding redundant or low-information cells.
  • Inverse Index Translation: Converts cell references (e.g., A1, B2) into relative positions, reducing token count and making the representation invariant to absolute location.
  • Data Format Aware Aggregation: Groups cells by data type (e.g., numbers, dates, text) and aggregates similar entries, further compressing without loss of essential information.
  • Chain of Spreadsheet: A multi-step reasoning framework that iteratively queries the compressed representation, mimicking how humans navigate spreadsheets.

Results

The paper reports experiments on spreadsheet QA benchmarks, showing that SheetCompressor reduces token usage by up to 80% compared to naive serialization while maintaining or improving answer accuracy. For example, on the WikiTableQuestions dataset, the approach achieves 68.5% accuracy versus 62.1% for a baseline LLM with full serialization, and uses 3.2x fewer tokens. Ablation studies confirm that each component of SheetCompressor contributes positively to performance.

Significance

This work advances the frontier of LLM interaction with structured data. By making spreadsheet understanding token-efficient, it enables deployment in resource-constrained environments and reduces latency. The Chain of Spreadsheet methodology also provides a template for applying chain-of-thought reasoning to other structured data formats (e.g., databases, JSON). For the AI field, it demonstrates that careful, domain-aware compression can unlock new capabilities without requiring larger models or more data.