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 a number of case studies and contrasts the performances with prior studies.
翻译:长期以来,数据可视化领域旨在设计直接从自然语言文本产生可视化的解决办法; 自然语言界面(NLIs)研究有助于开发此类技术; 然而,由于自然语言固有的模糊性,以及由于用户的询问不明确和写法差,给现有语言模式在辨别用户意图方面造成了问题,因此,数据可视化领域长期以来旨在设计直接从自然语言文本产生可视化效果的解决方案; 与开发语言模式新迭代的通常途径不同,本研究报告特别建议利用事先培训的大型语言模型(LLLMs)的进步,直接将自由形式的自然语言转换为适合可视化的代码; 然而,由于自然语言界面的内在模糊性,实施可行的国家语言界面的可视化国家语言界面始终具有挑战性; 利用新的系统(Ctal2VIS), 并用更精确的可视化方法来提供从自然语言查询的可视化工具(LMs), 即使这种查询方式是高度错误地保存自然语言的自然语言代码, 也用在常规LLLS 研究中, 展示了更精确的模型的研究, 。