Research
TeachMaster: Generative Teaching via Code
Overview Research area: AI for education, multi-agent generative systems, and code-as-intermediate-representation for multimodal content synthesis (arXiv category cs.CY — Computers and Society). Techn
- arXiv
- 2601.04204
- Published
- 2025-12-07
- Authors
- Yuheng Wang, Runde Yang, Lin Wu, Jie Zhang, Jingru Fan, Tianle Zhou, Ruoyu Fu, Huatao Li, Ruijie Shi, Siheng Chen, Weinan E, Chen Qian
AI summary
Overview
- Research area: AI for education, multi-agent generative systems, and code-as-intermediate-representation for multimodal content synthesis (arXiv category cs.CY — Computers and Society).
- Technical level: Intermediate. The architecture is conceptually accessible, but full appreciation requires familiarity with LLM agents, code generation, and text-to-speech pipelines.
- Scope: The paper proposes and validates a multi-agent framework that converts a lecture outline into a finished, editable educational video by generating and rendering code rather than pixels.
What This Paper Is About
Producing high-quality online courses is expensive and slow: a single course can cost roughly $30,000 and take months to update, because human experts must design slides, record narration, and re-edit everything by hand. End-to-end video generation models offer a shortcut, but they produce opaque, uneditable output that ignores pedagogical structure. TeachMaster addresses this by treating code as the intermediate medium between a teacher's intent and the final video, letting a team of specialized agents plan, design, validate, and render curriculum-ready lessons that instructors can inspect and modify.
Key Contributions
- The "Generative Teaching" paradigm. A reframing of the educator's role from manual content creator to high-level director who specifies pedagogical intent while generative agents handle execution. The authors informally call this "Vibe Teaching."
- TeachMaster, a code-centric multi-agent framework. A three-stage pipeline (content planning, presentation generation, quality validation) in which every visual element is an executable script rather than a generated pixel, making output interpretable, modular, and editable.
- A decoupled dual-stream presentation mechanism. Visual synthesis and narration are generated separately but cross-conditioned, so terminology and pacing stay aligned across modalities instead of being entangled in one black-box model.
- Large-scale deployment evidence. Real-world use by over 1,000 educators across 40+ disciplines, producing 30,000+ minutes of content, with measured cost and human-intervention statistics.
Main Findings
- Quality approaches human-made content. On a 1–10 scale judged by GPT-5.2, TeachMaster (Gemini-powered) scored 7.91 overall for video quality versus 8.29 for human-crafted videos and 7.57 for Sora 2. It clearly outperformed the end-to-end baseline on pedagogical logic, layout, and factual accuracy.
- Script quality surpasses all baselines. The Gemini variant reached an overall 8.95 for educational scripts (coherence, accuracy, completeness, consistency), edging past the human reference at 8.84 and far ahead of Sora 2 at 4.39.
- Cross-modal alignment exceeds even human content. On semantic coverage, referential accuracy, and visual–verbal symmetry, TeachMaster scored 8.44–8.79 versus 8.13 for human-produced videos and 6.65 for Sora 2.
- Roughly 3 minutes of production per minute of video. This compares with over 12 minutes for Sora 2 and roughly 24 minutes for traditional human production (a ratio of 2.46–3.47 versus 12.80 and 24.46).
- Cost collapses by two orders of magnitude. A standard 45-hour semester course costs about $83.70 to produce, approximately 0.3% of conventional online course expenses.
- Most pages need no human editing. In deployment, 75.2% of generated pages required zero manual intervention; the remainder were finalized in an average of 1.88 interaction rounds.
- Judge validity was checked. Agreement between GPT-5.2 scoring and three human experts across 300 randomly sampled videos reached 81.71%.
Methodology in Plain English
The system takes a lecture outline (keywords, optional settings) and runs it through three sequential stages, each handled by specialized agents.
Stage 1 — Content planning. A composition agent expands the outline into a full manuscript by first building a semantic skeleton, then expanding it with detail, then trimming or extending it to fit a target video duration. A pagination agent then splits that manuscript into discrete page-level units, using a Chain-of-Agents scheme so long lectures can be processed in segments and reassembled.
Stage 2 — Presentation generation. For each page blueprint, a routing agent decides whether the content can be drawn with geometric primitives (handled by a standard coding agent) or needs synthesized imagery (handled by an image-enhanced coding agent that treats images as programmable objects). Separately, a narration agent writes the spoken script conditioned on the page content, the previous script, and the generated visual code — which keeps terminology and pacing consistent. A text-to-speech agent converts narration to audio and reports the speaking rate, which is needed later for timing.
Stage 3 — Quality validation. Three agents clean up the output. A debugging agent renders the code and, on failure, feeds the error trace back to the model to repair the offending lines, falling back to simple templates if failures persist past a retry threshold. A synchronization agent injects timing statements into the code so animations fire in step with the narration. A layout agent detects overlapping elements and computes corrected coordinates through a heuristic scan. Finally, a human-in-the-loop interface allows either natural-language revisions or direct code edits, and each page is rendered and stitched together with its audio.
Visuals are rendered from Python via the Manim engine. The coding agents run on either Gemini-3 through an API or a locally deployed Qwen3-32B model fine-tuned for Manim code generation, using a curated dataset of 3,735 human-annotated examples and a curriculum learning strategy across 8× NVIDIA A800 GPUs. Narration uses Minimax TTS.
Why This Matters
The work shows that for structured domains like education, pixels are the wrong abstraction level. Code gives transparency, editability, and reversibility that no diffusion model can match, while still producing polished multimodal output. It reframes the human's role rather than replacing it — instructors supervise pedagogical logic while agents handle execution — which is a more credible adoption path for educators than opaque generation.
Real-world applications:
- Massive open online courses (MOOCs). Semester-length courses can be produced for tens of dollars and updated incrementally when the underlying knowledge changes.
- Underserved and multilingual education. Content can be generated in Chinese and English and adapted across disciplines where qualified instructors are scarce.
- Corporate and vocational training. Rapid turnaround for compliance, onboarding, or tool-specific curricula that go stale quickly.
- Personalized tutoring pipelines. Because output is modular code, individual pages can be regenerated or swapped to match a learner's level or a specific exam syllabus.
Industry relevance: The $83.70 price point for a full semester course is a direct challenge to the economics of course-production vendors, instructional design agencies, and platforms like Coursera and edX. The finding that 75% of pages need no human editing also suggests viable per-seat or per-course pricing models at a fraction of current market rates.
Future Directions
- Handling subjective and open-ended subjects. The current pipeline works best where content can be decomposed into structured visuals; humanities, qualitative analysis, and debate-style content remain open problems.
- Improving the local Qwen model. The Gemini variant consistently outperformed the locally deployed Qwen3-32B variant, implying that code-generation fidelity, not architecture, is the current bottleneck.
- Closing the residual quality gap. TeachMaster still trails human-made videos on overall quality ratings; understanding exactly which visual or narrative elements cause the gap would guide the next iteration.
- Adding assessment and interaction layers. Students in the deployment study explicitly requested exam-tailored exercises and advanced case studies, suggesting natural extension into automatic quiz generation and adaptive learning paths.
Target Audience
This paper is most valuable for AI education researchers, instructional designers and edtech product teams, multi-agent systems researchers interested in code-as-representation, and educators or administrators evaluating whether generative tools can realistically replace or supplement manual production. It is also useful for anyone studying the trade-off between end-to-end generative models and structured, programmatic pipelines.
Authors’ abstract
The scalability of high-quality online education is hindered by the high costs and slow cycles of manual content creation. Despite advancements in video generation, current approaches often fail to ensure pedagogical structure and precise control due to their pixel-level, black-box nature. In this paper, we propose Generative Teaching, a novel paradigm shifting educators from manual creators to high-level directors who focus on pedagogical intents while agents handle the execution. To realize this vision, we introduce TeachMaster, a multi-agent framework that leverages code as an intermediate semantic medium. Unlike traditional video generation methods, TeachMaster orchestrates a collaborative team of agents, spanning planning, design, and rendering, to automate the production of interpretable, editable, and curriculum-ready educational videos. Experiments validate that TeachMaster significantly boosts production efficiency without compromising structural coherence or visual fidelity, slashing production costs to only 0.3% of traditional online course videos and providing a robust solution for scalable education.