Chat2VIS: Generating Data Visualizations via Natural Language Using ChatGPT, Codex and GPT-3 Large Language Models

Chat2VIS: создание визуализаций данных на естественном языке с использованием больших языковых моделей ChatGPT, Codex и GPT-3
Teo Sušnjak, Paula Maddigan
2023-01-01

Chat2VISdata visualization generationlarge language modelsnatural language interfacesprompt engineering
The field of data visualisation has long aimed to devise solutions for generating visualisations directly from natural language text. Research in Natural Language Interfaces (NLIs) has contributed towards the development of such techniques. However, the implementation of workable NLIs has always been challenging due to the inherent ambiguity of natural language, as well as in consequence of unclear and poorly written user queries which pose problems for existing language models in discerning user intent. Instead of pursuing the usual path of developing new iterations of language models, this study uniquely proposes leveraging the advancements in pre-trained large language models (LLMs) such as ChatGPT and GPT-3 to convert free-form natural language directly into code for appropriate visualisations. This paper presents a novel system, Chat2VIS, which takes advantage of the capabilities of LLMs and demonstrates how, with effective prompt engineering, the complex problem of language understanding can be solved more efficiently, resulting in simpler and more accurate end-to-end solutions than prior approaches. Chat2VIS shows that LLMs together with the proposed prompts offer a reliable approach to rendering visualisations from natural language queries, even when queries are highly misspecified and underspecified. This solution also presents a significant reduction in costs for the development of NLI systems, while attaining greater visualisation inference abilities compared to traditional NLP approaches that use hand-crafted grammar rules and tailored models. This study also presents how LLM prompts can be constructed in a way that preserves data security and privacy while being generalisable to different datasets. This work compares the performance of GPT-3, Codex and ChatGPT across several case studies and contrasts the performances with prior studies.
1
Chat2VIS converts free-form natural-language queries directly into visualization code using pre-trained LLMs, including ChatGPT, Codex, and GPT-3.
2
Compared with traditional NLI systems using handcrafted grammar rules and tailored models, Chat2VIS provides simpler, more accurate, and more generalizable visualization inference.
3
Effective prompt engineering enables reliable visualization generation even from highly misspecified or underspecified natural-language queries.
4
The proposed prompting strategy can preserve data security and privacy while generalizing across different datasets; GPT-3, Codex, and ChatGPT are compared across multiple case studies.
5
Using pre-trained LLMs substantially reduces the development costs of natural-language visualization interfaces.

Chat2VIS natural-language-to-data-visualization system using large language models

The accuracy, reliability, generalizability, cost, and data-security performance of LLM-driven visualization generation from free-form, underspecified natural-language queries

Publication Details
Publication Date
2023-01-01
Journal
Publisher
ISSN
Cited by
243
Access Type
Author Information
Authors
Teo Sušnjak
Paula Maddigan
Explore further
Open the scid.ai AI chat with a ready-made request: it will find papers on a similar topic and help build a literature review.
Find similar papers in the chat →
Make a presentation
100%