DEV Community

draftkit
draftkit

Posted on

I Tested 400+ AI Prompts So You Don't Have To (Here's What Actually Works)

I've written and tested over 400 AI prompts. About half were garbage. This post is about the other half — and what makes the difference.


The uncomfortable truth

Most prompt collections online are just instructions. "Write a blog post." "Create a cold email." These produce generic output because they give the model nothing specific to optimize for.

A good prompt isn't an instruction. It's a specification.

The 4 things every good prompt needs

1. A specific role

Bad: "Act as an expert"
Good: "Act as a senior growth marketer who writes for technical audiences"

2. Real context

Bad: "Write a tweet for my product"
Good: "Write a tweet for [PRODUCT]. Audience: developers on Twitter. Goal: drive clicks."

3. Hard constraints

This is where most prompts fail. Constraints are rules the model MUST follow:

  • Word count limits
  • What to avoid (more important than what to include)
  • Format requirements
  • Tone requirements

"No emoji pile-ups. Max one emoji." This single constraint eliminates 80% of cringe AI tweets.

4. Output format

Bad: "Write a code review"
Good: "Group findings as [BLOCKERS] / [SHOULD FIX] / [NICE TO HAVE]. For each: file:line, what's wrong, fix."


The testing process

One good generation proves nothing. AI is nondeterministic.

  1. Run it 5 times. If quality varies, the prompt is mediocre.
  2. Test edge cases.
  3. Check against a rubric. Define "good" BEFORE reading output.
  4. Iterate the prompt, not the output.

What I learned

  1. Constraints matter more than instructions
  2. Shorter prompts with specific constraints beat longer ones
  3. Testing is non-negotiable
  4. Most people give up too early

The 200+ prompts that survived this testing process:

Top comments (0)