Skip to content
The Plain Paper

Dataset · Artificial intelligence

A new benchmark shows how hard it is to query official statistics with everyday language

LOCuST tests whether language models can find and query official statistics in English and Dutch. GPT 6 reached observation F1 0.62 in the end-to-end task, but its English execution accuracy was 0.10.

In brief

  • LOCuST brings together English and Dutch questions about Statistics Netherlands data, with a knowledge graph that explains coded categories and measures.
  • The benchmark tests finding relevant tables, writing a query when tables are supplied, and doing both steps together.
  • In the English end-to-end test, average observation F1 was 0.71 for average-value questions and 0.66 for simple-value questions.
  • Pivoted queries produced 651 syntax errors across models, compared with 158 for regular SQL runs.
  • The benchmark does not test questions that cannot be answered, and the authors note differences in how much the Dutch questions needed manual editing.

The background

A text-to-SQL system takes a question in ordinary language and turns it into a database query. For example, a user might ask for the average number of students in a certain type of school, and the system must select the right data and calculation.

Official statistics often store numbers alongside codes for categories such as time, place, or type of school. A measure is what is counted or measured; dimensions describe the categories that give the number context. Statistics Netherlands’ data service provides both datasets and metadata describing their content and structure. [s1]1

Finding a table is a search task: a system ranks likely tables and then picks the ones that fit the question. ColBERTv2 is a search method that compares question and table text in smaller pieces, rather than representing each as just one overall summary. [s2]2

What the researchers did

The authors built LOCuST from English and Dutch tables published by Statistics Netherlands. It contains questions about 2,241 tables across 22 subject areas, and its knowledge graph links tables to labels, definitions, category codes, and units.

To create question-and-answer examples, the researchers generated candidate queries and questions, then had four experts check and revise each pair. They divided the questions by subject area, holding out whole areas for testing while keeping the full table collection available.

The tests separate the challenge into finding tables, writing a query when the right tables are supplied, and doing both together. The authors tried a word-matching search method and a trained search model, then tested four language models using the retrieved metadata to help write queries.

What they found

The search models did not find every needed table, and the authors report that ColBERTv2 retrieved relevant tables more successfully than the word-matching baseline. The paper also says results were consistently higher for English than for Dutch.

Even when the right tables were supplied, the language models often failed to return a fully correct answer. In the end-to-end English test, models averaged observation F1 0.71 on average-value questions and 0.66 on simple-value questions; this score gives partial credit when a query selects some of the expected data.

More complex question types were harder: the paper identifies joins, proportions, and finding a largest value among the weakest English end-to-end cases. The authors also report that pivoted queries caused 651 syntax errors across the models, compared with 158 for regular SQL runs.

Of 6 head-to-head comparisons the paper prints, 5 favour its own contribution, 1 goes against it.

  • Compared with Dutch metadata graph, 2 results: 2 favour the paper, 0 go against it.
  • Compared with English metadata graph, 2 results: 2 favour the paper, 0 go against it.
  • Compared with regular SQL runs, 1 result: 0 favour the paper, 1 goes against it.
  • Compared with VALUE-type questions, 1 result: 1 favours the paper, 0 go against it.
Results as the paper prints them, with the difference worked out for this page
What was measuredResultCompared withDifference
GPT 6
end-to-end observation F1 in the benchmark, English and DutchEnd-to-end evaluation; English and Dutch.0.62
end-to-end numeric F1 on EnglishEnd-to-end evaluation; English.0.52
end-to-end execution accuracy on EnglishEnd-to-end evaluation; English.0.10
Qwen 3.8
end-to-end execution accuracy on DutchEnd-to-end evaluation; Dutch.0.05
LOCuST-en
question-query pairs1,299
tables1,030
average columns per table32.40
LOCuST-nl
question-query pairs1,260
tables1,211
average columns per table34.55
English metadata graph
triples in the metadata graph1,701,066Dutch metadata graph: 6,531,863-4830797 (-74.0%)
Dutch metadata graph
triples in the metadata graph6,531,863English metadata graph: 1,701,066+4830797 (+284.0%)
Show 16 more results
More results, as the paper prints them
What was measuredResultCompared withDifference
English metadata graph
unique concepts52,380Dutch metadata graph: 166,229-113849 (-68.5%)
Dutch metadata graph
unique concepts166,229English metadata graph: 52,380+113849 (+217.4%)
AVG-type questions
model-averaged end-to-end observation F1 on EnglishAverage across models; English end-to-end task.0.71VALUE-type questions: 0.66+0.05 (+7.6%)
AGGJOIN answers
share with observation F1 equal to 1 in the end-to-end taskAll models; English end-to-end task.9 %Goes against the paper
fully correct end-to-end answersAll models; English end-to-end task.0Goes against the paper
generated queries
sample size for the metric correlation analysisRegular SQL runs; all models, languages and tasks with a generated query.4,842 queries
queries that cannot be executed across models and languagesAll models and both languages; regular SQL runs.158 queries
observation F1
Spearman correlation with strict execution accuracyAll generated-query runs.0.22EXtextsubscriptS
Spearman correlation with numeric F1All generated-query runs.0.63NF1
observation F1 and dimension F1
share of SQL for which the two metrics are equalAll generated-query SQL.48 %
executable queries with observation F1 of 1
share also having numeric F1 of 1Executable queries.76 %
binding errors
cases where a query references a column unavailable where usedAmong the generated queries that cannot be executed.123 cases
pivoted versus regular SQL
maximum difference in lenient observation F1 across models and languagesQuery-only generation task; lenient observation F1.0.04regular SQL generation
pivoted SQL
reported range of change in strict observation F1 relative to regular SQLQuery-only generation task; the reported change range is -0.08 to -0.22.-0.08regular SQL generationGoes against the paper
pivoted queries
syntax errors across all modelsPivoted-query runs; all models.651 errorsregular SQL runs: 158+493 (+312.0%)Goes against the paper
parsing errors caused by invalid PIVOT syntaxPivoted-query runs.323 errorsGoes against the paper

What to be careful about

Observation F1 measures whether a query selects the right measures and categories, not whether it performs the requested calculation correctly or presents the answer in the expected format. The authors therefore treat it as a complement to execution-based measures, not a replacement.

The benchmark questions were generated from query patterns and then reviewed by experts, so they are not a direct sample of all questions real users might ask. The authors say generated English questions could be overly detailed, and Dutch suggestions needed more manual revision.

The test set excludes questions that cannot be answered, such as requests involving incompatible units, missing data, ambiguity, or false premises. The paper reports no uncertainty intervals or statistical significance tests for its model scores.

How it fits with other research

The benchmark uses ColBERTv2 as a table-search baseline. Its original paper describes a search method that compares query and document representations at the level of individual tokens; LOCuST applies the method to finding statistical tables, where labels and metadata help distinguish similar datasets. [s2]2

Who can use it

Researchers and practitioners can use LOCuST to test whether a system can find the right statistical tables and produce queries grounded in their codes and metadata. Its separate tasks can help identify whether errors come from table search or from writing the query.

Terms explained

Text-to-SQL
Turning a question written in ordinary language into a database query.
SQL
A language for asking databases to retrieve, filter, join, or calculate data.
Measure
The quantity being counted or measured, such as the number of enrolled pupils.
Dimension
A category that describes the context of a measurement, such as school type or year.
Knowledge graph
A structured set of connections between items and facts; here it links tables, measures, categories, labels, definitions, and units.
Table retrieval
Searching a collection of tables to find those likely to contain the answer to a question.
End-to-end QA
Answering a question by finding the relevant tables and writing the database query, without being given the tables in advance.
Execution accuracy
A score for whether running a generated query produces the expected answer.
Observation F1
A partial-credit score for how well a query selects the measures and category codes expected for an answer.
Pivoting
Rearranging query results so some values or categories appear as column headings.

Questions this paper answers

What is the LOCuST text-to-SQL benchmark?

It is a benchmark of English and Dutch questions about official statistics from Statistics Netherlands. It tests table search, query writing, and the combined process, using a knowledge graph to explain the statistical data.

What does observation F1 measure in LOCuST?

It measures how closely a generated query selects the expected measures and category codes. It can give partial credit even when the final answer or its formatting is not fully correct.

Why do language models struggle with official-statistics questions in LOCuST?

They must find the right tables and interpret specialized terms, units, and coded categories. The paper reports errors in selecting tables and codes, writing SQL, and applying the requested calculations.

What happens when LOCuST models must produce pivoted SQL?

The pivoting requirement raises syntax errors substantially: the paper reports 651 errors in pivoted runs compared with 158 in regular SQL runs. The authors say pivoting did not meaningfully change which data the models selected.

The paper in detail

Everything below is recorded from the paper and matched against its text.

What the paper claims, in its own terms
  • Shown

    The paper introduces LOCuST, a benchmark for complex English and Dutch questions over official statistics.

    Holds when: The benchmark uses Statistics Netherlands tables and a semantic knowledge graph.

  • Shown

    LOCuST contains expert-annotated questions covering multiple query and aggregation types.

  • Shown

    The paper introduces observation F1 to measure query closeness to expected observations even when answers differ.

    Holds when: The metric is based on measure and dimension matches.

  • Shown

    Requiring pivoted output raises syntax errors but does not meaningfully change which data the models ground on.

    Holds when: The authors' pivoting ablation on the query-only generation task.

The method, step by step
  1. Create randomized S-expression query templates by selecting query types, tables, dimensions and measures.
  2. Convert each S-expression to SQL with templates and a rule-based system.
  3. Generate a question suggestion using GPT 4.1, the S-expression, graph metadata and executed query result.
  4. Have four Statistics Netherlands experts review each question-answer suggestion, accepting, rejecting, adjusting or rewriting it.
  5. For retrieval baselines, index table titles, summaries and long descriptions; evaluate BM25+ and train ColBERTv2 with hard negatives.
  6. For query-generation baselines, prompt four out-of-the-box LLMs with question-specific graph metadata; for end-to-end runs, use the top-five retrieved tables.

New in this paper

  • The LOCuST bilingual official-statistics benchmark and its expert-reviewed question-query pairs.
  • The three-stage evaluation setup for table retrieval, query generation and end-to-end question answering.
  • A catalog-wide semantic knowledge graph used to ground concepts and validate aggregation units.
  • Observation F1, combining measure and dimension matches to assess selected observations.

Taken from earlier work

  • S-expression design is inspired by Gu et al.
  • The sparse retrieval approach uses BM25+.
  • The dense retriever is based on ColBERTv2.
  • The graph uses the Data Cube, SKOS, DCAT, Dublin Core and QUDT vocabularies/ontology.
  • The question-suggestion step uses OpenAI GPT 4.1.

Assumptions

  • The test split holds out domains, while the full catalog of tables remains available to models.
  • The benchmark's graph contains metadata but not the observations, which are in the data tables.
  • Aggregation of measures with different or dimensionless units is invalid according to the benchmark framework.
  • The evaluation split and question-answer pairs are treated as the reference for assessing model performance.
Terms as the paper defines them
Official statistics
The paper describes these as facts about complex real-world phenomena, often involving specialized concepts, terminology, metadata, and calculation methods.
measure
The concept being measured that produces an observation.
dimensions
Variables that identify or describe the context of an observation.
Dimension F1 (dimF1)
An F1 score for the dimension codes identified by the predicted and expected queries.
Observation F1 (obsF1)
A measure-and-dimension-based F1 score for how well a query selects the expected observations.
recall@k (R@k)
The share of ground-truth tables in the top-k retrieved tables, averaged over questions.
perfect recall@k (PR@k)
The share of questions for which every ground-truth table is retrieved within the top k.
lenient execution accuracy (EXtextsubscriptL)
Execution accuracy that ignores structural differences and compares the multiset of output cell values.
Execution accuracy (EX)
A comparison of the executed generated query output with the expected output.
Methods, datasets and ideas it names
  • LOCuSTDataset · Introduced here

    A bilingual text-to-SQL benchmark for questions about Statistics Netherlands data.

  • metadata knowledge graphDataset · Used

    A structured graph containing metadata about tables, measures and dimensions.

  • Execution accuracy (EX)Measure · Used

    A metric comparing the output of an executed generated query with the expected output.

  • EXtextsubscriptSMeasure · Used

    The strict execution-accuracy variant, which compares executed query outputs.

  • EXtextsubscriptLMeasure · Used

    The lenient execution-accuracy variant, comparing multisets of cell values while ignoring output structure.

  • numeric F1 (NF1)Measure · Used

    An F1 score between the multisets of numeric observation values in predicted and expected outputs.

  • measure F1 (msrF1)Measure · Used

    An F1 metric for the measures referenced by a query.

  • dimension F1 (dimF1)Measure · Used

    An F1 metric for the dimension codes selected by a query.

  • perfect recall@k (PR@k)Measure · Used

    The share of questions for which all ground-truth tables appear in the retrieved top-k.

  • BM25+Method · Compared against

    A sparse table-retrieval baseline using stemming and stop-word removal.

  • ColBERTv2Method · Used

    A dense retrieval model trained for table retrieval using hard-negative mining.

  • Claude 5 SonnetTool · Used

    One of the four out-of-the-box language models evaluated.

  • GPT 6 SolTool · Used

    One of the four out-of-the-box language models evaluated.

  • LLama 4 MaverickTool · Used

    One of the four out-of-the-box language models evaluated.

  • Qwen 3.8-27BTool · Used

    One of the four out-of-the-box language models evaluated.

  • DuckDBTool · Used

    The database system used for offline access and querying of the benchmark data.

  • Data Cube VocabularyOther · Used

    A vocabulary used to structure the graph's table, measure and dimension nodes.

  • SKOS VocabularyOther · Used

    A vocabulary used for hierarchical relations, labels and descriptions of measures and dimensions.

  • Data Catalog VocabularyOther · Used

    A vocabulary used for describing table metadata.

  • QUDT OntologyOther · Used

    An ontology used, where possible, to represent measure units.

  • Open Data version 3Other · Used

    The data specification in which Statistics Netherlands tables are stored.

  • Statistics NetherlandsObject of study · Studied

    The publisher of the official-statistics tables used in the benchmark.

  • VALUEConcept · Used

    A query type asking for a simple value from a single table.

  • SUMConcept · Used

    A query type requesting a sum over queried measures or a dimension.

  • AVGConcept · Used

    A query type requesting an average over queried measures or a dimension.

  • MINConcept · Used

    A query type requesting the smallest value over queried measures or a dimension.

  • MAXConcept · Used

    A query type requesting the largest value over queried measures or a dimension.

  • JOINConcept · Used

    A query type requesting values from multiple tables joined on a measure or dimension.

  • PROPConcept · Used

    A query type asking for a proportion of a measure or dimension relative to its total.

  • AGGJOINConcept · Used

    A query type applying an aggregation function over multiple joined tables.

  • Table retrievalMethod · Used

    The task of retrieving relevant table or tables for a question.

  • Query generationMethod · Used

    The task of generating SQL when the relevant tables are supplied.

  • End-to-end QAMethod · Used

    The combined task of retrieving tables and generating a query without the correct tables supplied.

  • semantic metadata graphMethod · Introduced here

    A hand-constructed graph of table, measure and dimension metadata used for grounding and validation.

  • unanswerable questionsOpen problem · Studied

    Questions that cannot be answered appropriately for reasons such as incompatible units, incomplete data, ambiguity or false premises.

Limits the authors state
  • The test sets do not include questions asking for aggregations over incompatible measure units.
  • Other kinds of unanswerable questions, including semantically erroneous, incomplete, ambiguous, false-premise, or temporally inconsistent cases, are not included in the test sets.
  • The machine-generated English questions can be more verbose and less creatively or ambiguously phrased than authentic user questions.
  • The Dutch and English annotation processes differ in the amount of manual intervention, which the authors note could affect benchmark results.
  • Comparisons between English and Dutch results should account for the greater number of relevant dimensions and measures in Dutch test questions.
How the evidence was gathered
Samples or repeats
1,299 English and 1,260 Dutch question-query pairs; test sets contain 308 English and 299 Dutch questions. The metric-correlation analysis covers n = 4,842 generated-query runs. The paper does not report repeated seeds or uncertainty estimates.
Uncertainty reported
No
Significance tested
No
Notes
The benchmark uses expert review by four Statistics Netherlands experts, but questions are initially generated through a rule-based process and GPT 4.1 suggestions. The authors caution that Dutch required more manual revision, and that Dutch test tables contain more measures and dimensions on average. The paper reports point metrics without uncertainty intervals or significance tests.
Code and data
Questions the paper leaves open
  • How do text-to-SQL systems perform on questions that are unanswerable because of incompatible units, semantic errors, incomplete data, ambiguity or false premises?
  • How can systems explain that data are unavailable, retracted or not disclosable, and why?
  • How can more realistic and creatively phrased questions be produced for lower-resource languages such as Dutch?

Sources

  1. 1Quick start guide | CBScbs.nl
  2. 2ColBERTv2: Effective and Efficient Retrieval via Lightweight Late Interactionarxiv.org

Paper details

Title
A Text-to-SQL Benchmark for Official Statistics
Authors
Lucas Lageweg, Karen Goes, Tom van den Broek, Frank Pijpers, Paul Groth, Jan-Christoph Kalo
Published
24 November 2026
Version read
v1
Field
Artificial intelligence
arXiv
2611.32646

This explanation was written for this site from the paper's own source. 99 passages and figures recorded from the paper were matched against its own text; 26 that could not be matched were left off this page. It does not judge whether the paper is right, and most papers on arXiv have not been peer reviewed. Read the paper before relying on a result.