Appearance
OpenAI这次给开发者的指导,温柔但坚决地,把过去两年所有人奉为圣经的"prompt工程"推翻了一半。
TL;DR · 三句话总结
如果只有30秒——
- Outcome > Process:告诉模型"好的结果长什么样",别再写"先A再B再C"。把路径选择留给模型。
- 决策规则 > 绝对指令:用"在什么情况下做什么"代替"永远做"、"绝不要做"。
- 删掉50%:你那个5000字的system prompt,多半有一半是给GPT-4时代写的代偿,到GPT-5.5上变成噪音。
法则一:把"过程指令"换成"结果描述"
原文:
describe what good looks like, what constraints matter, what evidence is available, and what the final answer should contain.
核心:定义终点,不定义路径。
改写示例
旧写法(过程导向):
Step 1: Read the customer's account data.
Step 2: Check eligibility against the policy.
Step 3: If eligible, perform the action.
Step 4: Return the result with status.新写法(结果导向):
Resolve the customer's issue end to end.
Success means:
- the eligibility decision is made from the available policy and account data
- any allowed action is completed before responding
- the final answer includes completed_actions, customer_message, and blockers
- if evidence is missing, ask for the smallest missing field适用:几乎所有任务。GPT-5.5在结果导向prompt上表现最好。
法则二:用决策规则代替ALWAYS / NEVER
原文:
Use those words for true invariants, such as safety rules, required output fields, or actions that should never happen. For judgment calls, such as when to search, ask for clarification, use a tool, or keep iterating, prefer decision rules instead.
核心:把"砸到模型脸上的规则"改写成"教模型判断的条件"。
改写示例
旧写法(绝对指令):
NEVER include code in the response unless the user explicitly asks for code.新写法(决策规则):
If the user is asking a conceptual question, answer in prose.
If the user is asking how to do something concrete, include a minimal code example.前者把规则砸在脸上,模型在边界情况下会变得机械;后者教它判断,遇到模糊情况会做出更聪明的选择。
适用:所有"看情况而定"的判断类规则。继续保留ALWAYS / NEVER的场景仅限:安全红线、必须输出的字段、绝不允许发生的破坏性动作。
法则三:工具调用前加preamble(前导更新)
原文:
Before any tool calls for a multi-step task, send a short user-visible update that acknowledges the request and states the first step. Keep it to one or two sentences.
核心:改善"首个可见token"的延迟体感,几乎零成本。
改写示例
在system prompt里加一段:
For multi-step tasks, before any tool calls,
send one short user-visible message that:
- acknowledges what the user wants
- states the first concrete step you'll take
Keep it under two sentences.效果:用户从"盯着空白屏幕等三秒"变成"看到模型说'我先查一下你这个月的账单'然后看着它干活"。
适用:所有agent类应用、流式响应产品、tool-heavy工作流。
法则四:reasoning_effort别一上来就拉满
原文:
More efficient reasoning means low and medium effort should be re-evaluated before escalating.
核心:GPT-5.5的推理变得更高效,盲目拉high是浪费token + 拖慢响应 + 不一定更准。
改写示例
旧习惯:
python
response = client.responses.create(
model="gpt-5.5",
reasoning_effort="high", # 默认就拉满
...
)新习惯:
python
# 先用 medium 跑一遍看效果
response = client.responses.create(
model="gpt-5.5",
reasoning_effort="medium", # 默认值
...
)
# 实测不够再升 high;很多任务 low 也够用适用:所有调用GPT-5.5 reasoning API的场景。先medium,不够再升。
法则五:Personality和Collaboration Style,拆开写、都简短
原文:
Personality controls how the assistant sounds: tone, warmth, directness, formality, humor, empathy, and level of polish. Collaboration style controls how the assistant works: when it asks questions, when it makes assumptions, how proactive it should be, how much context it gives, when it checks work, and how it handles uncertainty or risk.
核心:这是两件事。Personality影响"听起来怎么样",Collaboration影响"怎么干活"。混着写就两边都模糊。
改写示例
旧写法(混在一起):
You are a friendly, professional assistant who always
asks clarifying questions and provides detailed answers
in a warm tone with examples and reasoning steps.新写法(拆成两段):
# Personality
Direct, candid, no fluff. Treats the user as competent.
Avoids hedging language. Matches user's tone.
# Collaboration style
Make progress over asking when the request is clear.
Ask only when missing info would change the answer.
Acknowledge errors plainly when called out.适用:客服、教练、面向C端的对话产品。两段都不要超过100字。
法则六:明确写出stopping conditions和retrieval budget
原文:
For ordinary Q&A, start with one broad search using short, discriminative keywords. If the top results contain enough citable support for the core request, answer from those results instead of searching again.
核心:告诉模型"什么时候算干完了",比告诉它"怎么干"更重要。
改写示例(适用于检索类agent)
For each query:
1. Run ONE broad search with short keywords.
2. If results contain enough citable support → answer.
3. Make another search ONLY when:
- Top results don't answer the core question
- A specific named source must be read
- User asked for exhaustive coverage
4. Do NOT search again to improve phrasing or add nice-to-have details.适用:所有RAG应用、agent流程、需要给SLA兜底的生产场景。不写stopping condition,模型会陷入无限搜索循环。
法则七:前端任务,主动列出"AI套路"让模型避开
原文:
common generated-UI defaults to avoid, such as generic heroes, nested cards, decorative gradients, visible instructional text, and broken layouts.
核心:模型对训练数据的高频模式有惯性。你不主动拒绝,它就会还你一个"一眼是AI做的"页面。
改写示例
让模型生成前端代码时,加一段反向约束:
Avoid these AI-generated UI tropes:
- generic hero sections (huge centered title + CTA button)
- nested cards (cards inside cards inside cards)
- decorative gradients (purple-pink, blue-cyan)
- visible instructional placeholder text
- broken responsive layouts
- emoji decoration in headers
Match the design language of [your product] instead.适用:所有让AI写React / Vue / HTML的场景;尤其是给设计师或产品经理demo的AI工具。
为什么变了——一段话讲清原理
GPT-3时代要塞few-shot例子,GPT-4时代要堆XML标签+Chain-of-Thought,GPT-5时代要写满ALWAYS/NEVER规则清单。
每一种"技巧",本质都在替模型做它本应自己做的判断——给例子是因为它不知道输出什么样、给角色是因为它不知道腔调、给硬规则是因为它在边界情况下会犯错。
Prompt之所以越写越长,是因为模型不够聪明的地方,使用者必须用文字来"代偿"。
但代偿曲线注定会反转。模型够聪明之后,那些过去为它代偿的指令就从"导航"变成了"枷锁"。
