Shorter Is Not Cheaper: A Controlled Comparison of Declarative Animation Specifications and Free-Form Code for LLM-Generated Explanations
Not on the map. Why?
Abstract (arXiv)
Chat assistants increasingly answer conceptual questions with interactive, animated explanations, generated either as free-form HTML/JavaScript or as declarative specifications that a fixed runtime plays. The declarative route is widely expected to be cheaper, faster and more reliable, because its outputs are shorter and constrained. We test this expectation in controlled comparisons whose hypotheses and analysis plans were frozen before the runs. We designed ExplainSpec, a time-indexed declarative animation format, and an observation contract that makes every generated explanation programmatically inspectable; validated, pacing-agnostic checkers score 20 explanation requests from five domains. Three Claude models (360 jobs) and, in a follow-up, the open-weight Qwen3-14B with thinking enabled and disabled (240 jobs) answered every request in both formats. For every model the specifications were 25-48% shorter in answer tokens (output excluding reasoning), yet with reasoning enabled total output fell significantly only for the largest Claude model and no model generated significantly faster. The reasons differed. The Claude models reasoned far more before writing specifications (exploratory; for the two larger models, from 15-20% to 85-88% of generations). Qwen3-14B reasoned about as much in both formats (a pre-registered test of this shift was not supported), and its shorter answers saved little against a reasoning trace more than twice as long. Nor were specifications more reliable: free-form pages were valid after one repair round in 95-100% of jobs for every model, whereas Qwen3-14B produced valid specifications in only 33% of jobs and passed all semantic tests in 17% (HTML/JavaScript: 62%). For reasoning models, a shorter format alone therefore does not make generation cheaper, faster or more reliable, and a format learned in context can cost reliability.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 13 of its 30 references that are in the map. Submitted 23 Oct 2026.
Builds on
13 of 30 references.
References · 13
- 2024Executable Code Actions Elicit Better LLM Agentscited by 633
- 2024Let Me Speak Freely? A Study on the Impact of Format Restrictions on Performance of Large Language Modelscited by 109
- 2025Code2Video: A Code-centric Paradigm for Educational Video Generationcited by 40
- 2026Generative UI: LLMs are Effective UI Generatorscited by 11
- 2026The Format Taxcited by 7
- 2025InteractScience: Programmatic and Visually-Grounded Evaluation of Interactive Scientific Demonstration Code Generationcited by 6
- 2022Animated Vega-Lite: Unifying Animation with a Grammar of Interactive Graphicscited by 4
- 2020Gemini: A Grammar and Recommender System for AnimatedTransitions in Statistical Graphicscited by 3
- 2026Capacity, Not Format: Rethinking Structured Reasoning Failurescited by 3
- 2026Macaron-V1: Towards Open Continual Learning with Self-Improvement and Mixture-of-LoRAcited by 2
- 2026DataMagic: Authoring Data Videos through Declarative Multi-Agent Orchestrationcited by 2
- 2026Bridging Natural Language and Interactive What-If Interfaces via LLM-Generated Declarative Specificationscited by 1
1 more
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026The Sufficiency-Conciseness Trade-off in LLM Self-Explanation from an Information Bottleneck Perspective
- 2026Illocutionary Explanation Planning for Source-Faithful Explanations in Retrieval-Augmented Language Models
- 2025How Well do LLMs Compress Their Own Chain-of-Thought? A Token Complexity Approach
- 2024Faithfulness vs. Plausibility: On the (Un)Reliability of Explanations from Large Language Models
- 2025Between Underthinking and Overthinking: An Empirical Study of Reasoning Length and correctness in LLMs
- 2023A Multitask, Multilingual, Multimodal Evaluation of ChatGPT on Reasoning, Hallucination, and Interactivity
- 2025Answer-Centric or Reasoning-Driven? Uncovering the Latent Memory Anchor in LLMs
- 2024On the Brittle Foundations of ReAct Prompting for Agentic Large Language Models