Skip to content

Prompt Iteration Cycle

Run the Prompt Iteration Cycle MicroSim Fullscreen
Edit in the p5.js Editor

About This MicroSim

This MicroSim visualizes the iterative prompt refinement loop — the core workflow that separates effective prompt engineers from casual users. Five nodes arranged in a clockwise cycle show each step: writing a prompt, sending it to a model, evaluating the response, diagnosing issues, and refining the prompt. A quality gauge in the center fills from red to green as you complete iterations, making the abstract concept of "improvement through iteration" tangible.

The click-through examples demonstrate how the same prompt task (writing a golden retriever care guide) evolves from a vague one-liner into a precisely crafted instruction across five iterations.

How to Use

  1. Click the nodes in clockwise order, starting with "Write Prompt" at the top
  2. Each click reveals a concrete example showing what happens at that step for the current iteration
  3. After visiting all 5 nodes, the quality gauge advances and a new iteration begins
  4. Complete all 5 iterations to see the gauge reach 100% (green)
  5. Hover over any node to see a description of what that step involves
  6. Use the Reset button to start over

Iframe Embed Code

You can add this MicroSim to any web page by adding this to your HTML:

1
2
3
4
<iframe src="https://dmccreary.github.io/prompt-class/sims/prompt-iteration-cycle/main.html"
        height="547"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Grade Level

High School through Adult Learners

Duration

10-15 minutes

Prerequisites

Basic familiarity with using an AI chatbot (e.g., ChatGPT, Claude)

Activities

  1. Exploration (5 min): Click through one complete iteration cycle. Read each example carefully and notice how the prompt improves.
  2. Guided Practice (5 min): Complete all 5 iterations. At each "Diagnose Issues" step, try to predict what the fix will be before clicking "Refine Prompt."
  3. Discussion (5 min): Discuss with a partner: Which refinement step made the biggest difference? Why does iteration matter more than getting it right the first time?

Assessment

  • Students can name the 5 steps of the prompt iteration cycle
  • Students can explain why each evaluation step leads to a specific refinement
  • Students can apply the cycle to improve a prompt of their own

References

  1. Prompt Engineering Guide - Comprehensive resource on prompt engineering techniques
  2. OpenAI Prompt Engineering Best Practices - Official guidance on crafting effective prompts