Demonstrating ViviDoc: Generating Interactive Documents through Human-Agent Collaboration

Yinghao Tang, Yupeng Xie, Bo Zhang, Tian Lan, Wei Chen (23863)

Abstract

Interactive articles help readers engage with complex ideas through exploration, yet creating them remains costly, requiring both domain expertise and web development skills. Recent LLM-based agents can automate content creation, but naively applying them yields uncontrollable and unverifiable outputs. We present ViviDoc, a human-agent collaborative system that generates interactive educational documents from a single topic input. ViviDoc introduces a multi-agent pipeline (Planner, Executor, Evaluator) and the Document Specification (DocSpec), a human-readable intermediate representation that decomposes each interactive visualization into State, Render, Transition, and Constraint components. The DocSpec enables educators to review and refine generation plans before code is produced, bridging the gap between pedagogical intent and executable output. Expert evaluation and a user study show that ViviDoc substantially outperforms naive agentic generation and provides an intuitive editing experience.

Introduction: Bridging the Pedagogical Gap

Interactive articles—exemplified by platforms like Distill.pub or Explorable Explanations—are the gold standard for digital education, allowing readers to explore complex ideas through direct manipulation. However, producing these "explorable explanations" is prohibitively costly, requiring a rare "unicorn" skill set: deep domain expertise combined with high-level web development.

While Large Language Models (LLMs) can generate code snippets, naively applying them to document generation often results in uncontrollable outputs that fail to align with pedagogical goals. ViviDoc addresses this by transforming the LLM from a "black box" generator into a collaborative partner, ensuring that the final output is both verifiable and controllable.

System Architecture: The Multi-Agent Pipeline and DocSpec

ViviDoc’s core innovation is the DocSpec (Document Specification), a human-readable intermediate representation that bridges the gap between pedagogical intent and executable code.

The ViviDoc system architecture, highlighting the multi-agent core and the structured DocSpec representation.

The system utilizes a multi-agent pipeline consisting of three specialized agents:

  • Planner Agent: Decomposes a topic into "knowledge units" and generates the DocSpec.
  • Executor Agent: Synthesizes the final HTML, CSS, and JavaScript based on the DocSpec.
  • Evaluator Agent: Reviews the output for logical flow and code validity, initiating refinements if necessary.

The DocSpec is built on the SRTC framework:

  • State (S): Underlying variables (e.g., a slider value for a circle's radius).
  • Render (R): Mapping variables to visual elements (e.g., how the circle changes size).
  • Transition (T): Defining how user actions update the state.
  • Constraint (C): The "pedagogical invariant"—the core educational truth the interaction must preserve (e.g., the mathematical relationship between radius and area).

By exposing the DocSpec to the user, ViviDoc allows educators to verify and refine the logic of an interaction before any code is written, ensuring the final document meets specific learning objectives.

Evaluation and Results

To evaluate ViviDoc, the researchers compiled a benchmark dataset of 101 real-world interactive documents across 11 domains, including physics, math, and algorithms. They compared ViviDoc against a "Naive Agent" (a single-prompt LLM) through expert blind evaluations and a user study.

Comparison of ViviDoc and a Naive Agent across Content Richness, Interaction Quality, and Visual Quality.

As shown in the evaluation results, ViviDoc significantly outperformed the baseline in all categories, particularly in Content Richness (4.17 vs. 2.07) and Interaction Quality (4.00 vs. 2.40). In user studies, participants gave the system a perfect 5.0/5.0 for ease of use. Users specifically noted that the DocSpec allowed them to decide how an interaction works without needing to write code, providing a sense of agency often missing in automated systems.

Conclusion

ViviDoc demonstrates that human-agent collaboration, mediated by structured intermediate representations like DocSpec, can democratize the creation of high-quality interactive educational content. While future work will look to expand the complexity of supported simulations and improve automated evaluation, ViviDoc represents a significant step toward making "explorable explanations" accessible to all educators.

Summary updated

Abstract

Interactive articles help readers engage with complex ideas through exploration, yet creating them remains costly, requiring both domain expertise and web development skills. Recent LLM-based agents can automate content creation, but naively applying them yields uncontrollable and unverifiable outputs. We present ViviDoc, a human-agent collaborative system that generates interactive educational documents from a single topic input. ViviDoc introduces a multi-agent pipeline (Planner, Executor, Evaluator) and the Document Specification (DocSpec), a human-readable intermediate representation that decomposes each interactive visualization into State, Render, Transition, and Constraint components. The DocSpec enables educators to review and refine generation plans before code is produced, bridging the gap between pedagogical intent and executable output. Expert evaluation and a user study show that ViviDoc substantially outperforms naive agentic generation and provides an intuitive editing experience. Our project homepage is available at https://vividoc-homepage.vercel.app/.
BibTeX
@inproceedings{tang2026demonstrating,
  author = {Yinghao Tang and Yupeng Xie and Bo Zhang and Tian Lan and Wei Chen (23863)},
  title = {{Demonstrating ViviDoc: Generating Interactive Documents through Human-Agent Collaboration}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-demo.79},
}
Figure