使用 GPT-6.2

对于要求最高的任务,使用 GPT-6.2 Astra;对于复杂工作,使用成本更低的 GPT-6.2 Sol。

对于要求最高的任务,使用 GPT-6.2 Astra;对于复杂工作,使用成本更低的 GPT-6.2 Sol。

新变化

  • 前缀编辑。 从 GPT-6.2 开始,Responses API 会在对话中途编辑对话历史记录(前缀编辑)、发生某些模型变更(包括降级),或终端用户或组织发生变更后丢弃推理项。当模型无法再访问推理项时,回答质量可能下降,模型也可能使用更多词元重复先前的工作。检查你的集成,找出对较早的开发者消息或工具调用等内容的编辑。要保留推理,并让先前输入继续符合提示词缓存条件,在响应之间更改设置时应保持前缀不变。
  • Responses API 中 instructions 字段的变化。 从 GPT-6.2 开始的模型会在 Responses API 中将顶层 instructions 追加到 input 之后。要让可复用的指令符合提示词缓存条件,请将它们放入 input 第一项的 developer 消息中。对于仅适用于当前请求的开发者指导,请使用顶层 instructions。参阅前缀匹配的工作原理。
  • 后台模式(公开测试)。对于耗时较长的 Responses API 请求,可使用后台模式的折扣完成窗口替代 Flex 处理。后台模式请求支持在 Standard 处理下使用两小时或八小时完成窗口。GPT-6.2 Astra 和 Sol 不支持 Flex 处理(service_tier: flex)。

提示词最佳实践

将以下提示词作为使用 GPT-6.2 系列模型的起点。这些示例针对我们在使用 GPT-6.2 Astra 和 Sol 时观察到的行为。如果你在自己的应用中遇到相应行为,可以尝试该节中的提示词。

GPT-6.2 Astra 的行为

  • 写作风格。 模型默认倾向于更简洁、直接的表达。迁移时,重新检查系统提示词中“保持简洁”等指令。
  • 任务完成。 当用户意图不明确时,模型可能提出下一步建议,然后等待确认。对于较长的任务,允许它作出合理假设并继续工作。
  • 编码风格。 模型往往能写出比前代更高效、质量更高的代码。说明它在编写或编辑代码时应遵循的项目约定。
  • 前端设计。 如果界面需要特定外观,明确指定它应使用的图像和字体排印。

写作风格

与早期模型相比,GPT-6.2 Astra 默认更加简洁、直接。可以根据应用调整它的语气,从专业同事到更具对话感的助手。

如果你想让模型成为日常工作的协作者和思考伙伴,可以使用以下提示词。

Write using terminology the user and sources use. Keep technical details and use domain-specific language when they make the explanation more precise. Use the active voice and keep closely related details together. Cover the key points up front, and avoid references that the reader can only make sense of later in the response. Give the user enough context to follow your reasoning.

提示模型根据材料的目标受众调整内容,例如撰写文档、电子邮件、消息和对外发布的内容。

When drafting a message or any other material on behalf of the user to be sent to an external audience, consider who will read it and tailor the content to that intended audience. The intended audience likely does not have the same context as the user, so ensure that you provide the background information or reasoning required for the audience to understand the content. When reviewing or editing existing content, preserve the author’s content and wording, and follow the user's instruction carefully for what edits they want.

在较长的任务中,模型可能将自己推理过程或其他智能体使用的简略表达带入最终回答。提醒它撰写完整、自洽的回答,让没有阅读进度更新的人也能理解。

Treat your final answer as the user's first look at your work, and not as a continuation of intermediate commentary. The final answer must always be fully self-contained: users should never need to read earlier commentary updates for context, since they are collapsed when the final answer is shown to the user.

Write the final answer and all other human-facing material anew for the intended reader. Do not copy or closely paraphrase your reasoning or adopt its writing style. Do not carry over working shorthand, jargon, or abbreviations from your reasoning, tool calls, or instructions to subagents and automations.

任务完成

对于可以在无人监督下继续开展的工作,明确指定模型应完成的结果,以及哪些决定需要用户参与。

Avoid stopping to end the turn while the task is incomplete or if there is an authorized next step you can take, and instead take the next steps within task scope to progress the user's request. If your final response before ending the turn is a suggested next step, a plan, a request to the user for a routine decision, instructions for a task to execute, or similar handoff to the user, take these steps yourself to make progress towards what the user asked for. Make sure that you have authorization to do so, and flag any assumptions or decisions you maketo the user.

Only stop to clarify with the user if there is significant change in task scope, you are concretely blocked, have a decision that the user needs to resolve, or before irreversible or destructive actions.

要求模型核实自己已完成用户请求的工作。更高的推理强度有助于它在复杂或长时间运行的任务中坚持完成最终检查。在 Responses API 中,通过 reasoning.effort 设置强度。推理强度

Bias towards action, and persist until you've completed the task the user asked for. Avoid stopping to end the turn while the task is incomplete or if there is an authorized next step you can take, and instead take the next steps within task scope to progress the user's request. Make sure that you have accounted for every part of the user's request, and persist until you've delivered a result that fully satisfies the user's goal. If a task requires sustained work, do all the necessary work until the intended outcome is completely fulfilled.

Progress autonomously towards the user's goal (e.g. creating isolated worktrees / checkouts if needed, resolving merge conflicts, creating draft PRs etc) unless they are clearly destructive or irreversible. Before ending a turn or calling your work complete, check that your work fully satisfies what the user asked for. If any steps remain or any part of the result still needs verification, follow through on this work before finishing.

当某个细节不明确时,允许模型说明自己作出的假设,并继续执行任务。

Make reasonable, reversible assumptions to carry work forward and state them if it progresses the task within scope. Do not second guess yourself, stop after describing what you could do, offer to do the work, or provide a partial answer unless there is no way you can proceed.

如果你的应用中提供了 request_user_input_async 等异步工具,GPT-6.2 可以向用户请求澄清,同时继续开展不依赖该答案的工作。添加异步提问工具

编码风格

说明代码库的约定,以及现有调用方所依赖的行为。例如,指定何时复用现有逻辑、将改动范围限制到什么程度,以及何时应为现有测试集未覆盖的行为添加测试。

Above all, be thorough in producing high-quality, correct code that completely fulfills the user's task. Keep the code easy to read and verify that the user-requested outcome works as they intend. Follow these instructions when coding:

(a) Reuse existing logic in the user's repo when you can. You should reuse existing classes, methods, representations, and APIs in the codebase as long as they preserve correctness. Before consolidating or removing code, preserve the behavior its callers rely on unless the task requires changing it.
(b) Skip new tests unless requested, required by the repo, or needed to catch a specific regression existing tests would miss.
(c) Make sure that code is human readable. Do not use fewer lines, shorter variable names, minified formatting, or dense one-liners as substitutes for simplicity. Ensure that comments and variable names are readable and understandable to a human. Code-golfed expressions count as overly complex when they encode many branches, conditions, or hidden assumptions.
(d) Avoid unnecessary indirection and abstraction. Helper functions, utility functions, and class abstractions can add cognitive complexity even when they do not add branches.

前端设计

如果应用依赖某种特定的视觉风格,在提示词中说明。指定它应使用的图像类型和字体排印要求,包括在有必要时指定具体字体。界面文案应聚焦于用户需要知道或执行的内容。

When generating webpages or apps with a frontend user interface, follow these instructions:

- When choosing visuals, generally prefer realistic images from ImageGen or image search that suit the project's style and purpose. Use SVGs when the user specifically asks for them.
- Include a text element only when it provides information the user needs, helps them navigate or act, or fulfills an explicit content request. Remove decorative numbering, filler badges, redundant headings, and explanatory copy that merely restates what the surrounding interface already makes clear, while preserving necessary labels, instructions, and status feedback.

对于视觉工作,可以分享设计软件中的参考图,或让 GPT-6.2 访问图像生成工具,并要求它使用 GPT Image 创建参考图。参考图可以为提示词补充难以用语言描述的细节。模型把握了所需外观后,要求它制作素材、渲染结果,并对照参考图进行改进。

迁移快速入门

要使用编码智能体将 API 应用迁移到 GPT-6.2 Astra,使用 OpenAI Docs 技能。

更新 API 和模型参数

将 model 设置为 gpt-6.2-astra 或 gpt-6.2-sol,然后检查以下事项:

  • 推理强度: 新集成先使用 medium。如果当前使用 none 或 minimal,改用 low。在 Responses 中使用 reasoning.effort,在 Chat Completions 中使用 reasoning_effort。
  • 工具调用: 使用 Responses API。GPT-6.2 Astra 和 GPT-6.2 Sol 支持 Chat Completions,但工具调用必须使用 Responses。
  • 不支持的参数: 迁移 Chat Completions 请求时,省略 temperature、top_p、logprobs 和 top_logprobs。对于 Responses 请求,省略 temperature、top_p 和 top_logprobs,并从 include 中移除 message.output_text.logprobs。
  • 提示词缓存: 将稳定的指令从顶层 instructions 参数移至 input 开头的 developer 消息中,使其符合缓存条件。从 GPT-5.5 或更早的模型迁移时,将 prompt_cache_retention 替换为设为 "30m" 的 prompt_cache_options.ttl。检查提示词缓存变化,包括缓存边界和缓存写入计费。
  • 零数据保留: GPT-6.2 Astra 和 Sol 在符合条件的端点及功能上,为经批准的组织支持零数据保留(ZDR)。启用 ZDR 后,Responses API 将 store 视为 false。对于多轮工作,按顺序传回先前的输出项,包括加密推理项。适用资格及端点行为见零数据保留。
  • 服务档位和区域: 两种模型均支持在 Standard、Fast 和 Batch 处理中使用美国和欧盟数据驻留。Ultrafast 仅支持美国数据驻留。参见数据驻留和价格。
  • 提示词: 参见提示词最佳实践。

找你所需

输入关键词,寻找文章、视频、工具、AI技巧或术语。

Esc 关闭搜索