Skip to main content
AI Foundations

⏱ About 15 min15 XP

Iterating on Prompts

Here is a truth about expert prompt writers that surprises most beginners: they almost never get a perfect result on the first try. That is not failure — that is the process. The best prompts are not written; they are revised. Writing a prompt, reading the result critically, diagnosing what went wrong, and refining the prompt is a skill loop that separates casual users from people who can reliably extract excellent work from these tools. This lesson is about that loop. You will learn how to read a model's output as a diagnostic — what it tells you about your prompt — and how to make targeted improvements rather than just trying again with a slightly different wording.

The Prompting Loop

The prompting loop has four steps, and you may go around it several times for any given task. Step 1 — Draft. Write your best first prompt using the ingredients from Lesson 6: task, context, format, constraints, examples if you have them. Step 2 — Generate. Run the prompt and read the output carefully. Resist the temptation to skim. Read every sentence. Step 3 — Diagnose. Ask yourself: where specifically did the output fall short? Was it too long or too short? Did it miss the point? Was the tone wrong? Did it use jargon I said to avoid? Did it add information I did not ask for? Be precise in your diagnosis. Step 4 — Refine. Add, remove, or sharpen the part of your prompt that corresponds to the diagnosis. Rerun. Repeat from Step 2. The refinement in Step 4 should be surgical. If the output was too long, add a length constraint. If the tone was too formal, specify the tone you want. Do not throw out the whole prompt and start over — that discards the parts that were working.

Output as Diagnostic

A disappointing model output is not just a bad result — it is information about your prompt. Every flaw in the output points to something that was missing, vague, or contradictory in your instructions. Skilled prompt writers read outputs as feedback, not as final verdicts.

Let us walk through a real iteration. Suppose you need to write a thank-you email to a teacher who wrote you a college recommendation. First attempt: 'Write a thank-you email to my teacher for writing my recommendation letter.' Output: Generic, formal, mentions nothing specific, sounds like a template. Diagnosis: The model had no context about the teacher, your relationship, or any specifics. The output is generic because your prompt was generic. Revised prompt: 'Write a warm, sincere thank-you email to my 10th-grade English teacher, Mr. Vasquez, who wrote a recommendation letter for my application to a summer coding program. Mention that his class was where I first got serious about writing. Keep the tone personal and genuine, not overly formal. About 150 words.' Output: Specific, warm, mentions the English class, appropriate length, personal tone. One refinement cycle, one dramatically better result. The revision added context (the teacher's subject, the relationship, the specific program), a tone constraint (warm, genuine), and a length constraint (150 words).

Common Failure Modes and How to Fix Them

With practice, you will recognize recurring patterns in what goes wrong and know exactly what to add to your prompt. Too generic: The output could apply to anyone. Fix: Add specific context, names, details, and purpose. Wrong length: Too long or too short. Fix: Add an explicit word or sentence count. Wrong format: Bullet points when you wanted prose, or vice versa. Fix: Specify the format explicitly. Wrong audience level: Too technical or too simple. Fix: State the audience's age, expertise level, and prior knowledge. Added things you did not want: The model added a disclaimer, a closing sentence, a preamble you did not ask for. Fix: Explicitly say 'Do not include a preamble' or 'Start directly with the content.' Ignored part of your instruction: The model addressed the main task but missed a secondary one. Fix: Move the missed instruction to the beginning of the prompt, or repeat it with emphasis at the end.

Match each output problem to the correct prompt fix.

Terms

Output is too generic and could apply to anyone
Output is far longer than you needed
Output uses jargon the reader will not understand
Output includes an unwanted disclaimer paragraph
Output ignores one of your two instructions

Definitions

Move the ignored instruction to the top of the prompt or repeat it at the end
Explicitly instruct the model not to include disclaimers or preamble
Add specific names, details, and purpose to the prompt
Add a constraint specifying the audience's level and forbidding technical terms
Add an explicit word count or sentence limit

Drag terms onto their definitions, or click a term then click a definition to match.

Save Your Winning Prompts

Once you craft a prompt that works reliably for a recurring task — like 'summarize a news article in three bullet points' or 'rewrite this paragraph for clarity' — save it somewhere. A personal prompt library is one of the most practical skills you can build. It is a collection of tools you know work.

A student's prompt produces output that is correct but uses technical vocabulary the audience cannot understand. What is the most targeted fix?

Why is it better to make surgical prompt refinements rather than rewriting from scratch?

The Three-Round Challenge

  1. Choose a task: summarize a short article you have read, write an opening paragraph for an essay topic you are studying, or draft a message asking for help with a project.
  2. Round 1: Write your first prompt with no overthinking. Just go.
  3. Round 2: Read the output carefully. Write down exactly what is wrong with it. Then revise the prompt to fix those specific problems. Generate again.
  4. Round 3: Read the Round 2 output. What still needs work? Make one more targeted refinement. Generate a third time.
  5. Compare your Round 1 and Round 3 outputs side by side.
  6. Write two or three sentences reflecting: What pattern did you notice about your own prompting weaknesses? What will you do differently first next time?