Visualization authoring often requires troubleshooting support due to its complex parameter adjustments. This paper investigates two approaches for visualization troubleshooting:
- Human-assisted support via forums like Stack Overflow
- AI-assisted support using Large Language Models (LLMs)
Through analyzing 889 Vega-Lite cases from Stack Overflow, we explore the effectiveness of both approaches.
Our findings reveal that human-assisted troubleshooting provides context-sensitive but variable-quality advice, while AI-assisted troubleshooting offers rapid feedback but often requires additional contextual resources for optimal results.
We outline four questions ranging from understanding common troubleshooting issues faced by users to evaluating the effectiveness of LLMs in providing solutions.
To explore the role of human-assisted visualization troubleshooting, we address two key research questions:
- Specifically, we aim to categorize the common challenges users face, such as syntax errors or design-related issues, to better understand the gaps between user-created defective visualizations and their desired outcomes.
- Specifically, we investigate the accuracy and practicality of human responses, evaluating whether the solutions adequately resolve users’ issues.
To evaluate the potential and limitations of LLMs in this task, we ask the following questions:
Q3: To what extent can LLMs provide comparable or improved troubleshooting support for the same questions?
- We evaluate whether LLMs can match or surpass the quality of human responses in Q&A forums for visualization troubleshooting tasks.
Q4: How do supplementary resources, such as documentation and example galleries, impact the effectiveness of LLMs assistance?
- We explore how the integration of external resources influences the quality of LLM-based solutions.
- [2024-12-07] We open-source our code.
We collect and curate real-world datasets from Stack Overflow to investigate the four questions outlined above.
-
Data Collection
- Crawled 889 Vega-Lite related cases from Stack Overflow
- Each case contains question description and its best answer
-
Data Processing
- Filtered 758 troubleshooting-related cases (Q1)
- Validated and extracted 288 cases with valid answer codes (Q2, Q3)
- Enhanced 47 cases with documentation and examples (Q4)
All datasets are available in the dataset/
directory:
1_All_cases/
: Original 889 Stack Overflow cases2_Troubleshooting_cases/
: 758 troubleshooting-related cases3_validCode_cases/
: 288 cases with valid answer codes4_DocEx_cases/
: 47 cases with documentation and examples
Code/
: Question classification related codeGenerate_Question.py
: Generate question classifications
Output/
: Classification results
Operation_classfication/
Code/
: Operation classification related codeOutput/
: Classification resultscategories.json
: Operation category definitions
Code_complexity/
Code/
: Code complexity related codeOutput/
: Code complexity results
experiement/
: Experiment related codeL0_experiement.py
: Level 0 experiment code
output/
: Experiment resultsL0_solutions.json
: Level 0 experiment resultsL0_solutions_visualization
: The visualization of Level 0 experiment resultsevaluation_analysis.xlsx
: Human evaluation results
experiement/
: Experiment codeL1_experiement_document.py
: Level 1 document experimentL1_experiement_example.py
: Level 1 example experimentL1_experiement_prec_document.py
: Level 1 precise document experimentL1_experiement_prec_example.py
: Level 1 precise example experimentL2_experiement_document_example.py
: Level 2 document and example experiment
results/
: Experiment resultsgenerated_answers_level_1_document.json
: Level 1 document experiment resultsgenerated_answers_level_1_example.json
: Level 1 example experiment resultsgenerated_answers_level_1_prec_document.json
: Level 1 precise document experiment resultsgenerated_answers_level_1_prec_example.json
: Level 1 precise example experiment resultsgenerated_answers_level_2_document_example.json
: Level 2 document and example experiment resultslevel_pic/
: The visualization of several experiment resultsAns_label.xlsx
: Human evaluation results
execute_PNG_Code/
: Visualization result generation codedirect_execute_Vega_PNG.py
: Generate PNG images from Vega-liteexecute_Vega_PNG_json.py
: Generate PNG images from Vega-lite In JSONexecute_Vega_PNG_xlsx.py
: Generate PNG images from Vega-lite In Excel
- Python version
Python 3.9.17
- Install dependencies
pip install -r requirements.txt
- Configure environment variables
Create a
.env
file in the root directory:
OPENAI_API_KEY="your-api-key-here"
OPENAI_BASE_URL="your-base-url-here"
- Run Question Classification Analysis:
python Q1/Code/Generate_Question.py
- Run Operation Classification Analysis:
python Q2/Operation_classfication/Code/Generate_Operation.py
- Run L0_Experiments:
python Q3/experiement/L0_experiement.py
- Run L1_L2_Experiments:
python Q4/experiement/L1_experiement_document.py
python Q4/experiement/L1_experiement_example.py
python Q4/experiement/L1_experiement_prec_document.py
python Q4/experiement/L1_experiement_prec_example.py
python Q4/experiement/L2_experiement_document_example.py
- Generate Visualization Results:
python execute_PNG_Code/direct_execute_Vega_PNG.py
@misc{2412.07673,
Author = {Shuyu Shen and Sirong Lu and Leixian Shen and Zhonghua Sheng and Nan Tang and Yuyu Luo},
Title = {Ask Humans or AI? Exploring Their Roles in Visualization Troubleshooting},
Year = {2024},
Eprint = {arXiv:2412.07673},
}