From Text to Visuals: Using LLMs to Generate Math Diagrams with Vector Graphics
Not on the map. Why?
Abstract (arXiv)
Advances in large language models (LLMs) offer new possibilities for enhancing math education by automating support for both teachers and students. While prior work has focused on generating math problems and high-quality distractors, the role of visualization in math learning remains under-explored. Diagrams are essential for mathematical thinking and problem-solving, yet manually creating them is time-consuming and requires domain-specific expertise, limiting scalability. Recent research on using LLMs to generate Scalable Vector Graphics (SVG) presents a promising approach to automating diagram creation. Unlike pixel-based images, SVGs represent geometric figures using XML, allowing seamless scaling and adaptability. Educational platforms such as Khan Academy and IXL already use SVGs to display math problems and hints. In this paper, we explore the use of LLMs to generate math-related diagrams that accompany textual hints via intermediate SVG representations. We address three research questions: (1) how to automatically generate math diagrams in problem-solving hints and evaluate their quality, (2) whether SVG is an effective intermediate representation for math diagrams, and (3) what prompting strategies and formats are required for LLMs to generate accurate SVG-based diagrams. Our contributions include defining the task of automatically generating SVG-based diagrams for math hints, developing an LLM prompting-based pipeline, and identifying key strategies for improving diagram generation. Additionally, we introduce a Visual Question Answering-based evaluation setup and conduct ablation studies to assess different pipeline variations. By automating the math diagram creation, we aim to provide students and teachers with accurate, conceptually relevant visual aids that enhance problem-solving and learning experiences.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 11 of its 29 references that are in the map. First posted on arXiv 10 Mar 2025.
Builds on
11 of 29 references.
References · 11
- 2015VQA: Visual Question Answeringcited by 2,489
- 2023G-LLaVA: Solving Geometric Problem with Multi-Modal Large Language Modelcited by 208
- 2024Orca-Math: Unlocking the potential of SLMs in Grade School Mathcited by 151
- 2023AutomaTikZ: Text-Guided Synthesis of Scientific Vector Graphics with TikZcited by 74
- 2022Automatic Generation of Socratic Subquestions for Teaching Math Word Problemscited by 42
- 2024GeoGPT4V: Towards Geometric Multi-modal Large Language Models with Geometric Image Generationcited by 31
- 2024AutoGeo: Automating Geometric Image Dataset Creation for Enhanced Geometry Understandingcited by 28
- 2024SVGEditBench: A Benchmark Dataset for Quantitative Assessment of LLM's SVG Editing Capabilitiescited by 25
- 2024Improving the Validity of Automatically Generated Feedback via Reinforcement Learningcited by 20
- 2024Exploring Automated Distractor Generation for Math Multiple-choice Questions via Large Language Modelscited by 15
- 2024Math Multiple Choice Question Generation via Human-Large Language Model Collaborationcited by 9
Built on by
Citing papers per year: 2025: 4; 2026: 1.
5 papers.
- 2025StructEval: Benchmarking LLMs' Capabilities to Generate Structural Outputscited by 23
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025DiagramIR: An Automatic Pipeline for Educational Math Diagram Evaluationcited by 3
- 2025TechImage-Bench: Rubric-Based Evaluation for Technical Image Generationcited by 2
- 2026Math-Vision Diagrams: A Comprehensive Benchmark for Evaluating LLM Mathematical Diagram Generation Capabilitiescited by 0
- 2026Math-Vision Diagrams: A Comprehensive Benchmark for Evaluating LLM Mathematical Diagram Generation Capabilities9 Aug 2026
- 2025TechImage-Bench: Rubric-Based Evaluation for Technical Image Generation13 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025DiagramIR: An Automatic Pipeline for Educational Math Diagram Evaluation11 Nov 2025
- 2025StructEval: Benchmarking LLMs' Capabilities to Generate Structural Outputs26 May 2025