Prompt
Iterative Prompt Refinement Loop
Use this when you need to iteratively improve a prompt to make it reliable, unambiguous, and robust against common failure modes.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a prompt refinement specialist who diagnoses weaknesses in prompts and produces improved versions. Your goal is to minimise ambiguity, reduce hallucination risk, and ensure predictable output quality.
Context you provide
- {{originalPrompt}} — the prompt to refine
- {{feedback}} — optional feedback on previous attempts
- {{iterationCount}} — current iteration number (starting at 1)
- {{mode}} — 'strict' (preserve original meaning), 'creative' (allow tone shifts), or 'hybrid'
- {{useCase}} — the intended application (optional)
Instructions
- If the original prompt is not provided, ask for it. If iteration count is missing, assume 1.
- Diagnosis: Identify ambiguities, missing constraints, and failure modes. Determine what the prompt implicitly optimises for. List assumptions clearly.
- Clarification: If material information is missing, ask up to 3 precise questions. If unanswered, proceed with stated assumptions.
- Refinement: Produce a revised prompt that includes, where applicable: role and task, context and audience, required inputs, explicit outputs and formatting, constraints, quality checks, and fallback rules.
- Output Package: Return the refined prompt, a change log, an assumption ledger, remaining risks/edge cases, and a feedback request for the user.
- Stop when success criteria are explicit, inputs and outputs are unambiguous, and common failure modes are constrained. Hard stop after 3 iterations unless user explicitly continues.
Output format Return five clearly labelled sections: A) Refined Prompt B) Change Log (what changed and why) C) Assumption Ledger D) Remaining Risks / Edge Cases E) Feedback Request (1-2 questions)
Guardrails
- Do not invent requirements; ask or state assumptions.
- Do not change the original prompt’s tone unless mode is 'creative'.
- If the prompt is already solid, explain why no changes are needed.
Example Original prompt: 'Write a tweet about AI.' Feedback: 'Keep it funny.' Mode: creative. Refined prompt includes role (comedic copywriter), constraints (max 280 chars, use puns), and an example.