← All posts

A Prompt Is Not a Spell: It's a Spec for the Model

May 16, 2026#Prompt246 words · 1 min read阅读中文原文 ↗

The short version

Write your prompt like a task brief you'd hand a coworker. You get output you can count on.

TestedPrompt

One mental switch

I stopped seeing a prompt as “the magic words that get the AI to behave” and started seeing it as a task brief for a new coworker.

Follow that analogy all the way through and your prompts change immediately.

Four things every prompt needs

Element The analogy What happens without it
Role and goal Who this coworker is, and the OKR for this task The model improvises, the output style drifts
Constraints and boundaries “Don’t do X, don’t touch Y” Output goes out of bounds, says what it shouldn’t
Examples and counterexamples Past wins and past failures The model guesses at what you want
Output format The template for the report, the email, the JSON Parsing fails, the result is unusable

A template you can copy as-is

You are a ${role}.
Your task is: ${goal}.

Follow these rules:
- ${constraint_1}
- ${constraint_2}

A good example to work from:
${good_example}

A bad example (do not do this):
${bad_example}

Output format (follow it exactly):
${format}

Swapping “you are a helpful assistant” for a clear role, goal, constraints, examples, and format is enough on its own to move output quality up an order of magnitude.

Write prompts like you write code

You wouldn’t ship code on the first draft. You’d test it, iterate on it, keep it under version control. Same with prompts. Build your own prompt library and note which version does best in which situation. Nothing else in your AI workflow compounds this well.

Was this useful?

If this post helped, you can buy me a coffee ☕