TRANSMISSION // 2611.32646v1

Why AI Struggles to Query Official Statistics

Source published

LOCuST tests whether language models can turn questions into database queries across Statistics Netherlands’ English and Dutch data, finding persistent challenges with table retrieval and correct answers.

AI-generated conceptual illustration for Why AI Struggles to Query Official Statistics
AI-generated conceptual illustration; not documentary evidence.

Official statistics may be public, but finding the right figure can mean locating a table, decoding its categories and applying the right calculation. LOCuST is a benchmark that tests whether AI systems can do this from natural-language questions. Its results show that selecting relevant data is not the same as producing a fully correct answer.

Finding a statistic is not always as simple as searching for a familiar word. Official data can sit in large catalogs of tables, with compact codes instead of readable category names. The definitions, units and relationships that explain those codes may live outside the tables themselves. A person asking for a figure may need to know both where it is recorded and which coded categories match the question.

A new study introduces LOCuST, a benchmark designed to test whether language models can handle that task. It focuses on data from Statistics Netherlands and asks whether systems can turn English or Dutch questions into SQL, the language used to query databases. The paper is an arXiv preprint, so its results should be read as an initial evaluation rather than a settled assessment of all systems or statistical data.

A catalog, not just a database

Many text-to-SQL tests give a system a question and a particular database. LOCuST adds an earlier challenge: finding the relevant table or tables in a broad catalog. The benchmark contains 2,559 expert-reviewed question–query pairs in English and Dutch, covering 2,241 tables across 22 subject areas. Questions include retrieving values, calculating sums or averages, finding proportions, and joining information across tables.

The tables are wide and often use codes for categories such as regions, time periods or types of activity. To help interpret those codes, the researchers paired the data with a semantic knowledge graph: a structured collection of information about tables, measures and dimensions, including labels, definitions, hierarchies and units. In the benchmark’s intended setting, systems need this metadata to find relevant data and ground a question in the appropriate codes.

The researchers held out six subject areas for testing. Test questions therefore come from domains excluded from training, although the full table catalog remains available. They evaluated table retrieval on its own, SQL generation when the correct tables were supplied, and end-to-end question answering, where systems had to retrieve tables and write queries.

The question-and-query pairs were created through a partly automated process. Rules generated query structures, and GPT-4.1 suggested natural-language questions using metadata and query results. Four Statistics Netherlands experts reviewed every suggestion and could accept, reject or revise the question and answer pair. The paper reports that Dutch suggestions needed more manual adjustment than English ones.

Finding data is not the same as answering correctly

The evaluated language models often struggled to produce fully correct SQL. In the end-to-end task, the best reported strict execution accuracy was 10% for English and 5% for Dutch. This metric compares a query’s output with the expected output under strict matching. The best lenient execution accuracy, which ignores differences such as column names, output shape and pivot orientation, was 11% for English and 8% for Dutch.

The researchers also introduced observation F1 to capture partial progress. It combines precision and recall over the measures and dimension codes selected in a query, including filtered dimension codes, indicating how closely those selections match the expected ones. The highest end-to-end observation F1 was 0.62 for both English and Dutch. That does not mean the final answers were 62% correct: observation F1 measures selected observations, not output correctness, and does not assess whether aggregations or range filters are correct.

Providing the correct tables improved performance, pointing to table retrieval as an important part of the challenge. The authors also describe frequent errors in choosing dimension codes and applying aggregations. In some cases, queries selected the expected observations but did not match the expected output. Strict execution accuracy can be affected by output structure; lenient execution accuracy removes several structural differences, but neither metric alone captures every aspect of a query. The paper therefore reports multiple measures of retrieval, selected data and query results.

What the results can—and cannot—say

LOCuST tests a specific setting: a large catalog of official statistics from one national statistical office, in English and Dutch. Its results do not establish how systems would perform across other countries, agencies, catalogs or languages. Comparisons between the two languages also need care: the Dutch collection has more dimensions to process, and Dutch is a lower-resource language. The paper says both factors should be considered when interpreting differences.

The questions were reviewed by experts, but they began as automated suggestions. The authors note that generated English questions could be more verbose and less like the varied phrasing of real users. The test also leaves some real-world cases for future work, including questions with false premises, incomplete data or no valid answer. In practice, a system may need to explain that information is unavailable rather than return a plausible query result.

The study does not show that language models are ready to serve as reliable interfaces to official statistics. Instead, it provides a benchmark for testing specific capabilities and documents where the evaluated baselines falter. The authors make the benchmark resources available, but performance on this evaluation is not a guarantee of accuracy in live use. The paper is an arXiv preprint and may not have undergone peer review.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • Why SQL agents need knowledge while they work

    Shared method: Both make database-specific knowledge available to ground text-to-SQL: LOCuST pairs statistical tables with a graph of labels, definitions, hierarchies and units, while RubikSQL-HB lets agents query a workspace during SQL construction and adjudication. The implementations and evaluation settings differ, so this connection does not establish comparable effectiveness.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.32646v1 — Original paper

      Excerpt reference: static/papers/2611.32646v1.md:453-536
      Basis: Paper text
      Source SHA-256: 5d8018e95f5186afbaa96dd7536b2ccb222225abd056a926bf2d00cc0cdc9b10

    • 2611.32772v1 — Original paper

      Excerpt reference: static/papers/2611.32772v1.md:130-177
      Basis: Paper text
      Source SHA-256: 5069cec1cbda5731c625aec00635ceb0e623c42ea77f93075a97eecec14a7abb

  • Can a local AI team help utilities question their smart-meter data?

    Shared method: Both describe grounding text-to-SQL with domain-specific knowledge beyond raw schema: LOCuST supplies semantic metadata through a knowledge graph, and OpenMeter selectively routes domain knowledge to agents. Their knowledge representations and domains differ, and the excerpts do not support a direct performance comparison.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.32646v1 — Original paper

      Excerpt reference: static/papers/2611.32646v1.md:453-536
      Basis: Paper text
      Source SHA-256: 5d8018e95f5186afbaa96dd7536b2ccb222225abd056a926bf2d00cc0cdc9b10

    • 2611.09372v1 — Original paper

      Excerpt reference: static/papers/2611.09372v1.md:221-313
      Basis: Paper text
      Source SHA-256: f581d399a5954473f884f832e46482b9ede354b11386e3a842b1b7729bae8e24

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.