最近的工作利用大型语言模型 (LLMs) 使用 Manim 等库生成教学动画的可执行代码。然而, 确保空间正确性和视觉易读性仍然具有挑战性,,因为现有框架强调教学内容,同时忽视几何遮挡。我们提出符号几何代理 (SGA), 是一个用于以代码为中心的动画管道的即插即用模块,它拦截 LLM 生成的代码, 执行部分执行以提取符号场景图, 并在检测到空间冲突时应用有针对性的细化。我们进一步介绍了 Manim 视觉质量分数 (MVQS),,这是一种确定性的免渲染空间完整性代理。跨四个 LLM 主干和两个代理管道的 MMMC-Code 基准测试表明,SGA 实现了 73.11 (Code2Video + GPT-5.1), 的峰值 MVQS,相对于原始基线, 提高了 16.1%,并且在 8 个主干 x 管道配置中的 7 个中改进了 MVQS。

Recent work leverages Large Language Models (LLMs) to generate executable code for pedagogical animations using libraries such as Manim. However, ensuring spatial correctness and visual legibility remains challenging, as existing frameworks emphasize pedagogical content while overlooking geometric occlusions. We propose the Symbolic Geometric Agent (SGA), a plug-and-play module for code-centric animation pipelines that intercepts LLM-generated code, performs partial execution to extract symbolic scene graphs, and applies targeted refinement when spatial conflicts are detected. We further introduce the Manim Visual Quality Score (MVQS), a deterministic rendering-free proxy for spatial integrity. Experiments on the MMMC-Code benchmark across four LLM backbones and two agentic pipelines show that SGA achieves a peak MVQS of 73.11 (Code2Video + GPT-5.1), corresponding to a 16.1% relative improvement over the raw baseline, and improves MVQS in 7 of 8 backbone x pipeline configurations.

科目: 人工智能 (cs.AI); 计算机视觉和模式识别 (cs.CV); 图形 (cs.GR); 多代理系统 (cs.MA); 多媒体 (cs.MM)

Subjects: Artificial Intelligence (cs.AI); Computer Vision and Pattern Recognition (cs.CV); Graphics (cs.GR); Multiagent Systems (cs.MA); Multimedia (cs.MM)