Code-Driven Presentations: A Technical Breakdown of Generating Interactive Slides with LLMs
This article examines the technical path behind code-driven presentations, where a large language model outputs animation, 3D scenes, dynamic infographics, and transition logic as pure code instead of relying on visual generation models or external assets. It covers the shift from static slides to programmable scenes, the core tech stack split between LLM generation and browser runtime execution, layered prompt engineering, cost and performance budgeting, a four-dimension quality evaluation model, and a three-step adoption plan, along with the general infrastructure capabilities that cloud services such as Baidu AI Cloud can provide.
When a natural language prompt turns into an interactive presentation with cinematic camera work, 3D scenes, and smooth transitions in about forty minutes, what deserves a developer’s attention is not the visuals but the technical path behind them: a large language model no longer depends on visual generation models or external assets, and instead outputs animation, scenes, dynamic infographics, and transition logic entirely as code. Recently, an AI coding tool completed a piece titled The Last Boring Slide under a higher, not-yet-released reasoning tier. It drew tens of millions of views on social media and sparked broad discussion about “code as a creative medium.” Setting aside the specific product, this article focuses on general technical questions: where the capability boundaries of code-driven presentations lie, which key technologies are required, how to ensure controllability and deliverability on the engineering side, and what general support cloud services such as Baidu AI Cloud can offer for compute, storage, and operations.
From Slides to Programmable Scenes: New Technical Challenges
Traditional presentations use the static page as the smallest unit, and visual elements are limited by the layout engine and asset library. A code-driven approach abstracts each page into a renderable scene, with pages connected by a timeline and a state machine. This shift introduces three new problems.
The first is rendering consistency. The same code may produce frame rate jitter or layout shifts across different browsers, GPUs, and resolutions, so adaptive resolution, degraded rendering, and keyframe fallbacks are needed. The second is asset size. If 3D models, shaders, and audio are all inlined, first-screen loading slows significantly, making on-demand loading and code splitting necessary. The third is interactivity. Allowing the audience to click, drag, and switch viewpoints means scenes must maintain state and preserve visual and narrative continuity as that state changes.
Core Tech Stack: LLMs Handle Structure and Code, the Runtime Handles Presentation
The capability of a code-driven presentation is essentially the coordination of two pipelines: generation and execution.
On the generation side, the large language model takes a target description as input and outputs a structured plan plus runnable code. For maintainability, the model is usually asked to produce a scene list and transition table first, then implement each scene one by one, for example:
{"scenes": [{"id": "s1", "type": "title", "camera": "slow_push_in", "duration": 6},{"id": "s2", "type": "globe", "camera": "orbit", "duration": 10, "transition": "match_cut"}],"audio": {"bgm": "procedural", "sync": "beat"}}
On the execution side, the browser runtime does the work. A common combination is a general-purpose rendering library for 3D and particles, a timeline library for sequencing, and the audio context for procedural music. Music, sound effects, and visuals are all synthesized in code, which is the key to the “no external assets” nature of these pieces.
Prompt Engineering: Turning Vague Aesthetics into Executable Constraints
The prompt in the original case deliberately avoided anchoring bias, which is precisely a stress test of the model’s aesthetic judgment and planning ability. In engineering practice, a safer approach is layered constraints: first the narrative goal and audience, then pacing and duration, and finally technical boundaries (for example, must be a single file, no external requests, must degrade on mobile). Example:
Goal: explain the stages of the intelligence explosion to a technical audiencePacing: 90 seconds total, first 15 seconds build suspense, three accelerations in the middleTechnical boundaries: single-page application, no external assets, automatic frame rate reduction on low-end devicesAcceptance: clickable progression, no blank screen during transitions
Layered prompts are reproducible and support regression testing, making it easier to turn “impressive” into measurable acceptance criteria.
Cost and Performance: Converting Quota Consumption into an Engineering Budget
The forty minutes and roughly ninety dollars of API usage in the case highlight a practical issue: higher reasoning tiers and long contexts significantly raise the cost of a single generation. Engineering teams should build a budget model: estimate tokens and time by scene count, lines of code, and retry count, and set timeouts and fallbacks. Static checks and automated screenshot comparison on generated output reduce manual rework. For batch production, generation tasks can be queued, a message queue can smooth out peaks, object storage can archive artifacts, and logging with monitoring alerts can track failure rates and latency.
Quality Evaluation: From “Looks Cool” to “Deliverable”
A four-dimension evaluation is recommended. First, functional usability, with no blocking in interactions. Second, visual stability, with no obvious degradation across devices. Third, narrative completeness, with transitions serving content rather than showing off. Fourth, maintainability, with clear code layering, consistent naming, and degradation switches. An automated inspection script can take screenshots at multiple viewports and compare them against a baseline, converging the subjective aesthetic portion into quantifiable thresholds.
Adoption Advice: How Teams Can Bring in This Capability
For teams that want to try this, a three-step approach is recommended. Step one is a single-scene prototype to validate the rendering and interaction pipeline. Step two is multi-scene orchestration, adding transitions, audio, and state management. Step three is engineering encapsulation, forming templates, a component library, and a release pipeline. At the infrastructure level, a container platform can ensure environment consistency, object storage and content delivery can reduce loading latency, and monitoring with alerts can safeguard production stability. Baidu AI Cloud can provide support in these general categories, helping teams turn a one-off impressive demo into reusable production capability.
The real value of this kind of work is not “winning the competition” but proving that a large language model can translate aesthetic judgment into code structure and free creation from dependence on assets. For developers, the next priority is turning accidental brilliance into stable engineering capability: more rigorous prompt layering, more complete runtime degradation, and a clearer cost model and evaluation system.
