<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jiaoshuo1997</title>
    <description>The latest articles on DEV Community by jiaoshuo1997 (@jiaoshuo1997).</description>
    <link>https://dev.to/jiaoshuo1997</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4043955%2Fe2190c7e-f6c5-4fcf-b63d-f15632d3f772.png</url>
      <title>DEV Community: jiaoshuo1997</title>
      <link>https://dev.to/jiaoshuo1997</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jiaoshuo1997"/>
    <language>en</language>
    <item>
      <title>Designing Model-Agnostic Prompts for AI Video Workflows</title>
      <dc:creator>jiaoshuo1997</dc:creator>
      <pubDate>Thu, 23 Jul 2026 14:05:45 +0000</pubDate>
      <link>https://dev.to/jiaoshuo1997/designing-model-agnostic-prompts-for-ai-video-workflows-52hm</link>
      <guid>https://dev.to/jiaoshuo1997/designing-model-agnostic-prompts-for-ai-video-workflows-52hm</guid>
      <description>&lt;p&gt;AI video tools change quickly. A prompt that works well in one model may behave differently in another, and model-specific syntax can become obsolete after an update. A more durable approach is to represent the creative intent first, then translate that representation into the vocabulary of a chosen generator.&lt;/p&gt;

&lt;p&gt;This article describes a model-agnostic prompt architecture for reference-based video workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with an intermediate representation
&lt;/h2&gt;

&lt;p&gt;Instead of sending a long natural-language paragraph directly to a model, store the shot as structured fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"duration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"aspect_ratio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9:16"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"subject"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"a cyclist wearing a yellow rain jacket"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"environment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"wet city street at dusk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"composition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"medium tracking shot, subject in right third"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"camera"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"truck left at cycling speed, stable horizon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cyclist passes two parked cars and looks over shoulder"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lighting"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cool ambient light with warm shop reflections"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"end_state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cyclist exits frame left"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a prompt yet. It is an intermediate representation: a stable description of what the shot must accomplish.&lt;/p&gt;

&lt;p&gt;The advantages are practical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;missing information is visible&lt;/li&gt;
&lt;li&gt;fields can be validated independently&lt;/li&gt;
&lt;li&gt;one shot can be rendered for multiple models&lt;/li&gt;
&lt;li&gt;revisions can target a single layer&lt;/li&gt;
&lt;li&gt;duration and aspect-ratio constraints stay explicit&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Separate invariants from preferences
&lt;/h2&gt;

&lt;p&gt;Not every detail has equal importance. Divide the representation into two groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Invariants&lt;/strong&gt; are requirements that should survive every model translation. Examples include the subject, action order, camera direction, duration, and final state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preferences&lt;/strong&gt; are desirable but negotiable details: a subtle film grain, a specific color mood, shallow depth of field, or a minor background prop.&lt;/p&gt;

&lt;p&gt;When generation fails, preserve invariants first. A visually beautiful result is still wrong if the subject moves in the opposite direction or never completes the required action.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;P0: action order, camera direction, end state
P1: framing, environment, lighting
P2: texture, secondary props, stylistic accents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use a two-stage renderer
&lt;/h2&gt;

&lt;p&gt;A model adapter can transform the intermediate representation in two stages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 1: build the visual state
&lt;/h3&gt;

&lt;p&gt;The first stage describes the opening frame: subject, wardrobe, environment, framing, lens cues, lighting, and spatial relationships. It should be possible to sketch the first frame from this section alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 2: build the temporal change
&lt;/h3&gt;

&lt;p&gt;The second stage describes motion: what the subject does, how the camera moves, when events occur, and what the final frame should contain.&lt;/p&gt;

&lt;p&gt;Keeping these stages separate makes debugging easier. If the first frame is wrong, revise the visual state. If the action stalls or the camera drifts, revise the temporal instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translate, do not copy
&lt;/h2&gt;

&lt;p&gt;Each model adapter should map the same fields into the model’s preferred style. One generator may respond well to concise cinematic prose. Another may need explicit timing beats. A third may benefit from negative constraints.&lt;/p&gt;

&lt;p&gt;The adapter should be responsible for ordering fields by importance, converting durations into supported values, translating camera vocabulary, omitting unsupported controls, and adding only constraints the target model understands.&lt;/p&gt;

&lt;p&gt;The source representation remains unchanged. This prevents model quirks from leaking into the analysis layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate before generation
&lt;/h2&gt;

&lt;p&gt;A lightweight validator catches many expensive errors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- duration is supported by the target model
- aspect ratio is valid
- subject and action are present
- camera instruction has direction or lock behavior
- action has an observable end state
- timing beats do not exceed total duration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For reference-video workflows, validation should also compare every field against the source. Do not invent wardrobe, dialogue, or camera movement just to make the description sound richer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure structural fidelity
&lt;/h2&gt;

&lt;p&gt;Pixel similarity is a poor measure for generative video. Evaluate structure instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was the shot type preserved?&lt;/li&gt;
&lt;li&gt;Did the action occur in the correct order?&lt;/li&gt;
&lt;li&gt;Did the camera move in the intended direction?&lt;/li&gt;
&lt;li&gt;Was the final state reached?&lt;/li&gt;
&lt;li&gt;Did subject identity and wardrobe remain consistent?&lt;/li&gt;
&lt;li&gt;Was the pacing close to the reference?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These checks create useful revision signals. If camera direction is wrong, change the camera layer. If the action is incomplete, simplify the action or allocate more time. If identity drifts, strengthen the visual-state constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the workflow auditable
&lt;/h2&gt;

&lt;p&gt;Store the intermediate representation, rendered prompt, target model, generation settings, and revision notes together. This produces an audit trail and makes successful prompts reusable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source segment -&amp;gt; structured shot -&amp;gt; model adapter -&amp;gt; rendered prompt
-&amp;gt; generation result -&amp;gt; evaluation -&amp;gt; revision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We use this separation between analysis and model-specific rendering in &lt;a href="https://promptvv.com" rel="noopener noreferrer"&gt;promptvv&lt;/a&gt;, where reference videos can be decomposed into shot-level tasks before prompts are adapted and refined.&lt;/p&gt;

&lt;p&gt;The main idea is simple: treat prompts as compiled output, not as the source of truth. A stable intermediate representation makes an AI video workflow easier to test, debug, and migrate when models change.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
