Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Valid Schema, Wrong Content: Using Jev to Guard a Google ADK Agent

说明与用途

模式验证的JSON可能仍不符合内容要求。通过将Jev作为工具集成到Google ADK代理中,代理可自检并重新生成字幕,使其与段落时长匹配,从而生成流畅的短视频。

问题

Schema‑valid JSON produced by a video‑generation agent can still contain content that does not fit the specified duration, leading to rushed narration and mid‑sentence cuts.

结果

The workflow demonstrates that schema‑validation alone is insufficient; integrating a content‑fit tool (Jev) within an ADK agent ensures captions match segment durations, producing a polished short video.

工作流

  • 1. Define a VideoTimeline schema for the storyboard.
  • 2. Use Google ADK to create a director_agent with Gemini‑3.1‑pro‑preview model and output_schema set to VideoTimeline.
  • 3. Add a FunctionTool that calls Jev’s check_segment to evaluate caption fit.
  • 4. In the agent’s instruction, ask it to call check_segment on every segment and regenerate any flagged as needs_review, retrying up to twice.
  • 5. Run the agent to generate the storyboard; Jev returns confidence scores and flags.
  • 6. Regenerate flagged segments until all captions fit their durations.
  • 7. Stitch the validated storyboard into a video.
  • 8. Verify the final video has smooth narration and no mid‑sentence cuts.

证据

Schema-valid is not content-correct – schema validation doesn’t catch caption length issues.

来源

Wrap Jev as an ADK tool the agent uses to self‑check.

来源

Pairing output_schema with tools on the same Agent is officially supported by ADK.

来源

  • 记录日期: 2026-09-22T01:30:21.831Z