# Bridging Natural Language and Interactive What-If Interfaces via LLM-Generated Declarative Specifications

arXiv: https://arxiv.org/abs/2604.07652 · HTML: https://mlsanity.com/paper/2604.07652/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 17 of its 63 references that are in the map.
- First posted on arXiv 8 Apr 2026.

## Builds on (most cited first, 17 of 17)

- [The What-If Tool: Interactive Probing of Machine Learning Models](https://mlsanity.com/paper/1907.04135/) (2019)
- [NL4DV: A Toolkit for Generating Analytic Specifications for Data Visualization from Natural Language Queries](https://mlsanity.com/paper/2008.10723/) (2020)
- [ChartGPT: Leveraging LLMs to Generate Charts from Abstract Natural Language](https://mlsanity.com/paper/2311.01920/) (2023)
- [DynaVis: Dynamically Synthesized UI Widgets for Visualization Editing](https://mlsanity.com/paper/2401.10880/) (2024)
- [FlowSense: A Natural Language Interface for Visual Data Exploration within a Dataflow System](https://mlsanity.com/paper/1908.00681/) (2019)
- [LEVA: Using Large Language Models to Enhance Visual Analytics](https://mlsanity.com/paper/2403.05816/) (2024)
- [Iris: A Conversational Agent for Complex Tasks](https://mlsanity.com/paper/1707.05015/) (2017)
- [Data Formulator 2: Iterative Creation of Data Visualizations, with AI Transforming Data Along the Way](https://mlsanity.com/paper/2408.16119/) (2024)
- [Directive Explanations for Monitoring the Risk of Diabetes Onset: Introducing Directive Data-Centric Explanations and Combinations to Support What-If Explorations](https://mlsanity.com/paper/2302.10671/) (2023)
- [InChorus: Designing Consistent Multimodal Interactions for Data Visualization on Tablet Devices](https://mlsanity.com/paper/2001.06423/) (2020)
- [SQLucid: Grounding Natural Language Database Queries with Interactive Explanations](https://mlsanity.com/paper/2409.06178/) (2024)
- [Text-to-SQL Domain Adaptation via Human-LLM Collaborative Data Annotation](https://mlsanity.com/paper/2502.15980/) (2025)
- [Augmenting Decision Making via Interactive What-If Analysis](https://mlsanity.com/paper/2109.06160/) (2021)
- [What-if Analysis for Business Professionals: Current Practices and Future Opportunities](https://mlsanity.com/paper/2212.13643/) (2022)
- [HAiVA: Hybrid AI-assisted Visual Analysis Framework to Study the Effects of Cloud Properties on Climate Patterns](https://mlsanity.com/paper/2305.07859/) (2023)
- [Cicero: A Declarative Grammar for Responsive Visualization](https://mlsanity.com/paper/2203.08314/) (2022)
- [PRAXA: A Grammar for What-If Analysis](https://mlsanity.com/paper/2510.09791/) (2025)

## Abstract (arXiv)

What-if analysis (WIA) lets users explore hypothetical scenarios by adjusting parameters, applying constraints, and scoping data through interactive interfaces. Current tools fall short: spreadsheet and BI tools require laborious setup, while LLM-generated interfaces frequently misinterpret analytical intent. It remains unclear whether an explicit intermediate representation is needed, or whether LLMs can generate WIA interfaces directly. We build a benchmark of 405 WIA questions across 11 types and 5 datasets with human-authored ground-truth intent, and find that direct one-shot generation across three LLMs fails to produce a working interface in 17-45% of cases and, when interfaces render, often misrepresents the question's objective (up to 77.5%) and constraints (up to 58.2%). We therefore present a two-stage workflow that translates NL questions into Praxa Specification Language (PSL) specifications, then compiles them into interfaces. Because errors localize to named properties, taxonomy-guided repair raises correctness from 52.42% to 80.42%, unlike errors in directly generated code.
