V-RECS, a Low-Cost LLM4VIS Recommender with Explanations, Captioning and Suggestions
Luca Podo, Marco Angelini, Paola Velardi
TL;DR
V-RECS addresses NL2VIS challenges by delivering a low-cost, explainable visualization recommender that outputs not only a visualization but also explanations, captions, and exploration suggestions. It employs a teacher-student Chain-of-Thought framework, using GPT-4 to generate narrative-rich training data and fine-tunes a small Llama-2-7B model via QLoRA to emulate this behavior, enabling scalable deployment. Evaluations on NvBench with the EvaLLM framework show V-RECS achieving comparable performance to GPT-4 on most metrics while delivering superior axis correctness and richer explanations, albeit with some captions lagging behind. The work provides a practical, open-source pipeline for narrative-enabled visualization generation and highlights pathways for integrating LLM4VIS into real-world visualization and visual analytics workflows.
Abstract
NL2VIS (natural language to visualization) is a promising and recent research area that involves interpreting natural language queries and translating them into visualizations that accurately represent the underlying data. As we navigate the era of big data, NL2VIS holds considerable application potential since it greatly facilitates data exploration by non-expert users. Following the increasingly widespread usage of generative AI in NL2VIS applications, in this paper we present V-RECS, the first LLM-based Visual Recommender augmented with explanations(E), captioning(C), and suggestions(S) for further data exploration. V-RECS' visualization narratives facilitate both response verification and data exploration by non-expert users. Furthermore, our proposed solution mitigates computational, controllability, and cost issues associated with using powerful LLMs by leveraging a methodology to effectively fine-tune small models. To generate insightful visualization narratives, we use Chain-of-Thoughts (CoT), a prompt engineering technique to help LLM identify and generate the logical steps to produce a correct answer. Since CoT is reported to perform poorly with small LLMs, we adopted a strategy in which a large LLM (GPT-4), acting as a Teacher, generates CoT-based instructions to fine-tune a small model, Llama-2-7B, which plays the role of a Student. Extensive experiments-based on a framework for the quantitative evaluation of AI-based visualizations and on manual assessment by a group of participants-show that V-RECS achieves performance scores comparable to GPT-4, at a much lower cost. The efficacy of the V-RECS teacher-student paradigm is also demonstrated by the fact that the un-tuned Llama fails to perform the task in the vast majority of test cases. We release V-RECS for the visualization community to assist visualization designers throughout the entire visualization generation process.
