I wasted months guessing at prompts before I figured out what actually works. These six techniques changed everything.
๐ Updated June 2026 ยท 7 min readI've been prompting AI models daily for two years โ ChatGPT, Claude, Gemini, the works. Most of the "advanced techniques" floating around Twitter are fluff. But these six? They consistently deliver. Each comes with a real example you can steal and tweak for your own work.
Here's the thing about prompting: it's not rocket science, but it's also not "just talk to it like a person." There's a sweet spot where you're specific enough to get what you want, but not so rigid that you kill the model's creativity. These techniques live in that sweet spot.
Bad: "Write about AI"
Good: "Explain how transformers work in AI, at beginner level, with a real-world analogy, in 300 words"
Vague prompts get vague answers. When I started including format, audience, and a word count, my results went from mediocre to exactly what I needed in one shot. It sounds obvious, but most people don't do it โ they toss out a half-formed question and wonder why the response is generic.
The difference between "write a blog post about productivity" and "write a 400-word blog post about morning routines for freelancers with ADHD, use a casual tone, and include one personal anecdote" is night and day. The first prompt gives you bland corporate sludge. The second gives you something you'd actually publish.
I've learned to treat prompts like a spec document. What's the format? Who's the audience? How long should it be? What tone are we going for? Answer those four questions before you type anything else, and you've already won half the battle.
Prompt: "You are a senior Python developer reviewing my code for security vulnerabilities. Here is the code: [code]"
Tell the AI who it is and it suddenly gets 10 IQ points in that domain. I use this trick constantly for coding reviews, content editing, and anything that requires domain expertise. The model already has the knowledge โ the role assignment just activates the right part of its training.
It gets even better when you layer in specific traits. "You are a skeptical editor at a science magazine who fact-checks everything" produces radically different output from "you are an enthusiastic blogger who loves clickbait headlines." Same facts available to both โ but the framing flips completely.
One thing I've noticed: the more specific the role, the better the output. Not just "a doctor" but "an ER doctor with 15 years of experience who's seen every kind of case." The model doesn't actually have 15 years of ER experience, but the prompt primes it to think more carefully and draw from a narrower slice of its training data.
Prompt: "Solve this problem step by step. Show your reasoning at each step before giving the final answer."
Making the AI "show its homework" cuts errors dramatically. I use this for anything involving math, logic puzzles, or multi-step reasoning. It's almost like giving the model scratch paper โ it forces intermediate calculation instead of jumping straight to a guess.
The research backs this up. Chain-of-thought prompting improves accuracy on reasoning tasks by 20-40% across most models. It's not magic โ it's giving the model more tokens to work with, which means more computation per answer. More "thinking time," in effect.
You can even combine this with other techniques. "You are a math professor grading a difficult proof. Walk through each step, explain why it's correct or incorrect, and then give the final answer." Now you've got role-based chain-of-thought, and the results are noticeably sharper than either technique alone.
Prompt: "Convert sentences to pirate speak. Input: Hello friend โ Output: Ahoy matey! Input: How are you โ Output: How be ye sailin?"
Two or three examples beat a paragraph of instructions every time. This is my go-to when I need consistent output formatting across dozens of prompts. The model pattern-matches way better than it follows written rules โ show it what you want, don't just describe it.
I discovered this accidentally when I was trying to teach a model to format JSON responses. I wrote 200 words of instructions about key names, nesting, and data types. The output was a mess. Then I just showed two examples of correctly formatted JSON, and suddenly every response was perfect. The model doesn't need the rulebook โ it needs to see the pattern.
The sweet spot is 2-3 examples. One example isn't enough to establish the pattern. Four or more examples take up too many tokens without adding much value. Two or three, each showing a slightly different case, gives the model enough signal to generalize without overfitting to a single example.
Prompt: "List 5 marketing ideas. For each: name, one-sentence description, target audience, estimated cost (low/med/high). Use bullet points."
Without constraints, AI rambles. With clear formatting instructions โ bullet points, tables, JSON, markdown โ you get structured output that's immediately usable. I've saved hours by specifying "respond in a CSV table with columns X, Y, Z" instead of asking for prose and then manually extracting the data.
This is especially powerful when you're building anything programmatic. "Return a JSON array with the following schema" is a prompt I use at least twice a day. The model handles it flawlessly 95% of the time, and when it doesn't, the error is obvious โ a missing bracket or an extra comma โ rather than a subtle content problem you'd miss in prose.
The constraint doesn't have to be technical. "Keep it under 280 characters" for tweet-length responses. "Use only words a 12-year-old would understand" for simplicity. "No bullet points โ use full paragraphs" when you want narrative flow. The constraint IS the instruction.
Prompt: "That's good, but make it more casual and remove the statistics section. Replace it with a real example from someone who actually did this."
Nobody gets the perfect output on the first prompt. The pros know this and treat prompting as a conversation, not a one-shot query. My best work comes from a back-and-forth where each response gets refined based on what the model produced.
I've learned to think of the first prompt as a rough draft. It gets the model pointed in the right direction and surfaces what it knows about the topic. The second and third prompts are where the magic happens โ now I can point to specific things I want changed, elaborated, or removed. It's like editing a writer, except the writer has infinite patience and works at the speed of light.
The most underrated prompt is simply: "Try again, but this time [specific change]." People give up after one mediocre response when two more iterations would get them exactly what they need. Don't be that person. Three rounds of refinement takes 60 seconds and transforms the output.
| Technique | Best For | Effort Level | Impact |
|---|---|---|---|
| Specificity | Every single prompt | Low | High |
| Role-Based | Technical writing, code review, analysis | Low | High |
| Chain-of-Thought | Math, logic, multi-step reasoning | Low | Very High |
| Few-Shot | Consistent formatting, style transfer | Medium | High |
| Constraints | Structured output, programmatic use | Low | High |
| Iteration | Anything that's not right the first time | Medium | Very High |
The pattern should be obvious: these techniques stack. A prompt with specificity + role + constraints will outperform any single technique alone. The best prompters I know use 3-4 of these in every prompt without even thinking about it.
Be specific. Include format, length, tone, audience. A 30-second detailed prompt saves 5 minutes of editing poor output.
0-0.3 for factual/technical work. 0.5-0.7 for creative writing. 0.8-1.0 for brainstorming and ideation where you want variety.
Yes โ even more so. Better models reward better prompts more than older models did. The gap between a good prompt and a bad one has actually grown, not shrunk.
Yes, but expect variations. ChatGPT responds differently than Claude which responds differently than Gemini. Tweak your prompts per model for best results.
Longer than you think. 50-200 words for complex tasks. The best prompts are mini-briefs, not one-liners. Every extra sentence of instruction improves the output.
Prompt engineering isn't a dark art. It's mostly about being specific, giving the model structure, and iterating when the first try isn't perfect. These six techniques cover 90% of what you'll ever need.
What I've learned from two years of daily prompting is that the prompt IS the product spec. Just like a vague product spec produces a bad product, a vague prompt produces bad writing. Garbage in, garbage out โ the oldest rule in computing still applies.
The people who get the most out of AI aren't the ones with the fanciest prompt frameworks. They're the ones who treat prompting like a skill they practice, not a magic trick they learn once. Every day I discover a new wrinkle โ a slightly better way to phrase something, a constraint I hadn't thought to add, a role that produces surprisingly good results.
Ready to practice? Head to chatgpt.com or claude.ai โ both free. Try the specificity technique first: pick something you need written and add format, audience, length, and tone. You'll see the difference immediately.