midicn 中文

Debugging a Prompt

Locate the faulty layer before rewriting adjectives, whether input, constraint, model or randomness.

1 min read0 characters条目Prompting and WorkflowUpdated 2026-10-31

promptingdebuggingreproducibilitytroubleshooting

Locate, then rewrite

When a generation misses, the reflex is to add adjectives. A faster move is to identify the layer that failed: the input itself, the way constraints are written, the model's capability, or plain randomness. Each layer needs a different repair; fixing the wrong one only lengthens the prompt.

Four layers

LayerSymptomsCheck firstAction
InputDisplaced lyrics, irrelevant referenceText encoding, audio length, formatUse clean input and a shorter excerpt
ConstraintsTempo drift, wrong ensemble, missing sectionsConflicting rules, placement too lateCut to three core rules, add back one by one
ModelLong form collapses, language unsupported, texture ceilingWhether the task exceeds public capabilityGenerate in parts, change tool type or model
RandomnessSame prompt, very different resultsSeed, version, candidate countFix the seed and sample several times

Order of checks

1. Rerun the same prompt unchanged twice to see whether variance explains it. 2. Fix the seed and run again; does the fault persist. 3. Strip every modifier, keep tempo, ensemble and form, then add items back. 4. Swap in a shorter, cleaner input to rule out the material. 5. Try the same job in a different tool class to test the capability boundary. 6. Log each change and move one variable at a time.

The order controls cost. Changing models is expensive; adding adjectives is cheap and buries the cause deeper.

A log worth keeping

Without a log, debugging becomes memory. Anything compared more than three times needs a sample you can replay, or the next round repeats a hypothesis already eliminated.

When to change the method

Long forms that keep collapsing, diction that never passes in the target language, exact harmony that will not land: these are not prompt problems. More words only crowd the constraints. Generate in parts, switch to a symbolic tool, or treat the output as raw material. Debugging ends in a change of method, not a longer prompt.

Listen in the library

Symphony No.5 Op.67C10:37四音动机贯穿全曲,改提示后动机丢失说明约束层级错了(C1)DetailsToccata and Fugue in D minor BWV 565C126:00二十六分钟长曲,偏差按时间码累积,先分段再排错(C1)Detailsfunk-groove1 · 138 BPM · beat 4/4C10:38138 BPM 放克鼓组,同一提示重跑才看得出随机性(C1)DetailsSymphony No.5C17:30十分钟长弧,模型维持不住时换方法而不是加词(C1)Details

All tracks from midicn-lib — inline badge is the license tier (C1 commercial / C2 non-commercial / C3 study only).

Along the same line

Sources

  • Suno 与 Udio 官方帮助中心关于随机性、种子与版本行为的说明。
  • 实验设计与对照测试的公开教材章节,关于单变量原则。
  • 音乐制作质量控制惯例,关于分段验收与 A/B 对照。