TL;DR

SpreadsheetLLM introduces SheetCompressor, a three-stage encoding pipeline that reduces spreadsheet token count by 96x versus naive serialization while preserving structural semantics for LLM-based table understanding tasks.

Summary

Naively serializing spreadsheets for LLM consumption wastes tokens and destroys spatial structure. SheetCompressor addresses this through a three-stage pipeline: pruning empty cells and duplicates, encoding data types and structural anchors (headers, borders, merged cells), and aggregating repeated patterns. The result is a 96x token reduction versus vanilla markdown serialization. Evaluated on spreadsheet QA and table detection with GPT-4, SpreadsheetLLM significantly outperforms naive serialization, demonstrating that domain-specific encoding is essential for structured document understanding.

Key contributions

  1. Proposes SheetCompressor, a three-stage pipeline (pruning, structural encoding, pattern aggregation) for spreadsheet-to-LLM encoding.
  2. Achieves 96x token reduction versus naive markdown serialization while preserving table structure.
  3. Introduces structural anchors (headers, borders, merged cells) as the primary semantic signal over raw cell values.
  4. Demonstrates that pattern aggregation compresses homogeneous regions without loss of table understanding capability.

When to cite

  1. When encoding spreadsheets or structured tabular data for LLM-based processing and needing token-efficient serialization.
  2. When arguing that domain-specific serialization formats outperform generic markdown for structured document inputs.
  3. When discussing token efficiency as a first-class design constraint for structured data in LLM pipelines.
  4. When evaluating methods for table detection or spreadsheet QA with large language models.

LLM AI ML