English

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

Software Engineering 2026-01-13 v3 Artificial Intelligence Computation and Language Human-Computer Interaction

Abstract

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.

Keywords

Cite

@article{arxiv.2502.11140,
  title  = {Automated Visualization Code Synthesis via Multi-Path Reasoning and Feedback-Driven Optimization},
  author = {Wonduk Seo and Daye Kang and Hyunjin An and Taehan Kim and Soohyuk Cho and Seungyong Lee and Minhyeong Yu and Jian Park and Yi Bu and Seunghyun Lee},
  journal= {arXiv preprint arXiv:2502.11140},
  year   = {2026}
}

Comments

15 pages