Prompt Engineering
Module 2: Advanced Patterns & Real Work
2.2 Iterative Refinement

2.2: Iterative Refinement

What You'll Learn

  • Why a disappointing first draft is normal and fixable
  • The five root causes of a failing prompt
  • How to diagnose the actual problem before changing anything
  • A repeatable refinement loop, and a reference list of common failure patterns and fixes

Key Concepts

The Debugging Mindset

When AI output misses, most people either give up or keep rephrasing at random. A better approach is to treat it like debugging: find the cause, then apply a targeted fix.

Five Causes of Failure

  1. Vague task: the AI didn't know what you wanted.
  2. Missing context: it didn't have the information it needed.
  3. Wrong format: the content was right but the structure wasn't.
  4. Conflicting instructions: you asked for things that contradict each other.
  5. Scope mismatch: you asked for too much, or too little, in one prompt.

The Refinement Loop

Complex tasks usually take about three rounds, and each round takes seconds:

  • Round 1: generic and unusable
  • Round 2: structured and reasoned, with some gaps
  • Round 3: complete, specific, and actionable

The Exercises

You'll diagnose two broken prompts from the course files, one with conflicting instructions and one with no context at all, and work out the fix yourself. Then you'll take a single prompt through three rounds of refinement and watch the output improve at each step.

How to Start

This lesson is taught interactively by your AI. Download the course materials, open your AI tool (Claude, ChatGPT, or similar), and say:

start lesson 2.2

MIT 2026 © Nextra.