NL2Viz: Natural Language to Visualization via Constrained Syntax-Guided Synthesis

FSE |

Organized by ACM

Recent development in NL2Code (Natural Language to Code) research allows end-users, especially novice programmers to create a concrete implementation of their ideas such as data visualization by providing natural language (NL) instructions. An NL2Code system often fails to achieve its goal due to three major challenges: the user’s words have contextual semantics, the user may not include all details needed for code generation, and the system results are imperfect and require further refinement. To address the aforementioned three challenges for NL to Visualization, we propose a new approach named NL2Viz with three salient features: (1) leveraging not only the user’s NL input but also the data and code context that the NL query is upon, (2) using hard/soft constraints to reflect different confidence in the constraints retrieved from the user input and data/code context, and (3) providing support for result refinement and reuse. We implement a tool for NL2Viz in the Jupyter Notebook environment and evaluate NL2Viz on a real-world visualization benchmark and a public dataset to show the effectiveness of NL2Viz. We also conduct a user study involving 6 data scientist professionals to demonstrate the usability of NL2Viz, the readability of the generated code, and NL2Viz’s effectiveness in helping users generate desired visualizations effectively and efficiently.