April 9, 2026 · 9 min read

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.

Contents
  1. Why most prompts fail
  2. The five components of a structured prompt
  3. Model-specific formatting: why it matters
  4. Baking in reasoning techniques
  5. Full before/after examples
  6. Skip the manual work

Why most prompts fail

Here is what a typical AI prompt looks like:

Typical prompt
"Write me a marketing strategy for my startup."
What you actually need
A 90-day go-to-market plan with channel priorities, weekly content calendar, paid ad strategy, and week-by-week metrics — written from the perspective of a B2B SaaS marketer who has scaled developer tools from $0 to $5M ARR.

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.

Component 01

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.

Component 02

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.

Component 03

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.

Component 04

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.

Component 05

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.

Claude (Anthropic)

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.

ChatGPT (OpenAI)

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.

Gemini (Google)

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.

All models

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.

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

Before
"Analyze this earnings report."
After (Claude format)
<role>Senior equity analyst, Nordic technology coverage, 10+ years</role> <task>Quarterly earnings analysis: (1) Revenue quality assessment — recurring vs one-time, (2) institutional investor focus areas, (3) bull and bear case for next quarter, (4) top 3 questions for the earnings call</task> <constraints>Use specific numbers. 2-3 paragraphs per section. No hedging every statement.</constraints>

Marketing: campaign brief

Before
"Write a marketing strategy for my SaaS."
After (ChatGPT format)
## Role B2B SaaS marketing strategist, scaled 3 developer tool companies to $5M ARR ## Situation Code review automation tool, $29/seat/month, target: engineering managers at 500–2000 person companies, $5,000/mo marketing budget ## Task 90-day GTM plan: (1) Channel priorities with estimated CPA, (2) weekly content calendar with specific topics, (3) paid strategy with actual keyword suggestions and budget splits, (4) weekly metrics and success thresholds per channel ## Constraints Specific numbers only. Name actual subreddits, keywords, dollar amounts. Skip anything that could apply to any SaaS equally.
The pattern: every good prompt has a specific role, layered context, enumerated deliverables, negative constraints, and format specification. The before prompts have none of these. The after prompts have all five.

Coding: architecture decision

Before
"Should I use microservices or a monolith?"
After (with red team reasoning)
<role>Staff engineer at a company with strong distributed systems experience. You are skeptical of premature scaling and have seen many failed microservices migrations.</role> <context>Early-stage B2B SaaS, 3-person engineering team, ~200 active users, planning to scale to 10,000 within 18 months. Current codebase is 18 months old and monolithic.</context> <task>Architecture recommendation: (1) Your actual recommendation with reasoning, (2) strongest argument AGAINST your recommendation, (3) the specific trigger points that should force a re-evaluation, (4) migration risk if we choose wrong</task> <reasoning>Apply red team analysis. Challenge your own recommendation in section 2.</reasoning>

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 free

Use code WELCOME30 for 30% off your first payment

Quick reference: the structured prompt checklist

Run through this checklist the next time you write a prompt. The output will be noticeably different.