NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Natural Language Dataset Generation Framework for Visualizations Powered by Large Language Models

Hyung-Kwon Ko, Hyeon Jeon, Gwanmo Park, Dae Hyun Kim, Nam Wook Kim, Juho Kim, Jinwook Seo

TL;DR

The VL2NL framework leverages Large Language Models (LLMs) to automate the creation of high-quality natural language (NL) datasets for data visualizations. By transforming complex Vega-Lite specifications into diverse captions, user utterances, and questions, it overcomes the "data bottleneck" that has long hindered the development of intuitive natural language interfaces for data analysis.

What Problem Does This Paper Address?

Natural Language Interfaces (NLIs)—tools that let you say "show me a bar chart of sales by region"—are the "holy grail" of accessible data visualization. However, building these systems requires massive amounts of paired data: a chart specification matched with various human-like text descriptions.

Currently, researchers face a major hurdle: high-quality (chart, NL) datasets are scarce. Existing collections are often synthetic (too repetitive), limited to simple charts (like basic bars or lines), or locked behind private repositories. Crowdsourcing these datasets is a logistical nightmare—expensive, slow, and often lacking the linguistic diversity needed to handle how real people actually talk.

Methods

The authors introduce VL2NL, a three-stage pipeline designed to turn a visualization "program" (Vega-Lite) into rich text:

  1. Preprocessing: The framework minifies raw Vega-Lite JSON code and extracts data from external CSVs to fit within LLM token limits while maintaining the chart's semantic "soul."
  2. Guided Discovery: To prevent the LLM from "hallucinating" or missing details, the authors use scaffolding and key questions. The LLM is prompted to first identify the chart's structure (e.g., is it a composite view?) and then answer specific questions about its encodings and statistical features before generating the final text.
  3. Score-based Paraphrasing: To ensure the dataset isn't robotic, the framework uses a novel paraphrasing technique. It asks the LLM to rewrite sentences along four "language axes": Formality, Clarity, Expertise, and Subjectivity. By assigning scores (1-5) to these axes, the system can generate a wide spectrum of utterances, from "Hey, whip up a graph" (colloquial) to "Delineate the summation of fiscal gain" (technical/formal).

Datasets

  • The New Collection: The authors curated 1,981 real-world Vega-Lite specifications scraped from GitHub. This is the largest human-generated collection to date, featuring "extra complex" charts with multiple views and interactive elements (zooming, panning, linking).
  • Benchmarks: They compared their results against established datasets like Data2Vis, Chartseer, nvBench, and the Vega-Lite Gallery.
  • Gold Standard: For evaluation, they created a "Gold Standard" subset of 48 diverse charts manually annotated by visualization experts.

Key Insights and Ideas

  • Self-Steering LLMs: The "Guided Discovery" approach shows that LLMs are much more accurate when they are forced to "think" through the chart's semantics (marks, channels, transforms) before writing the caption.
  • Linear Interpolation of Language: The idea of treating language style as a set of axes (like formality or expertise) allows for a "controllable" diversity. You don't just get more data; you get data that covers the specific ways different users (from CEOs to students) might interact with a system.
  • Complexity Matters: Most existing research focuses on simple charts. This paper proves that LLMs can handle "extra complex" visualizations—like trellis plots or layered maps—which are common in professional data science but rare in academic datasets.

Key Results

  • High Accuracy: VL2NL extracted chart semantics with 89.4% accuracy and generated L1 captions (basic descriptions) with 76.0% accuracy under strict expert evaluation.
  • Superior Diversity: In lexical tests, the paraphrased datasets contained significantly more unique words and varied sentence structures than traditional crowdsourced benchmarks.
  • Downstream Performance: The authors used VL2NL-generated data to fine-tune a smaller model (OpenAI’s babbage-002). The model trained on a mix of benchmark and VL2NL data achieved 85.4% accuracy on a chart classification task, outperforming models trained on human-only data (76.3%). This suggests "teaching via data" from an LLM is a viable path for training specialized, smaller models.

Limitations and Future Work

  • Vega-Lite Dependency: The framework is only as good as the input code. If a Vega-Lite spec has a typo or non-functional code, the LLM will faithfully (and incorrectly) describe that error.
  • Lack of Domain Context: Since the system only looks at the chart spec, it lacks "world knowledge." It can describe a trend in a stock chart but might not know why that trend happened (e.g., a specific historical event).
  • Future Directions: The authors plan to expand the framework to support conversational NL datasets (multi-turn dialogues) and integrate external knowledge bases to generate deeper, "Level 4" insights that include domain-specific context.

Summary updated

BibTeX
@inproceedings{ko2024natural,
  author = {Hyung-Kwon Ko and Hyeon Jeon and Gwanmo Park and Dae Hyun Kim and Nam Wook Kim and Juho Kim and Jinwook Seo},
  title = {{Natural Language Dataset Generation Framework for Visualizations Powered by Large Language Models}},
  booktitle = {CHI},
  year = {2024},
  doi = {10.1145/3613904.3642943},
}
Figure