Prompt4Vis: Prompting Large Language Models with Example Mining and Schema Filtering for Tabular Data Visualization
作者: Shuaimin Li, Xuanang Chen, Yuanfeng Song, Yunze Song, Chen Zhang
分类: cs.HC, cs.AI, cs.CL, cs.DB
发布日期: 2024-01-29
💡 一句话要点
提出Prompt4Vis以提升自然语言到数据可视化的转换效果
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 数据可视化 自然语言处理 大型语言模型 上下文学习 示例挖掘 模式过滤 机器学习
📋 核心要点
- 现有的自然语言到数据可视化的转换方法,如Seq2Vis和RGVisNet,尽管使用了复杂的神经网络架构,但仍存在性能不足的问题。
- 本文提出的Prompt4Vis框架通过引入大型语言模型和上下文学习,旨在提升自然语言生成数据可视化查询的效果。
- 在NVBench数据集上进行的5折交叉验证实验表明,Prompt4Vis在开发集和测试集上分别超越了RGVisNet约35.9%和71.3%。
📝 摘要(中文)
数据可视化系统在揭示大数据集中的洞察力方面越来越受到重视。现有的自然语言处理方法在将自然语言问题转换为数据可视化查询时效果不佳。为此,本文提出了一种新框架Prompt4Vis,利用大型语言模型和上下文学习,增强从自然语言生成数据可视化的能力。Prompt4Vis包含多目标示例挖掘模块和模式过滤模块,通过在NVBench数据集上的实验,显著超越了现有最先进的RGVisNet模型。
🔬 方法详解
问题定义:本文旨在解决现有自然语言处理方法在将自然语言问题转换为数据可视化查询时的性能不足,尤其是在示例选择和模式简化方面的挑战。
核心思路:Prompt4Vis通过引入大型语言模型和上下文学习,利用有效示例的挖掘和数据库模式的简化,增强了文本到可视化的转换能力。
技术框架:Prompt4Vis包含两个主要模块:多目标示例挖掘模块和模式过滤模块。前者用于识别有效示例以增强学习能力,后者则简化数据库模式以提高查询效率。
关键创新:Prompt4Vis是首个将上下文学习引入文本到可视化生成的工作,显著提升了生成查询的准确性和效率。
关键设计:在示例挖掘模块中,设计了多目标优化策略以选择最有效的示例;模式过滤模块则通过简化数据库模式,减少了用户输入的复杂性,从而提高了系统的可用性。
🖼️ 关键图片
📊 实验亮点
在NVBench数据集上的实验结果显示,Prompt4Vis在开发集和测试集上分别超越了最先进的RGVisNet模型约35.9%和71.3%,展示了其在自然语言到数据可视化转换中的显著性能提升。
🎯 应用场景
该研究的潜在应用领域包括商业智能、数据分析和可视化工具开发。Prompt4Vis可以帮助用户更直观地从复杂数据中提取信息,提升数据可视化的易用性和效率,具有广泛的实际价值和未来影响。
📄 摘要(原文)
Data visualization (DV) systems are increasingly recognized for their profound capability to uncover insights from vast datasets, gaining attention across both industry and academia. Crafting data queries is an essential process within certain declarative visualization languages (DVLs, e.g., Vega-Lite, EChart.). The evolution of natural language processing (NLP) technologies has streamlined the use of natural language interfaces to visualize tabular data, offering a more accessible and intuitive user experience. However, current methods for converting natural language questions into data visualization queries, such as Seq2Vis, ncNet, and RGVisNet, despite utilizing complex neural network architectures, still fall short of expectations and have great room for improvement. Large language models (LLMs) such as ChatGPT and GPT-4, have established new benchmarks in a variety of NLP tasks, fundamentally altering the landscape of the field. Inspired by these advancements, we introduce a novel framework, Prompt4Vis, leveraging LLMs and in-context learning to enhance the performance of generating data visualization from natural language. Prompt4Vis comprises two key components: (1) a multi-objective example mining module, designed to find out the truly effective examples that strengthen the LLM's in-context learning capabilities for text-to-vis; (2) a schema filtering module, which is proposed to simplify the schema of the database. Extensive experiments through 5-fold cross-validation on the NVBench dataset demonstrate the superiority of Prompt4Vis, which notably surpasses the state-of-the-art (SOTA) RGVisNet by approximately 35.9% and 71.3% on dev and test sets, respectively. To the best of our knowledge, Prompt4Vis is the first work that introduces in-context learning into the text-to-vis for generating data visualization queries.