Back to prompts
AI Masteryintermediate
4.8

Prompt Debugging Framework — Fix AI Outputs That Aren't What You Wanted

Systematically diagnose why your prompt isn't giving good results and fix it — using a structured debugging approach that works for any AI model.

Copy & Paste this prompt
You are a prompt engineering consultant who helps people fix underperforming prompts. Debug mine.

My Situation:
- AI model I'm using: [ChatGPT / Claude / Gemini / Other]
- My prompt: [PASTE YOUR CURRENT PROMPT]
- What I WANTED to get: [DESCRIBE IDEAL OUTPUT]
- What I ACTUALLY got: [DESCRIBE THE PROBLEM — too vague? Wrong format? Missed the point? Too generic?]
- How many times I've tried: [NUMBER]
- Variations I've tested: [WHAT CHANGES DID YOU MAKE?]

Debug my prompt:

**1. DIAGNOSIS**
Identify the specific failure mode:
- [ ] Too vague (AI doesn't know what you want)
- [ ] Wrong format (right content, wrong structure)
- [ ] Too generic (not tailored to context)
- [ ] Hallucinating (making things up)
- [ ] Ignoring instructions (skipping parts of the prompt)
- [ ] Wrong persona/tone
- [ ] Too short / Too long
- [ ] Missing context (AI doesn't have enough info)

**2. ROOT CAUSE**
Explain WHY the AI is responding this way (what it's interpreting from my prompt).

**3. THE FIX**
Rewrite my prompt addressing the issue. Show:
- Fixed version (ready to use)
- What I changed and why (so I learn the principle)
- Before/after comparison of the key changes

**4. PRINCIPLES VIOLATED**
Which prompt engineering principles was I breaking?
- Specificity (was I too vague?)
- Structure (did I organize clearly?)
- Context (did I provide enough background?)
- Constraints (did I set boundaries?)
- Examples (did I show what I want?)
- Role (did I set the right persona?)

**5. PREVENTION CHECKLIST**
A quick checklist I can use before submitting ANY prompt:
- [ ] Clear role/persona defined
- [ ] Specific output format described
- [ ] Context provided
- [ ] Examples included (if complex)
- [ ] Constraints set (length, tone, what to avoid)
- [ ] Success criteria clear

**6. ADVANCED TECHNIQUES**
If the basic fix doesn't work:
- Chain-of-thought approach for my problem
- Few-shot examples strategy
- System vs user message split
- Temperature/parameter suggestions

Don't just fix it — teach me WHY it broke so I stop making this mistake.
#prompt-engineering#debugging#AI#optimization#troubleshooting

Works with

chatgptclaudeany

💡 Pro Tips

  • 90% of bad AI outputs are caused by vague prompts, not model limitations
  • Ask follow-up: 'Now give me a template I can reuse for ANY email prompt'
  • When output is wrong: add constraints. When output is generic: add context and examples.

✨ Example Output

🔍 DIAGNOSIS: Too Vague + Missing Format

Your prompt: 'Write me a marketing email'
Problem: Generic, no personality, could be about anything

🧠 ROOT CAUSE:
The AI has no context about: who you're emailing, what you're selling, what tone, what length, what CTA. It's filling in blanks with generic marketing speak.

✅ THE FIX:

BEFORE:
'Write me a marketing email'

AFTER:
'You're a conversion copywriter for a B2B SaaS company. Write a re-engagement email to users who haven't logged in for 30 days.

Context: We're a project management tool, $49/mo. These users completed onboarding but stopped using us.

Requirements:
- Subject line: curiosity-driven, under 50 chars
- Length: 100 words max
- Tone: Helpful, not desperate. Like a friend checking in.
- CTA: One clear action (not 'visit our blog')
- Include: One specific feature they haven't tried
- Avoid: Discounts, guilt trips, corporate speak'

📝 PRINCIPLES VIOLATED:
1. No role (who should AI pretend to be?)
2. No context (what product? what audience?)
3. No constraints (length? tone? format?)
4. No success criteria (what makes this email 'good'?)

🧠 Why This Works

Most people blame the AI when results are bad, but the prompt is almost always the problem. This framework applies systematic debugging — identify the failure mode, understand root cause, fix with principles. Like debugging code, it's methodical rather than trial-and-error.

📅 When to Use This Prompt

Whenever AI output disappoints you, when you've tried the same prompt multiple times without improvement, when you want to level up your prompt engineering skills, or when training a team to use AI effectively.

🎯 What You'll Get

A rewritten prompt that produces the output you actually wanted, plus understanding of WHY it broke and a checklist to prevent the same mistake. Over time, you'll develop the instinct for writing effective prompts on the first try.

🔗 Related Prompts