VisQ2SQL: Towards SQL-Driven Data Visualization via LLMs-Grounded Preference Learning

Text-to-Visualization (Text2Vis) aims to democratize data insights for non-expert users by transforming natural language query (NLQ) into visualization specification (VS). In view of the high dependence of rule-based methods on predefined VS templates and poor NLQ understanding ability of small data-driven methods, recent works resort to leveraging pre-trained LLMs to perform NLQ-understanding and VS-generating in Text2Vis tasks via prompt-guided in-context learning. However, existing LLM-based methods still fall short of satisfactory end-to-end Text2Vis performances primarily owing to the limited ability of pre-trained LLMs in directly retrieving and operating NLQ-intended tabular data. Inspired by the SQL generating ability born with latest LLMs, this paper proposes the idea of harnessing LLMs for SQL-driven visualization data retrieval and operation. Nonetheless, there remains a nonneglectable gap between data visualization queries in Text2Vis tasks and SQL retrieving queries in LLM corpus. To fill the gap, this paper proposes a Visualization Query to SQL (VisQ2SQL) framework to obtain NLQ-intended data, primarily by fine-tuning LLMs through preference learning data-retrieval SQLs induced from VS and those generated by LLMs. We conduct extensive experiments to demonstrate the superiority of VisQ2SQL over SOTA methods, and various ablation studies to verify the efficacy of VisQ2SQL.

Authors

Institutions

Publication Details

Published
2025-03-12
DOI
https://doi.org/10.1109/icassp49660.2025.10888696
Primary Topic
Data Mining Algorithms and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

VisQ2SQL: Towards SQL-Driven Data Visualization via LLMs-Grounded Preference Learning

Jun Hu, Tao Ren, Shengze Shi
Data Mining Algorithms and Applications
article

VisQ2SQL: Towards SQL-Driven Data Visualization via LLMs-Grounded Preference Learning

Jun Hu, Tao Ren, Shengze Shi
article en

Abstract

Text-to-Visualization (Text2Vis) aims to democratize data insights for non-expert users by transforming natural language query (NLQ) into visualization specification (VS). In view of the high dependence of rule-based methods on predefined VS templates and poor NLQ understanding ability of small data-driven methods, recent works resort to leveraging pre-trained LLMs to perform NLQ-understanding and VS-generating in Text2Vis tasks via prompt-guided in-context learning. However, existing LLM-based methods still fall short of satisfactory end-to-end Text2Vis performances primarily owing to the limited ability of pre-trained LLMs in directly retrieving and operating NLQ-intended tabular data. Inspired by the SQL generating ability born with latest LLMs, this paper proposes the idea of harnessing LLMs for SQL-driven visualization data retrieval and operation. Nonetheless, there remains a nonneglectable gap between data visualization queries in Text2Vis tasks and SQL retrieving queries in LLM corpus. To fill the gap, this paper proposes a Visualization Query to SQL (VisQ2SQL) framework to obtain NLQ-intended data, primarily by fine-tuning LLMs through preference learning data-retrieval SQLs induced from VS and those generated by LLMs. We conduct extensive experiments to demonstrate the superiority of VisQ2SQL over SOTA methods, and various ablation studies to verify the efficacy of VisQ2SQL.

Chinese Academy of Sciences (CN), Institute of Software (CN)
Openalex Percentile: Top 95%
Data Mining Algorithms and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.