Files
ai-agent-book/slides/lesson-20.md
T
liqiang b119135836
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
2026-08-20 13:12:50 +00:00

7.0 KiB

theme, title, info, author, transition, mdc, lineNumbers, monaco, aspectRatio, canvasWidth, layout, class
theme title info author transition mdc lineNumbers monaco aspectRatio canvasWidth layout class
seriph Lesson 20 — How Can an Agent Create Media It Can Actually Verify? English video course for AI Agents in Depth Bojie Li slide-left true false false 16/9 980 cover 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
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

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

$ 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.