arXiv:2507.01436cs.HCcs.AI2025-07被引 5

用大模型自动改写图表代码,降低数据迁移门槛

Challenges & Opportunities with LLM-Assisted Visualization Retargeting

  • 让大模型根据提示直接生成适配新数据的图表代码
  • 复杂图表和未清洗数据下成功率显著下降
  • 适合想快速复用图表但不熟悉编程的研究者

尽管网络上充斥着大量可视化示例,将现有图表代码迁移到新数据集仍困难、耗时且繁琐。该过程要求作者既熟悉示例代码,又了解如何转换新数据以适配代码。随着大语言模型(LLMs)的发展,可通过高阶用户提示实现代码的自动适配,从而降低可视化重用门槛。为深入理解大模型在辅助图表重定向中的潜力与局限,我们对多种数据集和复杂度的图表进行了评估,分类分析了失败类型与严重程度。实验比较了两种方法:(1)直接将代码作为文本输入,指令模型完整生成并适配代码;(2)更受限的程序合成流程,模型基于示例代码和数据特性提供结构信息(如视觉编码)。结果表明,当新数据未被适当预处理时,两种方法均表现不佳,并提出了未来重定向系统的设计建议。

原文摘要 · Abstract (English)

Despite the ubiquity of visualization examples published on the web, retargeting existing custom chart implementations to new datasets remains difficult, time-intensive, and tedious. The adaptation process assumes author familiarity with both the implementation of the example as well as how the new dataset might need to be transformed to fit into the example code. With recent advances in Large Language Models (LLMs), automatic adaptation of code can be achieved from high-level user prompts, reducing the barrier for visualization retargeting. To better understand how LLMs can assist retargeting and its potential limitations, we characterize and evaluate the performance of LLM assistance across multiple datasets and charts of varying complexity, categorizing failures according to type and severity. In our evaluation, we compare two approaches: (1) directly instructing the LLM model to fully generate and adapt code by treating code as text inputs and (2) a more constrained program synthesis pipeline where the LLM guides the code construction process by providing structural information (e.g., visual encodings) based on properties of the example code and data. We find that both approaches struggle when new data has not been appropriately transformed, and discuss important design recommendations for future retargeting systems.

可视化大模型代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。