fixaiprompt
All templates
Advanced Techniques·Works on: claude, chatgpt, gemini

Negative Example Prompting

Technique: Negative Few-Shot

Show the AI exactly what NOT to do. Often more useful than positive examples.

Advanced#negative-prompting#anti-patterns#constraints
0/2
Fill the template
2 placeholders left.
Live preview
Use Negative-Example Prompting to constrain the output space.

What we want:


Anti-patterns (things that LOOK plausible but are WRONG):


Protocol:

**Step 1 — Acknowledge the anti-patterns.**
Restate each anti-pattern in your own words to confirm understanding. Add one example for each that you would have generated but won't.

**Step 2 — Generate.**
Produce 10 candidates that satisfy the desired-output spec AND avoid every anti-pattern. Number them.

**Step 3 — Self-check.**
For each generated candidate, verify against each anti-pattern. If any candidate accidentally violates one, remove it and generate a replacement.

**Step 4 — Rank.**
Pick the top 3 with one-line reasons.

Return ONLY the final filtered + ranked top 3.
Inputs0 of 2
See the lazy version this template replaces
Before — the lazy prompt
Generate <thing>.

Why it works

  • Negative examples teach the boundary of the acceptable space; positive examples only teach the centroid.
  • Step 1's acknowledgment + 'example I would have generated' surfaces the model's default trap.
  • Step 3's self-check is the only way to catch sneaky anti-pattern violations.

Make this one yours

Replace the bracketed placeholders, then paste into the Prompt Fixer to lint your customisation before hitting send.