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 · DOI

Abstract

This paper provides a comprehensive roadmap for Natural Language Interfaces (NLIs) designed for structured data interaction. It synthesizes the traditionally separate domains of data querying (Text-to-SQL) and visualization (Text-to-Vis), highlighting how Large Language Models (LLMs) are redefining the state-of-the-art through reasoning, task decomposition, and prompt engineering.

Introduction: Bridging the Semantic Gap

Tabular data serves as the foundation of modern industry, yet accessing insights often requires specialized knowledge of SQL or visualization libraries like D3.js. This "technical tax" creates a barrier for non-expert users. The primary challenge in building NLIs is the "semantic gap": natural language is inherently ambiguous, whereas databases require strict formal specifications. Effective systems must perform "schema linking"—accurately mapping vague user terms (e.g., "earnings") to specific database columns (e.g., total_revenue_net). This survey addresses the methodologies, datasets, and evaluation metrics developed to overcome these hurdles.

The Evolution of NLI Methodologies

The development of NLIs has progressed through three distinct stages, moving from rigid translation to sophisticated reasoning:

  1. Traditional Stage: Relied on hand-crafted rules and templates. While interpretable, these systems were brittle and failed when users deviated from predefined phrasing.
  2. Neural Network Stage: Introduced Sequence-to-Sequence (Seq2Seq) models. Key innovations included Graph Neural Networks (GNNs) for encoding complex database schemas and grammar-based decoders to ensure syntactically valid output.
  3. Foundation Model Stage: The current frontier utilizes Pre-trained Language Models (PLMs) and Large Language Models (LLMs). Rather than simple fine-tuning, this stage emphasizes "prompting" techniques like Chain-of-Thought (CoT) and task decomposition (e.g., DIN-SQL) to break complex queries into manageable sub-problems.
Evolutionary timeline of Text-to-SQL and Text-to-Vis parsing techniques.

Benchmarking and Datasets

The survey highlights a trend toward increasing complexity in evaluation benchmarks. In Text-to-SQL, the field has moved from simple single-table datasets like WikiSQL to the cross-domain, multi-table Spider benchmark, and more recently to BIRD, which focuses on "knowledge-intensive" queries requiring external reasoning. In Text-to-Vis, nvBench stands as the primary cross-domain testing ground, synthesized to provide robust evaluation for visualization tasks.

Integrated Querying and Visualization

A core insight of this survey is the intertwined nature of querying and visualization. In practice, a user must often query the data (SQL) before it can be visualized (Vis Spec). Modern systems are increasingly treating these as a unified pipeline. This integration allows for "Execution-Guided Decoding," where the system runs generated code against a sample database and uses the feedback to self-correct errors.

Example of a unified pipeline for natural language querying and visualization.

Key Results and Future Frontiers

LLM-based approaches have significantly advanced the state-of-the-art. On the Spider benchmark, models like DIN-SQL have achieved record-high Exact Match (EM) scores. Similarly, Text-to-Vis accuracy on nvBench has jumped from approximately 25% with early neural models to over 50% using LLM-based prompt engineering.

Despite these gains, several challenges remain:

  • Robustness: Systems remain sensitive to adversarial inputs or confusing schema names.
  • Knowledge Grounding: Models struggle with domain-specific common sense (e.g., defining "recent" as a specific date range).
  • Multimodal Interaction: Future work points toward interfaces that incorporate voice, gestures, and interactive "human-in-the-loop" refinement to create more intuitive data exploration experiences.

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