Natural Language Query-Based Data Visualization Using LLM and Tableau
DOI: https://doi.org/10.10399/JBSE.2026582361
Keywords:
Natural language interfaces, Data visualization, Large language models, Tableau, Retrieval-augmented generation, Schema grounding
Abstract:
Business intelligence platforms such as Tableau give analysts rich interactive visualization capability, but authoring a well-formed view still requires knowing which fields exist in a data source and how they should be aggregated and encoded. Large language models (LLMs) make it possible to accept far more open-ended natural language queries than earlier grammar-based interfaces, but prompting an LLM directly for a visualization specification introduces a chart-authoring analogue of hallucination: the model can produce a fluent specification that references fields, aggregations, or filter values that do not exist in the target data source. This paper proposes a natural-language-query-based visualization pipeline for Tableau that combines an LLM-based semantic parser with a retrieval-augmented example bank of prior verified natural-language-to-VizQL mappings, an explicit schema-grounding and field-validation layer, and an ambiguity-resolution stage that seeks clarification or applies principled defaults for underspecified queries, before rendering the validated specification through Tableau's Embedding and Extensions APIs. Drawing on established natural-language-to-visualization (NL2VIS) and LLM-for-visualization literature, the study defines seven evaluation criteria — Visualization Generation Accuracy, Specification Precision, Query Coverage Recall, F1 Score, Hallucinated-Field Rate, schema-validation-layer AUC-ROC, and a combined NL-to-Viz Reliability Score — and applies them to an illustrative case study of a self-service business intelligence deployment. A five-configuration ablation study, spanning a direct LLM-to-specification baseline through a deliberately over-engineered pipeline, is used to identify the point of diminishing returns, and the recommended configuration is benchmarked directly against the direct baseline, including performance under a stress test of complex and ambiguous multi-attribute queries. The illustrative results indicate substantially higher recall, F1 Score, and a markedly lower hallucinated-field rate for the proposed pipeline relative to the baseline, with the largest relative improvement occurring on complex, ambiguous queries. The findings position retrieval-augmented, schema-grounded LLM generation as a foundational design practice for organizations deploying natural-language query interfaces on top of production business intelligence platforms such as Tableau.




