A Text-to-SQL Benchmark for Official Statistics

Lucas Lageweg, Karen Goes, Tom van den Broek, Frank Pijpers, Paul Groth +1 more
11/24/2026
cs.AIcs.IR
benchmark-dataset

No confident code implementation found for this paper.

Abstract

Official statistics are critical datasets for a wide variety of actors, including policymakers and businesses. For providers of official statistics, improving accessibility, governance, and disclosure of their data is of key importance.

Show full abstract

This can be improved by providing question-answering systems based on text-to-SQL approaches. However, existing text-to-SQL benchmarks do not resemble this setting. Official statistics are published as open-domain catalogs of thousands of wide tables whose columns and values are codes, and whose meaning is recorded in separate metadata rather than in a relational schema. To address this gap, we introduce LOCuST, a text-to-SQL benchmark that pairs over two thousand English and Dutch tables from Statistics Netherlands with a semantic knowledge graph. The graph describes the tables, measures, and dimension codes through labels, definitions, hierarchies, and units, and is the external knowledge a system needs to find the right tables and ground a question in the right codes. The benchmark includes expert-annotated questions for different query and aggregation types, including raw value retrieval, summations, proportion calculations, and joins. Alongside standard evaluation measures, we introduce an observation F1 metric that measures how close a query is to the ground truth even when the answers are different. We evaluate a variety of state-of-the-art LLMs and find that they struggle to write SQL that answers the questions correctly.

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. Any repos shown below are weak matches — 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{lageweg2026texttosql,
  title  = {A Text-to-SQL Benchmark for Official Statistics},
  author = {Lucas Lageweg and Karen Goes and Tom van den Broek and Frank Pijpers and Paul Groth and Jan-Christoph Kalo},
  year   = {2026},
  eprint = {2611.32646},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.32646v1}
}

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

Discussion