6 Prompt Patterns You Can Use Right Away at Work
I've been using LLMs for quite a while since last year for planning, documentation, and code work, and I've picked out only the patterns that actually worked. These are things that work regardless of whether the model is GPT or Claude.
- Give the role and constraints first: When you specify starting conditions like "You are a backend developer. Don't use external libraries. Split your answer into two blocks: code and explanation," the variance in results drops sharply.
- Include one example: Showing the desired output format once is often better than ten lines of explanation. Especially when extracting JSON or table formats.
- Break it into steps: Saying "Don't answer right away; first organize the premises, then answer" clearly reduces logical errors. It's especially noticeable in complex calculations or design.
- Make it say when it doesn't know: Adding "mark uncertain parts as guesses" reduces plausible-sounding lies. The downside is that answers become a bit frustrating.
- Have it critique itself: After getting a draft, run one more pass with "Point out 3 weak parts in this answer and fix them," and quality improves quite a bit.
- Specify length numerically: Be concrete, like "three paragraphs, three sentences each." "Short" almost never works.
In the end, prompts are a lot like requirements specs. Give vague input, get vague output. Please share any patterns you use.
8 answers
Is there a source?
Well, that's a bit... splitting things into steps only really works with weaker models; these days some even say it's just a waste of tokens.
It looks like the end of the post cuts off at "quality"—was the sixth pattern truncated? I'm enjoying the content.
Agreed—especially adding just one example really makes a noticeable difference. No matter how long the explanation is, a single line of example lands better.
Making it say "I don't know" when it doesn't know is genuinely necessary, but the side effects are significant. Even things we were certain about were labeled "speculation," which made the answers mushy, so in the end we went with removing that clause. Instead, we compromised by adding a separate clause just for citing sources.
Making it self-critique works surprisingly well lol. I get a draft and then run it with, "Assume the person who wrote this answer is wrong and write three counterarguments," and that turns out better.
Honestly, I remember there was a benchmark showing that role assignment has almost no effect in recent models. The perceived improvement is often just because people end up writing more specific prompts. The part about “variance dropping dramatically” seems a bit exaggerated—if there’s data from a comparative experiment on that, I’d like to see it.
Pattern 2 is genuinely handy for document work. When I need to extract a table format, I create one blank example and throw in "follow this format exactly"—that alone once saved me half a day of post-processing code. But if the example is too long, the model also follows the example content and fills in irrelevant values, so these days I only include the header and one row.