For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
主导航

模型指南

了解 OpenAI 模型的最佳实践、功能和迁移指南。

使用 GPT-6 Astra

了解 GPT-6 Astra 的最佳实践、功能和迁移指南。

简介

GPT-6 Astra 是我们迄今最智能的模型,在计算机使用、浏览、软件工程、科学和专业工作方面具有领先表现。它擅长执行涉及代码、浏览器和专业软件的多步骤工作流。在多项评测中,Astra 在取得更好结果的同时,使用的输出 Token 显著减少。因此,尽管每个 Token 的定价更高,其每项任务的估算 API 成本仍低于早期模型。

GPT-6 Astra 也是我们迄今对齐表现最好的模型。它擅长谨慎行事、遵守任务边界并保持沟通透明。当指令留有解释空间时,它会利用已有上下文补全常规细节;如果某个问题的答案可能改变结果,它会有针对性地提问。它能纳入新要求、按要求调整方向,并在回答附带问题时始终顾及整体任务。

要使用 Astra 进行开发,请在 Responses API 请求中将 model 设置为 gpt-6-astra

最新动态

  • 异步工具调用: 当您的应用运行工具时,GPT-6 Astra 可以继续推理、调用其他工具,或回答请求中相互独立的部分。在函数或自定义工具上设置 async: true,并在结果就绪时使用原始 call_id 返回结果。工具执行和待完成工作的管理仍由您的应用负责。有关基本用法和开发者自定义的等待工具模式,请参阅异步工具调用
  • 轮次中途引导: 在 GPT-6 Astra 工作时发送额外的用户指令,例如纠正信息或更改要求。通过 WebSocket 连接,Responses API 会保留已完成的工作,并在继续执行时纳入更新。有关事件流程和工具结果处理,请参阅轮次中途引导
  • 在对话中途调整推理并保留缓存: 添加一个 configuration_update 输入项,即可针对复杂工作提高推理强度,或针对常规后续请求降低推理强度,无需改写原始提示前缀。更新后的推理强度会持续生效,直到另一个 configuration_update 输入项将其覆盖。有关示例和兼容性,请参阅在对话中途调整推理
  • 对齐偏差监测: 作为我们为 GPT-6 Astra 加强的安全防护措施的一部分,我们的系统会异步监测对齐偏差,并在必要时触发警报。更多信息请参阅对齐偏差监测
  • 限制: GPT-6 Astra 不支持 none 推理强度。使用欧盟数据驻留时,GPT-6 Astra 无法使用快速模式

GPT-6 Astra 还支持 GPT-5.6 已有的 API 能力,包括计算机使用结构化输出流式传输程序化工具调用多智能体编排提示缓存持久化推理压缩Pro 模式

提示词最佳实践

与 GPT-5.6 Sol 等早期模型相比,GPT-6 Astra 更智能、能力更强。它也有一些行为特点,您可以根据具体用例,通过提示来优化这些行为。

GPT-6 Astra 的行为特点

  • 主动性与持续执行:该模型旨在更有效地协作,因此,当额外输入可能实质性地改变结果时,它更倾向于向用户提问。这可能导致模型停下来,而用户原本希望它做出合理假设并继续推进。
  • 指令遵循:GPT-6 Astra 的整体指令遵循能力强于我们之前的模型,让您能更好地控制其行为。它可能更容易受到技能和其他文件(例如 AGENTS.md)中指令的影响。我们 强烈建议 检查模型可访问的技能和其他文件,找出其中可能影响模型行为的指令。
  • 个性与写作风格:该模型倾向于提供详细且带有格式的回答,也可能在不同会话中反复使用相同的措辞。请明确指定您的应用所需的写作风格和结构。
  • 子智能体委派:模型委派工作的频率可能低于您的工作流预期。请明确指定它应在何时使用子智能体并行工作,以及应委派多少工作。
  • 测试与验证:对于编程任务,模型通常会在充分测试后才认为任务已经完成。对于较小的任务,这可能导致测试范围超出任务所需。

主动性与持续执行

在长时间任务中,GPT-6 Astra 通常比 GPT-5.6 Sol 及更早的模型更能保持连贯性。在早期模型会自行做出假设的情况下,它也更倾向于请求澄清。

要鼓励模型更自主地工作,可以从以下提示开始:

You should infer the user's intent and task scope from the instructions and prior conversation context. Your job is to bias towards action and carry the user's intended task to completion.

When the user expresses intent to perform new work or fix an existing issue, persist until the user's intended goal is complete. Progress autonomously towards the user's goal (e.g. creating isolated worktrees / checkouts if needed, resolving merge conflicts, read-only actions, creating draft PRs etc.) unless they are clearly destructive or irreversible.

当用户意图不明确时,模型更倾向于先向用户请求澄清,再继续执行。您可以通过提示要求模型在用户的提示已隐含授权时继续执行到底:

When the user's prompt indicates a request for action, such as "can you...", "I want to...", "help me..." and similar expressions, treat these as instructions to do the work and take action. Do not stop at acknowledging capability (e.g. "Yes…"), proposing a plan, or offering to continue. Do not settle for a partial or "helpful enough" solution that does not fully satisfy the user's task to save time, effort or tokens. If a task requires sustained work, complete all the necessary work until the intended outcome is fulfilled.

通过提示要求模型先准备好具体、可供审查的结果,再请求审批。这样可以避免模型尚未完成力所能及的工作就阻塞任务,通常也能更快完成任务。

Before asking the user clarifying questions, you should complete the work that is already authorized from context and necessary to make the proposed action concrete and reviewable. The user should be approving a concrete, reviewable result. For example, before deploying a change, writing to an external application, merging a PR or publishing a site, do all the required work first so that user approval is the final step. You don't need user permission for reversible tasks, read-only actions, reviews or fixes, or anything for which authorization is provided earlier in the session or strongly implied from the task instruction.

Do not introduce unsolicited warnings, disclaimers, approval flows, or safety/compliance checklists due to hypothetical risk.

默认情况下,模型也倾向于在工作时提出不阻塞进度的问题,因此请根据您的应用所需的自主程度调整这些提示。

指令遵循

GPT-6 Astra 更善于遵循较长的指令,但也可能更容易受到上下文信息的影响。例如,技能文件中含糊或相互冲突的指导可能导致模型过早暂停,阻塞工作。请明确用户指令与技能之间的优先级。

The user's instructions take precedence over guidelines provided in a skill. If explicit user instructions conflict with a skill's instructions, prioritize the user's instructions.

要求模型指出导致它暂停或改变方向的具体技能和指令,也能有效提高模型行为的透明度。

If a skill causes you to ask for permission or confirmation, pause, leave requested work unfinished, or diverge from the user's intent, name and link to the exact SKILL.md file you read, quote the relevant instruction, and briefly explain how it applies. Distinguish explicit skill requirements from your interpretation of guidelines.

当您的应用加载了大量技能和 AGENTS.md 等指令文件时,可以使用此提示找出在未说明的情况下影响模型行为的指导,以及相互冲突的指导。

个性与写作风格

GPT-6 Astra 倾向于使用列表、表格和 Markdown,让回答便于快速浏览。如果您的应用需要较少使用格式的段落文字,请明确说明这一偏好。

Default to using clear, concise paragraphs, each developing one main idea. Use lists only when the information is genuinely parallel, sequential, or easier to compare, and avoid nested lists unless the hierarchy cannot be expressed clearly in prose. Use plain, simple language: familiar words, concrete examples, and precise verbs. Prefer active voice and direct statements.

Make sure to state the main point clearly and early, then develop it with the explanation and detail the reader needs. Let each sentence build on what came before. Develop the points that matter and provide enough support to be useful.

在技术沟通中,以下提示有助于让语言既清晰连贯,又符合专业领域的表达习惯:

Use plain language over jargon, and reference technical details only to the degree that it helps illustrate an idea or your work to the user. Communicate complex concepts in a clear and cohesive manner, and calibrate your writing to the level of background knowledge assumed from the user's prompt and context.

要减少写作中的行话和套话,可以从以下提示开始:

Avoid using slop words or phrases like "Bottom Line:" in conclusions, "delve," "foster," "leverage," "it's worth noting," "importantly," "Question? Answer." or "This isn't about X. It's about Y.", "genuinely" or hyphenated compound descriptions and adjectives. Do not use concluding summary statements such as "In short:..", "The simplest mental model is:...".

State the intended action directly. Avoid adding what you won't do, what will remain unchanged, or how you'll separate or categorize results. Do not use contrastive framing such as "X, not Y" or "X—not Y" that introduces an unprompted alternative that the user didn't ask about. Avoid invented compound labels like "exact-head checks" and "editorial-row layouts", vague qualifiers, and canned transitions; use plain verbs and prepositions to state the actual relationship directly.

子智能体委派

GPT-6 Astra 经过训练,能够拆分工作并委派给并行工作的子智能体。如果您正在执行框架中实现多智能体系统,可以使用以下提示调整 GPT-6 Astra 委派的工作量:

If at any point you can parallelize work by delegating tasks to another agent (no matter if you are the root or subagent), you should do so using collaboration tools if it could save time or improve quality.

智能体之间的消息可能存在语法或空格错误。使用以下提示可以让智能体之间的消息更易读:

Messages that you send to other agents and your final answer may be read by a human, so ensure they are legible. Always put proper spaces between words and/or numbers.

模型通常能很好地遵循有关何时以及如何将工作委派给子智能体的提示,因此您可以调整这一行为,使其适合您的执行框架和多智能体实现。

测试与验证

对于编程任务,请合理确定每项变更所需的测试与验证程度。这有助于避免为小改动进行不必要的测试或重复检查。

Do not write tests for reversible, low-impact changes that mirror the implementation. If you do choose to verify your work with tests, make sure that the tests are meaningful and necessary to verify implementation.

Run tests appropriate to the change and complete required checks. Once those pass, broaden or repeat testing only when new changes, failures, or unresolved concerns justify it; otherwise, continue toward completing the task.

迁移快速入门

使用 Codex 迁移

Codex 可以使用 OpenAI 文档技能,按照本指南的建议进行更改。

$openai-docs migrate this project to GPT-6 Astra

如需在其他编程智能体中使用此技能,请从 Codex 代码仓库下载。

更新 API 和模型参数

model 设置为 gpt-6-astra,然后检查以下各项:

  • 推理强度: 如果您当前使用 noneminimal,请先尝试 low 并比较结果。否则,请保留当前实际生效的推理强度。在 Responses 中使用 reasoning.effort,在 Chat Completions 中使用 reasoning_effort
  • 工具调用: 请使用 Responses API。GPT-6 Astra 支持 Chat Completions,但工具调用需要使用 Responses。
  • 不支持的参数: 移除 temperaturetop_ptop_logprobs。对于 Chat Completions,还需移除 logprobs。对于 Responses,请从 include 中移除 message.output_text.logprobs
  • 快速模式: 使用欧盟数据驻留时,请使用标准处理模式。GPT-6 Astra 在使用欧盟数据驻留时不支持 service_tier: "fast"service_tier: "priority"。GPT-6 Astra 的快速模式不包含延迟 SLA。请参阅快速模式兼容性
  • 更改推理强度: 如果您的应用会在不同响应之间更改推理强度,请在标准的单智能体请求中使用 configuration_update 项。保持请求级别的 reasoning.effort 不变,以保留用于缓存的提示前缀。在采用此功能之前,请查看兼容性限制
  • 提示缓存: 从 GPT-5.5 或更早的模型迁移时,请将 prompt_cache_retention 替换为 prompt_cache_options.ttl,并将其值设置为 "30m"。请查看提示缓存的变化,包括缓存边界和缓存写入计费。
  • 不必要的审批暂停: 如果您遇到模型反复请求审批才继续执行的问题,请参考主动性与持续执行指南,通过提示引导它更自主地执行。有关指令遵循、写作风格、子智能体委派和测试的指导,请参阅提示词最佳实践的其余内容。