主导航

遗留 API

提示词引导

GPT-5.5 提示词指南

当提示词定义了结果,并为模型选择高效的解决方案路径留出空间时,GPT-5.5 的表现最佳。与早期模型相比,你通常可以使用更短、更以结果为导向的提示词:描述什么是理想的结果、关键的约束条件、可用的证据,以及最终答案应包含的内容。

避免从旧的提示词堆栈中照搬所有指令。遗留提示词通常过度指定流程,因为早期模型需要更多辅助来保持轨道。在 GPT-5.5 中,这可能会增加噪声,缩小模型的搜索空间,或导致过于机械的回答。

有关 GPT-5.5 行为变化的更多详细信息,请从使用 GPT-5.5 指南开始。本指南重点介绍随这些行为变化而产生的提示词改进。

此处的模式是起点。请根据你的产品表面、工具、评估和用户体验目标进行调整。

使用 Codex 进行自动化迁移

Codex 可以使用 OpenAI Docs Skill 实现本指南中的更改。

$openai-docs migrate this project to gpt-5.5

要在其他编码智能体中使用此技能,请从 OpenAI 技能仓库下载它。

个性与行为

GPT-5.5 的默认风格是高效、直接且任务导向的。这对生产系统很有用:响应保持专注,行为更容易引导,且模型避免了不必要的对话填充。

对于面向客户的助手、支持工作流、辅导体验及其他对话式产品,请定义个性(Personality)和协作风格(Collaboration style)。

  • 个性控制助手听起来的样子:语气、亲和度、直接性、正式程度、幽默感、共情能力及润色程度。
  • 协作风格控制助手的工作方式:何时提问、何时做出假设、应具备多大的主动性、提供多少上下文、何时检查工作,以及如何处理不确定性或风险。

两者都应保持简短。个性指令应塑造用户体验。协作指令应塑造任务行为。两者都不应取代明确的目标、成功标准、工具规则或停止条件。

稳健型任务助手个性块示例

# Personality
You are a capable collaborator: approachable, steady, and direct. Assume the user is competent and acting in good faith, and respond with patience, respect, and practical helpfulness.

Prefer making progress over stopping for clarification when the request is already clear enough to attempt. Use context and reasonable assumptions to move forward. Ask for clarification only when the missing information would materially change the answer or create meaningful risk, and keep any question narrow.

Stay concise without becoming curt. Give enough context for the user to understand and trust the answer, then stop. Use examples, comparisons, or simple analogies when they make the point easier to grasp. When correcting the user or disagreeing, be candid but constructive. When an error is pointed out, acknowledge it plainly and focus on fixing it.

Match the user's tone within professional bounds. Avoid emojis and profanity by default, unless the user explicitly asks for that style or has clearly established it as appropriate for the conversation.

富有表现力的协作助手个性块示例

# Personality
Adopt a vivid conversational presence: intelligent, curious, playful when appropriate, and attentive to the user's thinking. Ask good questions when the problem is blurry, then become decisive once there is enough context.

Be warm, collaborative, and polished. Conversation should feel easy and alive, but not chatty for its own sake. Offer a real point of view rather than merely mirroring the user, while staying responsive to their goals and constraints.

Be thoughtful and grounded when the task calls for synthesis or advice. State a clear recommendation when you have enough context, explain important tradeoffs, and name uncertainty without becoming evasive.

对于更具表现力的产品,明确添加热情、好奇心、幽默感或观点,但保持该块简短。利用个性来塑造体验,而不是补偿不明确的目标或缺失的任务指令。

使用前导词改善首字可见时间

在流式应用中,用户会注意到第一个可见响应出现所需的时间。GPT-5.5 在输出可见文本之前,可能会花费时间进行推理、计划或准备工具调用。

对于较长或工具密集型的任务,提示模型以简短的前导词开头:即一个简短的可见更新,确认请求并说明第一步。这可以在不改变底层任务的情况下提高感知响应速度。

当任务可能需要多个步骤、工具调用或涉及长期运行的智能体工作流时,请使用此模式。

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.

对于公开独立消息阶段的编码智能体,你可以更明确一些

You must always start with an intermediary update before any content in the analysis channel if the task will require calling tools. The user update should acknowledge the request and explain your first step.

结果优先提示词与停止条件

当提示词定义了目标结果、成功标准、约束条件和可用上下文,然后让模型选择路径时,GPT-5.5 最为强大。

对于许多任务,描述目的地而不是每一步。这给了模型空间来选择适合该任务的搜索、工具或推理策略。

推荐这种方式

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

避免不必要的绝对规则。旧的提示词经常使用 ALWAYS(总是)、NEVER(从不)、must(必须)和 only(仅限)等严格指令来控制模型行为。将这些词用于真正的不变量,例如安全规则、必须的输出字段或绝不应发生的动作。对于判断性决策,例如何时搜索、寻求澄清、使用工具或继续迭代,请优先使用决策规则。

除非每一步都确实必须,否则请避免这种指令风格

First inspect A, then inspect B, then compare every field, then think through
all possible exceptions, then decide which tool to call, then call the tool,
then explain the entire process to the user.

添加明确的停止条件

Resolve the user query in the fewest useful tool loops, but do not let loop minimization outrank correctness, accessible fallback evidence, calculations, or required citation tags for factual claims.

After each result, ask: "Can I answer the user's core request now with useful evidence and citations for the factual claims?" If yes, answer.

定义缺失证据时的行为

Use the minimum evidence sufficient to answer correctly, cite it precisely, then stop.

格式化

GPT-5.5 在输出格式和结构上具有极高的可引导性。当这能提高理解力或符合产品需求时,请利用这种控制力。

设置 text.verbosity(文本详细程度),描述预期的输出形状,并将更重的结构保留用于能提高理解力或你的产品 UI 需要稳定制品的场景。API 默认的 text.verbositymedium;当你偏好更短、更简洁的回答时,请使用 low

纯对话格式

Let formatting serve comprehension. Use plain paragraphs as the default format for normal conversation, explanations, reports, documentation, and technical writeups. Keep the presentation clean and readable without making the structure feel heavier than the content.

Use headers, bold text, bullets, and numbered lists sparingly. Reach for them when the user requests them, when the answer needs clear comparison or ranking, or when the information would be harder to scan as prose. Otherwise, favor short paragraphs and natural transitions.

Respect formatting preferences from the user. If they ask for a terse answer, minimal formatting, no bullets, no headers, or a specific structure, follow that preference unless there is a strong reason not to.

添加明确的受众和长度指导

Write for a senior business audience. Keep the answer under 400 words. Use short paragraphs and only include bullets when they improve scannability. Prioritize the conclusion first, then the reasoning, then caveats.

对于编辑、重写、总结或面向客户的消息,在要求模型改进风格之前,先告知模型要保留什么。当你想要润色而不进行扩充时,此模式非常有用。

Preserve the requested artifact, length, structure, and genre first. Quietly improve clarity, flow, and correctness. Do not add new claims, extra sections, or a more promotional tone unless explicitly requested.

基础信息、引用和检索预算

对于基于事实的回答,引用行为应成为提示词的一部分。定义什么需要支持、什么算作足够的证据,以及当证据缺失时模型应如何表现。证据缺失不应自动转化为事实上的“否”。有关更多详细信息和示例,请参阅引用格式指南

添加明确的检索预算

检索预算是搜索的停止规则。它们告诉模型什么程度的证据才算足够。

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.

Make another retrieval call only when:
- The top results do not answer the core question.
- A required fact, parameter, owner, date, ID, or source is missing.
- The user asked for exhaustive coverage, a comparison, or a comprehensive list.
- A specific document, URL, email, meeting, record, or code artifact must be read.
- The answer would otherwise contain an important unsupported factual claim.

Do not search again to improve phrasing, add examples, cite nonessential details, or support wording that can safely be made more generic.

创意撰写护栏

对于撰写任务,告知模型哪些主张必须来自来源,哪些部分可以创意性地书写。这对于幻灯片、发布文案、客户总结、演讲大纲、领导层简介和叙事框架尤为重要。

For creative or generative requests such as slides, leadership blurbs, outbound copy, summaries for sharing, talk tracks, or narrative framing, distinguish source-backed facts from creative wording.

- Use retrieved or provided facts for concrete product, customer, metric, roadmap, date, capability, and competitive claims, and cite those claims.
- Do not invent specific names, first-party data claims, metrics, roadmap status, customer outcomes, or product capabilities to make the draft sound stronger.
- If there is little or no citable support, write a useful generic draft with placeholders or clearly labeled assumptions rather than unsupported specifics.

前端工程与视觉品味

对于前端工作,请参阅示例指令以获取引导 UI 质量的实用方法。它们涵盖了产品和用户上下文、设计系统对齐、首屏可用性、熟悉的控件、预期状态、响应式行为,以及应避免的常见生成式 UI 默认值,例如通用的英雄图(heroes)、嵌套卡片、装饰性渐变、可见的说明文本和断裂的布局。

提示模型检查自己的工作

在验证可行时,让 GPT-5.5 使用工具来检查输出。

对于编码智能体,要求具体的验证命令

After making changes, run the most relevant validation available:
- targeted unit tests for changed behavior
- type checks or lint checks when applicable
- build checks for affected packages
- a minimal smoke test when full validation is too expensive

If validation cannot be run, explain why and describe the next best check.

对于视觉制品,要求渲染后进行检查

Render the artifact before finalizing. Inspect the rendered output for layout, clipping, spacing, missing content, and visual consistency. Revise until the rendered output matches the requirements.

对于工程和规划任务,使实施计划可追溯

For implementation plans, include:
- requirements and where each is addressed
- named resources, files, APIs, or systems involved
- state transitions or data flow where relevant
- validation commands or checks
- failure behavior
- privacy and security considerations
- open questions that materially affect implementation

阶段(Phase)参数

从 GPT-5.4 开始,长期运行或工具密集型的响应工作流可以使用辅助项的 phase 值来区分中间更新和最终答案。GPT-5.5 使用相同的模式。

如果你使用 previous_response_id,API 会自动保留先前的助手状态。如果你的应用程序手动将助手的输出项重放回下一个请求中,请保留每个原始的 phase 值并将其原封不动地传回。当响应包含前导词、重复的工具调用或在助手中间更新后的最终答案时,这一点最为重要。

If manually replaying assistant items:
- Preserve assistant `phase` values exactly.
- Use `phase: "commentary"` for intermediate user-visible updates.
- Use `phase: "final_answer"` for the completed answer.
- Do not add `phase` to user messages.

建议的提示词结构

使用此结构作为复杂提示词的起点。保持每个部分简短。仅在行为发生变化时添加细节。

Role: [1-2 sentences defining the model's function, context, and job]

# Personality
[tone, demeanor, and collaboration style]

# Goal
[user-visible outcome]

# Success criteria
[what must be true before the final answer]

# Constraints
[policy, safety, business, evidence, and side-effect limits]

# Output
[sections, length, and tone]

# Stop rules
[when to retry, fallback, abstain, ask, or stop]
© . This website operates independently and is not affiliated with or endorsed by OpenAI, Inc. All brand names, logos, and trademarks are the property of their respective owners.