Local LLM struggles with SVG element hiding and undo/redo tasks
Use explicit CSS selectors and avoid regex-based injection when hiding SVG elements.
Test a commercial LLM for SVG element hiding or lower expectations for local LLMs.
Summary
A local LLM was tested on a web‑based product configurator that manipulates SVG images. The model attempted to delete the target element from the SVG file, then injected a CSS rule into the loaded SVG, and finally tried to add an inline CSS style using regex. Commercial LLMs handled the task correctly, but the local model failed. The same model was also asked to plan and implement basic undo/redo functionality; the plan looked correct but execution entered an infinite loop. The author suggests lowering expectations, trying different quantisation, changing the model, or adjusting configuration, prompt or stack. The issue highlights the difficulty of fine‑tuning local LLMs for precise DOM manipulation.
The post lists four concrete suggestions: lower expectations, experiment with quantisation, switch to a different model, or modify prompt/stack. It also notes that Qwen3.6‑35B struggled with the undo/redo loop.
Overall, the article demonstrates that local LLMs can misinterpret simple SVG manipulation tasks and may require careful prompt engineering or a commercial model for reliable results.
Key changes
- LLM tried to delete the SVG element from the file
- LLM injected a CSS rule into loaded SVGs
- LLM used regex to inject inline CSS
- Commercial LLMs handled the task correctly
- Qwen3.6‑35B entered an infinite loop on undo/redo
- Author suggests lowering expectations, changing quantisation, model or stack