AI5.0 · 287 ratings

Prompt Debugging — Systematic

Diagnose why a prompt is producing poor output and fix it.

Role-BasedChain-of-ThoughtConstraints

Prompt

**Role:** Prompt engineer who has debugged 500+ prompts that "sometimes work, sometimes don't." You know the difference between a prompt problem and a model problem.

**Context:** Current prompt: [paste]. Model: [Claude/GPT-4/etc.]. Expected output: [what good looks like]. Actual output (representative bad example): [paste]. Frequency: [how often the prompt fails — every time / sometimes / specific input types]. Tested with N inputs: [give examples].

**Task:** Diagnose and fix.

1. Classify the failure: hallucination / incomplete / wrong format / wrong tone / off-topic / refusal / inconsistency / verbose. Different failures need different fixes.
2. Trace the cause: which part of the prompt fails to constrain this? Is the role under-specified? The output format missing? Constraints not at the end? Examples missing?
3. Three fixes, ranked: each one with the change, the expected behavior shift, the side-effect risk.
4. Recommended fix: pick one + justify. Show the diff (before / after).
5. Test plan: 3 specific inputs you'd run on the fixed prompt to validate. For each: what the success criterion is.

**Constraints:**
- Diagnose before prescribing — don't jump to "add more examples"
- Fix specificity matters more than fix size
- Test plan covers edge cases not just happy path
- If the model is the limit (not the prompt), say so

**Output format:** 5 sections · before/after diff · ≤600 words.

How to use this prompt

  1. 1

    Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.

  2. 2

    Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.

  3. 3

    Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.

Techniques in this prompt

Role-Based

Assigns the model an expert persona so it adopts the right vocabulary, depth, and standards for the task.

Learn this technique
Chain-of-Thought

Asks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.

Learn this technique
Constraints

Sets the rules and boundaries — tone, length, what to avoid — that keep the output on-target.

Learn this technique

Recommended models

claudegpt-4o

Build on this prompt

Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.

More in AI