Prompt Iteration

What Is Prompt Iteration?

Prompt iteration is the process of refining a prompt based on the model's output. No prompt is right on the first try. The first version establishes what the model produces — each subsequent version fixes one thing that was wrong with that output.

The Right Mental Model

Prompt iteration is debugging — but the target is the prompt, not the code. The model's output is the symptom. The prompt is the source. When the output is wrong, the question is always: which part of the prompt caused this?

The Iteration Loop

01

Write a prompt — start with the clearest description you can of what you want; don't over-engineer the first version

02

Examine the output — read the response carefully and identify exactly what is wrong; "the output is bad" is not a diagnosis

03

Diagnose specifically — name the failure: too long, wrong format, wrong tone, missing content, wrong assumption about audience

04

Fix exactly that — change the part of the prompt responsible for the specific failure; leave everything else the same

05

Repeat — run the prompt again, examine the new output, and continue until the output meets your requirements

The Key Discipline

The most important step is step 2: be specific about what is wrong. "The output is too long," "The format is wrong," and "The tone is too casual" each point to a specific fix. "It's not right" does not.

Diagnosing Bad Output

Different failure types require different fixes. Match the symptom to the right prompt change.

Output too long — add a length constraint: "In under 100 words." / "In exactly three sentences."

Output too vague — the task instruction is underspecified; add more detail to what you are asking for

Wrong format — add an explicit format instruction; if that fails, add a few-shot example showing the exact format

Wrong tone — add a tone constraint or assign a role that implies the tone you want

Missing key content — add that content to the task instruction explicitly; the model cannot include what it does not know you want

Irrelevant content — add a scope constraint: "Focus only on X. Do not cover Y."

Inconsistent across runs — add few-shot examples that demonstrate the expected output pattern

Wrong audience level — add an audience constraint specifying the exact reading level and assumed knowledge

Common Iteration Moves

01

Add the missing constraint — most first-draft prompts are missing length, tone, or audience specification; adding one of these often resolves the failure

02

Make the task more specific — identify the exact part of the task instruction that was ambiguous and rewrite it with more precision

03

Switch from description to demonstration — if describing the output is not working, add a few-shot example that shows it

04

Rearrange the prompt — instructions at the beginning and end of a long prompt are followed more reliably than those buried in the middle

05

Split a complex prompt — if one prompt is doing too much and results are poor, break it into two sequential prompts with separate, narrower purposes

The One Change Rule

Why You Should Change Only One Thing Per Iteration

If you change the task instruction, the format, and the examples simultaneously, you cannot know which change fixed the problem — or which caused a new one. Change one thing per iteration. This is slower in the short term but produces a prompt you fully understand, and makes future changes predictable. It is the same discipline as controlled experiments in science.

Summary

Key Takeaways
  • Prompt iteration is debugging the prompt based on model output — the model's output is the symptom; the prompt is the source
  • The loop: write → examine → diagnose specifically → change the responsible part → repeat
  • Be specific in diagnosis: "too long," "wrong format," and "wrong tone" each point to a specific fix
  • Match the failure type to the right fix: length constraint, task specificity, format instruction, few-shot examples
  • Change only one thing per iteration — multiple changes prevent you from knowing what worked
  • If description fails, switch to demonstration; if a single prompt does too much, split it into two

Need Help?

Ask the AI if you need help understanding prompt iteration, how to diagnose a specific failure in your prompt output, which prompt change to make for a given problem, or how to systematically improve a prompt you are working on.