How to Write AI Prompts That Actually Work
Most people blame the model when AI output is bad. The model is almost never the problem. The prompt is. Here's the exact framework for building prompts that consistently produce expert-level results — regardless of which AI you're using.
Why most prompts fail
Here is what a typical AI prompt looks like:
The gap between these two is not about which AI model you're using. It's entirely about the prompt. The model defaults to safe, generic output when you give it room to do so. The only way to close that room is with structure.
Here's the core insight: AI models are pattern-matching systems. When you write a vague prompt, you're giving the model a wide pattern space to match against. It will find the most common, average response to that pattern — which is usually bland, generic, and unhelpful. When you write a specific, structured prompt, you narrow the pattern space dramatically. The model is forced to operate in a much more precise register.
This is why switching models rarely fixes the problem. A vague prompt will produce mediocre output from any model. A structured prompt will produce excellent output from basically any decent model.
The five components of a structured prompt
Every high-performing prompt contains these five elements. You can skip some for simple tasks, but the more complex the task, the more important each component becomes.
Role calibration
Telling the model who it is completely changes the vocabulary, depth, and analytical framework it applies. The key is specificity. "You are an expert" is essentially useless. "Senior equity research analyst with 12 years covering Nordic technology companies, specializing in SaaS valuation multiples" gives the model an actual framework to operate within.
The role should match your actual need. If you're writing a technical architecture document, you want a senior staff engineer at a company known for engineering rigor, not a generic "software expert." The more precisely the role matches the domain, the more domain-appropriate the output will be.
Layered context
Context is not a single block of background information. It's a stack of layers, each narrowing the output further. The four layers are: industry context (the field and its standards), company/situation context (your specific case), audience context (who will consume this output), and constraint context (what you cannot do or don't want).
Skipping even one layer tends to produce output that's too broad to be useful. Industry context without situation context gives you generic industry analysis. Situation context without audience context gives you the right analysis in the wrong format.
Task decomposition
"Give me a strategy" is not a task. It is a category. A properly decomposed task breaks down exactly what you want into 3–6 specific, enumerated deliverables. Instead of "give me an analysis," you write: "Give me (1) a root cause assessment, (2) three viable solutions ranked by implementation cost, (3) a recommendation with supporting reasoning, (4) the top three risks and a mitigation for each."
This works because it forces the model to produce a complete answer rather than stopping at a high-level summary. It also makes gaps immediately obvious — if you ask for four specific things and the model gives you two vague ones, you know exactly what to push on.
Negative constraints
Negative constraints are the most underused technique in prompting, and they're incredibly powerful. Telling the model what NOT to do directly overrides its default tendency toward safe, hedged, generic output. "Do not use filler phrases. Do not hedge every statement. Do not give advice that applies equally to any company in any industry. Skip any section that would be obvious to a professional in this field."
The reason this works: AI models are trained to be helpful and comprehensive, which creates a strong pull toward over-hedging and including generic context. Explicit negative constraints act as a filter on that pull.
Format specification
Tell the model exactly how you want the output structured. Headers or prose? Bullet points or paragraphs? How long should each section be? What should come first? Unspecified format means the model will default to whatever format is most common for similar tasks — which may or may not be what you need.
This is especially important for professional documents. If you're generating a memo for a board meeting versus a draft email to a client versus internal research notes, the format requirements are completely different. Specify them explicitly.
Model-specific formatting: why it matters
One detail that almost no one pays attention to: different AI models process prompt structure differently, and formatting your prompt for the specific model you're using meaningfully improves output quality.
Use XML tags
Claude's training heavily emphasizes XML structure. Wrapping sections in <role>, <context>, <task>, and <constraints> tags keeps components separate and prevents instructions from bleeding into each other.
Use markdown headers
GPT-4o and GPT-4o mini handle markdown well. Use ## headers to separate sections, bold for emphasis, and numbered lists for task decomposition. Avoid XML — it doesn't give ChatGPT the same structural benefit it gives Claude.
Bold headers and clear hierarchy
Gemini responds best to clear visual hierarchy with bold labels. Use **Role:**, **Context:**, **Task:** as section markers. Keep sections short and clearly delineated rather than flowing between sections.
Put constraints last
Regardless of model, constraints are most effective when placed at the end of the prompt rather than the beginning. Models prioritize recency in long contexts, and constraints that appear last tend to be applied more consistently.
This isn't theoretical. Run the same structured prompt against Claude with XML tags and without them. The difference is immediate and obvious in tasks that require maintaining distinct roles, contexts, and constraints simultaneously.
Baking in reasoning techniques
The most significant lever most people haven't pulled: explicitly telling the model which reasoning framework to use.
By default, models use associative reasoning — they find patterns that match the input and generate output based on those patterns. That's fine for simple tasks. For complex analysis, you want to force a specific reasoning mode.
- First principles: "Break this problem down to its most fundamental components and reason up from there. Do not rely on analogies or industry conventions."
- Red team analysis: "Argue the strongest possible case against this strategy. Assume you are a sophisticated critic with domain expertise."
- MECE decomposition: "Break this down into mutually exclusive, collectively exhaustive categories. Do not allow overlap between sections."
- Pre-mortem: "Assume this project has failed 12 months from now. Work backwards from failure to identify what went wrong."
- Systems thinking: "Map the second and third-order effects of this decision. What feedback loops exist?"
Adding a single reasoning technique directive to an otherwise solid prompt dramatically changes the depth and structure of the output. This is especially true for strategic analysis, risk assessment, and complex technical decisions.
Full before/after examples
Finance: earnings analysis
Marketing: campaign brief
Coding: architecture decision
Skip the manual work
Building a fully structured prompt manually takes 5–10 minutes when done properly. That's before you've even started the actual work you needed AI for. If you're using AI frequently — for research, writing, analysis, coding, strategy — that time compounds fast.
Prompt Architect automates the structuring. You describe your goal, pick your industry and model, and it builds a complete structured prompt with domain context, model-specific formatting, and the reasoning technique you want. Free tier, no signup required. The difference between what it generates and what most people write manually is immediately apparent.
Build your first structured prompt
Paste what you want. Get a prompt that actually works. Takes 30 seconds.
Try Prompt Architect freeUse code WELCOME30 for 30% off your first payment
Quick reference: the structured prompt checklist
- Role is specific (domain, seniority, specialization — not just "expert")
- Industry context is included, not assumed
- Situation context is included (your specific case, not generic)
- Task is decomposed into 3–6 enumerated deliverables
- Negative constraints are explicit ("do not use filler phrases," "do not hedge every statement")
- Format is specified (headers, length, structure)
- Reasoning technique is stated if the task is complex
- Prompt is formatted for the specific model you're using
Run through this checklist the next time you write a prompt. The output will be noticeably different.