TL;DR
DataMagic is an end-to-end interactive system that automatically transforms raw tabular data and natural language queries into animated data-insight videos complete with voice narration. By introducing a declarative specification grammar (DVSpec) and a "Generate-then-Orchestrate" multi-agent architecture, it guarantees strict data fidelity and perfect audio-visual synchronization while turning static videos into explorable, interactive data interfaces.
What Problem Does This Paper Address?
Data videos—which combine dynamic charts, voiceovers, and synchronized animations—are incredibly effective at communicating data insights. However, creating them is a massive pain point. It requires a rare cross-disciplinary skillset spanning data analysis, narrative design, and video production.
Existing solutions fall short in three major ways:
- Static Visualization Tools: BI dashboards output static charts that lack narrative logic and animation.
- Authoring Tools: Video editing software requires users to manually prepare charts and keyframe animations, offering no help in extracting insights from raw data.
- Pixel-Level Generative AI (e.g., Sora): Pure video generation models suffer from "numerical hallucinations" and cannot map visual elements back to the actual underlying data records.
The authors tackle the challenge of automating this pipeline from raw data to finished video without sacrificing data fidelity or narrative coherence.
Methods
DataMagic splits the problem into a structured intermediate representation and a hierarchical multi-agent pipeline:
1. DVSpec (Data Video Specification)
To bridge the gap between AI generation and video rendering, the authors designed DVSpec, a declarative grammar that fully decouples logical video descriptions from rendering engines (like D3.js and Remotion). DVSpec introduces two critical mechanisms:
- Data-Driven Semantic References: Instead of hardcoding pixel coordinates or visual IDs, chart elements are bound directly to data attributes (e.g.,
{"company": "Nvidia"}). If the data updates, the video elements update automatically. - Narration-Index Triggering: Instead of absolute timestamps, animations are triggered by text segment indices. If the voiceover text changes, the animations automatically realign to the new audio duration.
2. Generate-then-Orchestrate Multi-Agent Pipeline
Rather than relying on a single LLM to generate a video in one greedy pass, DataMagic uses a two-stage multi-agent architecture:
- Stage 1: Candidate Scene Generation: A Story Planner decomposes the user's query into sub-tasks. A Data Manager generates Python/Pandas code to slice and aggregate the data. A Visual Designer selects chart types, styles, and extracts key insights. These agents run in parallel to generate a pool of candidate scenes.
- Stage 2: Global Narrative Orchestration: A Narration Director selects the best candidate scenes based on insight value, orders them logically (e.g., macro-to-micro), and writes cohesive narration script transitions. An Animation Coordinator then maps the script's data mentions to visual effects.
Datasets
The system was evaluated using 109 real-world samples sourced from two prominent data-agent benchmarks:
- DAComp-DA: A benchmark designed to evaluate data agents across the full data intelligence lifecycle.
- T2R-bench: A benchmark focused on generating article-level reports from real-world industrial tables.
Key Insights and Ideas
- Videos as Structured Code, Not Pixels: The core "aha moment" is that effective data videos are fundamentally structured narratives. By generating a declarative specification (DVSpec) rather than raw pixels, the system completely eliminates data hallucinations.
- Turning Videos into Interfaces: Because DVSpec maintains a live link to the underlying database, the final video isn't a dead artifact. Users can perform Parametric Editing (changing chart types or rewriting scripts on the fly without full re-renders) and Data Q&A (asking "Which product grew fastest?" while watching, prompting the system to query the database and answer accurately).
- Parallelization Solves Design Explosion: Slicing data and designing charts in parallel (Stage 1) before globally organizing the story (Stage 2) prevents the combinatorial explosion of choices from overwhelming the LLM agents.
Key Results
The authors benchmarked DataMagic against four state-of-the-art LLMs (DeepSeek-V3.2, Gemini-2.5-Pro, GPT-5, Claude-Sonnet-4) attempting the task in a naive, single-pass generation mode.
- Execution Success: Single-pass LLMs frequently failed due to code errors or rendering bugs (48–86% success). DataMagic achieved an execution rate above 95%.
- Quality Boost: On a 1–5 quality scale, single-pass LLMs scored poorly (1.91 to 2.22) due to terrible audio-visual sync and disjointed stories. DataMagic raised the average quality score to 3.89.
- Massive Domain Gains: The framework achieved a +120% improvement in Animation Effectiveness and a +72% improvement in Narrative Quality.
- Latency: Direct single-pass generation takes ~57 seconds, whereas DataMagic takes ~176 seconds (60s for multi-agent planning + 116s for parallel rendering). This represents a deliberate, highly justified trade-off of speed for massive quality gains.
Limitations and Future Work
- Latency: While 3 minutes is fast compared to human production, it is still too slow for instantaneous, real-time conversational data exploration.
- LLM API Dependency: The multi-agent pipeline relies heavily on commercial, general-purpose LLMs, which can introduce API costs and variability.
- Future Directions: The authors note that a promising next step is training a dedicated, open-source data video foundation model to handle the DVSpec generation natively, which would drastically reduce both API dependencies and processing latency.
Summary updated