arXiv:2502.11140cs.SEcs.AI2025-02中稿 · International Conf…被引 5

用多路径推理和反馈优化,让AI自动生成更可靠的可视化代码。

Automated Visualization Code Synthesis via Multi-Path Reasoning and Feedback-Driven Optimization

  • 通过多路径并行生成多种查询变体,拓展模糊需求
  • 执行候选代码并评估图像质量,生成针对性反馈
  • 在两个基准上优于现有方法,适合需要低人工干预的场景

大型语言模型(LLMs)已成为自动化可视化代码生成的核心技术,使用户可通过自然语言指令生成图表。尽管已有少量提示和查询扩展等改进,现有方法在请求缺乏具体细节(如数据预处理假设、求解器或库的选择等)时仍表现不佳,常需人工干预。为此,我们提出VisPath:一种基于多路径推理与反馈驱动优化的可视化代码生成框架。VisPath通过结构化多阶段处理解决需求不明确问题:首先使用思维链(CoT)提示重述用户输入,生成多个并行扩展查询,以揭示请求的多种合理实现可能;这些查询生成候选可视化脚本,并执行以产出多样图像;通过评估每项输出的视觉质量和正确性,生成有针对性的反馈并聚合,最终合成最优结果。在MatPlotBench和Qwen-Agent Code Interpreter Benchmark上的大量实验表明,VisPath优于当前最先进的方法,为AI驱动的可视化生成提供了更可靠的框架。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have become a cornerstone for automated visualization code generation, enabling users to create charts through natural language instructions. Despite improvements from techniques like few-shot prompting and query expansion, existing methods often struggle when requests are underspecified in actionable details (e.g., data preprocessing assumptions, solver or library choices, etc.), frequently necessitating manual intervention. To overcome these limitations, we propose VisPath: a Multi-Path Reasoning and Feedback-Driven Optimization Framework for Visualization Code Generation. VisPath handles underspecified queries through structured, multi-stage processing. It begins by using Chain-of-Thought (CoT) prompting to reformulate the initial user input, generating multiple extended queries in parallel to surface alternative plausible concretizations of the request. These queries then generate candidate visualization scripts, which are executed to produce diverse images. By assessing the visual quality and correctness of each output, VisPath generates targeted feedback that is aggregated to synthesize an optimal final result. Extensive experiments on MatPlotBench and Qwen-Agent Code Interpreter Benchmark show that VisPath outperforms state-of-the-art methods, providing a more reliable framework for AI-driven visualization generation.

可视化生成多路径推理反馈优化

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