How LLMs Use Code to Reshape Dynamic Presentations
This article examines how large language models generate code-driven, interactive presentations without external media assets. It breaks the approach into five technical layers—narrative structure, rendering, transitions, interaction, and audio—and explains the role of scene graphs, state contracts, performance budgets, shared coordinate systems, explicit state machines, and procedural audio. It also covers prompt engineering with hard constraints, acceptance criteria, and production guidance on decoupling generation from rendering, monitoring, and automated validation.
How LLMs Use Code to Reshape Dynamic Presentations
The Technical Problem Behind the Trend
A dynamic presentation called “The Last Boring Slide” recently attracted a lot of attention on social platforms. What made it notable was not visual polish, but three technical facts holding at the same time: every visual element was generated by code, no external images or audio/video assets were used, and the audience could interact with the presentation in real time.
Setting aside the showmanship, the piece answers a long-standing question: when content production tools shift from editors to code generators, how far can the ceiling of creation be pushed?
Traditional presentation software is built around the abstraction of a “slide.” Slides are discrete and static, and switching between them is the only transition. Code-generated presentations replace that abstraction with state transitions along a timeline. The same view can be a slide, a 3D scene, and a camera move at once. The difference is not visual style but an added dimension of expression: from 2D layout to 3D space, temporal evolution, and user input.
This capability does not depend on visual generation models. A large language model outputs structured code, and the browser or runtime handles rendering. The ceiling on output quality therefore depends on how well the model understands graphics APIs, animation timing, and engineering constraints—not on pixel-level imitation.
Breaking Down the Capability: The Technical Layers of a Dynamic Presentation
To reproduce this kind of work in production, it helps to split it into five layers, each with clear technology choices and common pitfalls.
1. Narrative Structure: A Scene Graph Instead of a Slide List
The traditional approach is a linear array of slides. A dynamic presentation is better modeled as a directed graph: nodes are scenes, edges are transitions, and conditional edges can create branches.
const scenes = {intro: { duration: 4000, next: ['chaos'] },chaos: { duration: 6000, next: ['singularity', 'intro'], onEnter: resetCamera },singularity: { duration: 8000, next: [], interactive: true }};
The key design point is that every scene must declare a state contract for entry and exit (camera position, lighting parameters, object visibility). Without such contracts, chaining scenes together inevitably causes state pollution, visible as flickering objects or broken materials during transitions.
2. Rendering: Layering and Budgeting
Pure code rendering is usually built on a general-purpose graphics API. In practice, three layers work well:
- Background layer: low-poly geometry or particles, cheapest to render, responsible for spatial depth;
- Subject layer: geometry, text, and charts that carry the information;
- Effects layer: post-processing, glow, and depth of field, the most expensive and must be degradable.
Performance budgets should be written into the constraints during generation, not optimized after the fact. A practical rule of thumb: keep draw calls per frame in the hundreds, make total particle count inversely proportional to post-processing chain length, and share one scene between mobile and desktop with two quality tiers.
3. Transitions: Turning “Switching” into Continuity
The essence of a high-quality transition is a shared coordinate system. Zooming a selected object from a chart into a globe and then into the full frame works because those objects have real scale relationships in the same space, rather than two images cross-fading. Implementation requires:
- A unified world coordinate system and camera path, avoiding a separate camera per scene;
- A single shared set of easing functions, with no mixing of linear and elastic curves;
- Freezing user input during transitions to prevent state races.
4. Interaction: A State Machine, Not Stacked Events
The most common failure mode in interactive presentations is listeners piling up layer after layer. An explicit state machine is the better approach:
const machine = {idle: { onNext: 'playing' },playing: { onNext: 'paused', onSeek: 'seeking' },paused: { onNext: 'playing', onSeek: 'seeking' },seeking: { onDone: 'playing' }};
Routing all input through the state machine first, and letting the machine decide whether to drive rendering, significantly reduces edge-case defects.
5. Audio: Procedural Generation
Music can also be synthesized in code: oscillators generate the base waveforms, envelopes shape the rise and fall, noise sources add texture, and everything is routed through reverb and limiting. The benefits are zero asset dependencies and predictable size; the cost is manual tuning of how it sounds. Keep a master volume control and default to muted, which also complies with browser autoplay restrictions.
Prompt Engineering: Turning Aesthetics into Executable Constraints
The most instructive part of the original case is that the prompt did not specify a visual style. It specified goals, degrees of freedom, and acceptance criteria. A reusable template has four parts:
- Theme and emotional tone, stating “make it chaotic” rather than “make it professional”;
- A declaration of freedom, allowing the model to choose the style and asset strategy;
- Hard constraints, such as no external assets, must be interactive, and must control resource usage;
- Acceptance criteria, such as “clicking at any moment never crashes the presentation.”
Part 3 matters most. High-quality output without hard constraints is usually unmaintainable, because it pushes all the complexity onto the runtime.
Cost and Production Recommendations
This type of task is a typical “high reasoning tier, long context, one-off heavy compute” workload that consumes far more than ordinary conversation. For production use:
- Decouple generation from rendering: persist generated artifacts as versioned text, and keep the rendering side stateless;
- Store artifacts in object storage, use a message queue to smooth traffic spikes, and run rendering services on a container platform;
- Connect logging and monitoring with alerts, tracking first-frame time, average frame rate, and interaction failure rate;
- Automate acceptance of generated results: statically check resource references and run the full timeline once in a headless environment.
In related practice at Baidu AI Cloud, these capabilities are typically delivered by combining general cloud product categories, so the loop can be closed without proprietary interfaces.
Conclusion
The real lesson from this presentation is not that “a particular model is powerful,” but that code is becoming the universal intermediate format for high-expressiveness content. When a model can reliably output structured scenes, timing, and interaction logic, the production boundaries of presentations, animation, infographics, and teaching materials converge onto the same engineering pipeline. The practical advice for developers is to get scene contracts, performance budgets, and state machines solid first, and only then pursue visual impact—reverse that order and the result will not be reusable.
