How It Works
Our SVG-to-LLM Interpreter converts SVGs into a semantic Intermediate Representation (IR) before feeding them to an LLM. Instead of sending thousands of number-based path coordinates, we send a compact JSON that describes what the SVG actually is: element types, roles, styles, and structure.
How You’d Use It
Upload or paste an SVG into the tool
View it side-by-side: rendered SVG on the left, semantic IR (JSON) on the right
Click elements in either view to select them
Give natural language instructions like “fill all states in New England blue”
Watch the LLM process the IR (not raw SVG) and apply changes back to your file
Compare benchmarks between IR and raw SVG to see the speed difference
The IR consistently reduces raw SVG size, often by 50–80%. A 35KB SVG becomes a 7KB JSON file. Processing time drops. And perhaps more importantly, token use drops dramatically.
Notes from Building
LLMs are bad at numbers, good at meaning. Raw SVG is mostly coordinates. LLMs, on the other hand, excel at understanding language and structure. Using an intermediate representation (IR) meaningfully reduces LLM processing time and power required. It’s consistently faster, cheaper, and more reliable. You may not work with SVGs every day, but the same principle applies to any format optimized for machines and hostile to LLMs: PDFs, CAD files, and more. They all benefit from semantic intermediate representations. Convert to meaning, process with language, convert back to format. Smaller payloads mean fewer timeouts, less data loss, and more predictable workflows.
Benchmarking reveals the real difference. We added a toggle to send either IR or raw SVG to the LLM, with timing and size metrics displayed after each edit. The numbers don't lie: IR processing is consistently faster and cheaper. But more importantly, it's more reliable.
The tool is a web app, but the concept is universal. We built this as a simple web app you can use in your browser, mostly so we have something visual to show you. But the core idea—SVG to IR conversion, LLM processing, IR to SVG application—works anywhere. Think a VS Code extension, a plugin, or a CLI tool. It’s not about the interface. It’s about the concept.
Sometimes the best way to make AI faster is to stop feeding it the wrong format. LLMs speak language, not coordinates. Give them what they’re good at, and watch them work.