Natural Language Interfaces for Tabular Data Querying and Visualization: A Survey

Weixu Zhang, Yifei Wang, Yuanfeng Song, Victor Junqiu Wei, Yuxing Tian, Yiyan Qi, Jonathan H. Chan, Raymond Chi-Wing Wong, Haiqin Yang

TL;DR

This survey provides a comprehensive roadmap of Natural Language Interfaces (NLIs) for tabular data, unifying the historically separate fields of Text-to-SQL (data querying) and Text-to-Vis (data visualization). It traces the evolution of these technologies from rigid, rule-based systems to modern Large Language Models (LLMs), offering a structured framework across datasets, methodologies, evaluation metrics, and system architectures.

What Problem Does This Paper Address?

Tabular data is the backbone of modern industries, yet extracting insights from databases typically requires specialized technical skills—either writing structured queries (like SQL) or manually coding visualization scripts (using libraries like Vega-Lite or D3.js). Natural Language Interfaces (NLIs) aim to democratize data access by allowing users to query and visualize data using plain text.

While Text-to-SQL and Text-to-Vis are fundamentally similar semantic parsing tasks—both translating natural language into an executable functional representation—they have traditionally been studied in isolation. Furthermore, the rapid rise of LLMs has completely shifted the paradigm of how these interfaces are built, moving away from custom neural network architectures toward prompt engineering and task decomposition. This paper addresses the lack of a unified framework that connects querying and visualization while evaluating the profound impact of the LLM era.

Schematic representation of natural language interfaces for tabular data querying and visualization

Methods

The authors categorize the evolution of NLI technologies into three distinct historical stages:

  1. Traditional Stage: Early systems relied on handcrafted, rule-based mapping or template-based slot filling. While highly interpretable, they lacked flexibility and failed when faced with minor variations in user phrasing.
  2. Neural Network Stage: The introduction of Sequence-to-Sequence (Seq2Seq) models allowed systems to learn data mappings implicitly. This stage introduced specialized Sequence-based (LSTM, Transformer) and Graph-based encoders designed to capture complex database schema relationships (tables, columns, and foreign keys), alongside grammar-based or execution-guided decoders to ensure syntactically valid outputs.
  3. Foundation Model Stage:
  4. PLM-based: Fine-tuning Pretrained Language Models (like BERT or T5) using specialized tabular objectives (e.g., predicting masked column names or schema linking).
  5. LLM-based: Utilizing state-of-the-art models (like ChatGPT or PaLM) via advanced prompting techniques. Instead of modifying model weights, these methods focus on In-Context Learning (ICL), Chain-of-Thought (CoT) reasoning, and Task Decomposition (e.g., breaking a query down into schema linking, skeleton generation, and iterative error correction).

Datasets

The survey compiles and categorizes a vast array of benchmarks based on their complexity:

  • Text-to-SQL Benchmarks: Traced from early single-domain datasets (ATIS, GeoQuery) to massive cross-domain benchmarks like WikiSQL and Spider. It also highlights multi-turn conversational datasets (SParC, CoSQL), multilingual variants, and recent knowledge-intensive benchmarks like BIRD, which emphasizes dirty/real-world database values and external knowledge grounding.
  • Text-to-Vis Benchmarks: A less mature landscape where many datasets piggyback off Text-to-SQL efforts. Notable mentions include nvBench (the largest cross-domain Text-to-Vis dataset, synthesized from Spider), ChartDialogs (for multi-turn plotting), and CNvBench (a Chinese localized variant).

Key Insights and Ideas

  • The Semantic Parsing Unity: At their core, both querying and visualization translate an unstructured natural language query ($q$) into a functional expression ($e$) to be executed by an engine ($E$) on a database ($D$). In practice, querying is almost always an implicit sub-step of visualization, as data must be retrieved before it can be displayed.
  • The Death of Custom Architecture: In the neural network stage, researchers spent immense effort designing complex graph neural networks to encode database schemas. In the LLM era, this architectural complexity has been replaced by clever prompt engineering and multi-stage agent workflows (e.g., the DIN-SQL framework).
  • The "Robustness" Gap: There is a stark contrast between a model's performance on clean academic benchmarks and its utility in the wild. Real-world databases contain content inconsistencies, schema ambiguities, and require domain-specific commonsense reasoning that standard text-matching metrics fail to capture.
Example of the process of translating natural language queries to SQL and visualization specifications on sales data.

Key Results

The paper provides a comparative look at benchmark performance across eras:

  • Text-to-SQL (Spider Benchmark): Early graph-based neural networks (like GNN) scored around 40.7% exact match. Advanced PLM-based fine-tuning (like RESDSQL) pushed this to 80.5%. Modern LLM prompting approaches achieve highly competitive zero-shot/few-shot performance (e.g., SC-Prompt at 76.9%) without any weight updates.
  • Text-to-Vis (nvBench Benchmark): Early end-to-end neural generation struggled immensely (Seq2Vis at 1.95% accuracy). Specialized architectures like ncNet (25.78%) and RGVisNet (44.9%) showed massive improvements, while recent in-context learning approaches with LLMs (Prompt4Vis) have pushed accuracy to 52.69%.

Limitations and Future Work

  • Text-to-Vis Data Scarcity: Unlike Text-to-SQL, Text-to-Vis lacks diverse, organically generated datasets. Most existing benchmarks are synthetically derived from SQL datasets, which limits their ability to capture how users naturally express visualization intents.
  • Evaluation Blindspots: String-based metrics (like exact match) penalize valid alternative queries, while execution-based metrics can suffer from false positives. For visualization, automated metrics struggle to evaluate subjective qualities like aesthetic appeal and cognitive clarity, necessitating expensive user studies.
  • Multimodal and Integrated Systems: The authors point to a future where NLIs are not just text-boxes but multimodal systems accepting voice, gestures, and images, seamlessly integrated with broader capabilities like automated document summarization and proactive recommendation engines.

Summary updated

BibTeX
@article{zhang2024natural,
  author = {Weixu Zhang and Yifei Wang and Yuanfeng Song and Victor Junqiu Wei and Yuxing Tian and Yiyan Qi and Jonathan H. Chan and Raymond Chi-Wing Wong and Haiqin Yang},
  title = {{Natural Language Interfaces for Tabular Data Querying and Visualization: A Survey}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2024},
  url = {https://openreview.net/forum?id=sT62CcpaRr},
}
Figure