---
theme: seriph
title: "Lesson 20 — How Can an Agent Create Media It Can Actually Verify?"
info: "English video course for AI Agents in Depth"
author: Bojie Li
transition: slide-left
mdc: true
lineNumbers: false
monaco: false
aspectRatio: 16/9
canvasWidth: 980
layout: cover
class: cover
---
Build · Chapter 5 · Coding Agents
# How Can an Agent Create Media It Can Actually Verify?
Slidev, rendering, multimodal review, and video editing
Lesson 20 of 42 · 18 minutes · Code-Driven Multimedia Generation; Proposer-Reviewer; Video Editing
---
# Why this problem matters
Proposer
Plans content and writes artifact code.
Renderer
Converts code into the pixels users will see.
Reviewer
Receives new visual evidence and returns structured fixes.
---
# Three ideas to keep in view
Artifact loop
Source → render → inspect → revise
Context separation
Proposer keeps text; Reviewer sees current pixels
Explicit stop
Quality gate or maximum iterations
---
# The book's visual model
Proposer-Reviewer loop for presentation generation
---
# Self-review source vs. Rendered review
Self-review source
- Sees intended layout
- Cannot observe overflow
- Repeats assumptions
Rendered review
- Sees actual pixels
- Detects crowding and clipping
- Returns page-specific evidence
The verifier is valuable because it receives new information.
---
# Render before judging
~~~python
source = proposer.create_slidev(content)
images = renderer.export_png(source)
issues = vision_reviewer.inspect(images)
while issues.blocking:
source = proposer.revise(source, issues)
~~~
---
# Test the claim
5-43 min
Run the offline Slidev review loop
Observe: Crowded draft, rendered evidence, structured feedback, revised deck
5-62 min
Smoke-test code-driven video editing
Observe: Generated editing script, executable path, and keyframe validation
Demo budget: 5 minutes · one contiguous terminal block
---
class: course-terminal
---
Live demo
# Switching to the terminal
~~~bash
$ uv run python chapter5/paper-to-ppt/demo.py --dry-run
$ uv run python chapter5/video-edit/demo.py --smoke
~~~
Run the command(s), narrate decisions, and point to the observation—not just the output.
---
# What the evidence supports
Finding 1
Source correctness and visual correctness are different properties.
Finding 2
Separating generation and visual review controls multimodal context growth.
Finding 3
Coarse-to-fine visual sampling reduces the cost of locating video events.
---
# Boundary → design rule
A visual reviewer can catch layout defects but may still miss factual or pedagogical errors.
Verify generated media in the modality consumed by the user.
---
# Continue the experiment
---
layout: center
class: text-center
---
Pause and apply
# Your turn
What new evidence becomes available only after your artifact is rendered or executed?
---
layout: center
class: text-center
---
Next · Lesson 21
Use generated code to connect systems, create interfaces, and bootstrap new Agents.
→