GPT‑6 是我们迄今为止最先进的模型套件,为你提供适用于不同类型工作的模型选择。
无论你是将想法转化为可运行的原型、构建和测试功能,还是跨代码仓库、数据库和外部 API 编排多步骤工作流,本指南都会说明如何选择 GPT‑6 模型、给它有效的指令、管理长时间运行的工作,并为生产环境做好准备。
太长不看
在生产环境中高效运行。 使用缓存(在新窗口中打开)和压缩(在新窗口中打开)来管理上下文和成本。衡量任务成功率和延迟,并规划监控和数据控制。
让模型匹配你的工作负载。 通过选择适合任务的模型、推理投入(在新窗口中打开)和速度,在能力、成本和延迟之间取得平衡。
调整你的提示词和技能。 让提示词、技能和仓库指令在模型应交付什么、它可以独立做什么,以及什么算作完成方面保持一致。
让长时间运行的工作保持正轨。 使用引导(在新窗口中打开)、异步工具(在新窗口中打开)和委派(在新窗口中打开)来处理更新和独立工作。为模型何时应请求输入设定清晰边界。
1. 在生产环境中高效运行
为生产环境准备你的工作流
在部署之前,你需要落实若干检查和最佳实践。
牢记效率。削减任务不需要的上下文(在新窗口中打开),同时保留它确实需要的证据。在你的应用支持的情况下,并行运行独立任务(在新窗口中打开),这样某个缓慢步骤就不会拖住无关工作。
通过提示词缓存(在新窗口中打开)为重复性工作复用共享上下文。根据模型不同,缓存输入 token 的成本比未缓存输入 token 最多低 95%(在新窗口中打开)。将稳定指令和参考材料放在变化的任务细节之前,并保持工具定义一致。缓存仪表盘(在新窗口中打开)和诊断指南(在新窗口中打开)可帮助你查看这种复用在哪里失效。在估算完整工作流的成本时,要计入缓存写入和任何长上下文费率。
对于较长的对话,压缩(在新窗口中打开)会在保留继续所需状态的同时减小上下文大小。
决定你将如何监控行为(在新窗口中打开),并审查你的应用的数据控制(在新窗口中打开)。
部署前测试:运行有代表性的任务,并衡量任务成功率、延迟和每个成功任务的成本。查看我们的 API 部署清单(在新窗口中打开)。
让模型匹配工作负载
把模型选择和推理水平视为智能/价格之间的权衡。
模型:
GPT‑6 Astra(在新窗口中打开)用于需要最大智能的最困难推理工作。
GPT‑6.1 Sol(在新窗口中打开)用于复杂编码、研究和计算机使用。
GPT‑6 Luna(在新窗口中打开)用于大规模聚焦任务,以及目标明确的日常重复性工作,例如提取发票字段、对请求分类或生成结构化摘要。
在评估最适合任务的模型时,比较各模型的定价(在新窗口中打开)。
推理水平: 在 API 中,选择模型在任务上投入多少精力。
低:常规任务,例如提取事实或进行小幅编辑。
中:需要判断力的工作,例如规划功能或比较选项。
高:困难调试、更深入分析或仔细审查。
超高 / 最高:在支持的情况下,当“高”仍不够时进行测试,并且只有在改进足以证明额外时间和成本合理时才保留。
在 Codex 中,从该模型的默认推理水平开始,然后对更简单的任务降低它,或对更深入的分析提高它。
速度:
在 API 中,当响应时间很重要时,例如在聊天应用或编码工具中,使用 Fast 模式(在新窗口中打开)。与标准处理相比,它以更高的每 token 成本提供更快、更一致的响应时间。
在 Codex 和 API 中,当更快的响应值得支付溢价时,例如快速编码迭代,使用超快(在新窗口中打开)。它会独立于推理投入加速 token 生成。适用于 GPT‑6 Astra(在新窗口中打开)。
2. 调整你的提示词和技能
给模型一个清晰的任务
——Eric Provencher,OpenAI 开发者体验
从清晰的任务开始:你想要的结果、它面向谁、相关上下文和约束,以及什么算作完成。然后查看这四个方面,它们总结自_为 GPT‑6 Astra 重新思考技能和提示词_(在新窗口中打开),以更深入地了解如何更新你的指令:
创建更好的技能: 让描述简短,并明确说明每个技能应在何时运行;仅在需要时加载支持细节;用适合你团队所用模型的指导取代僵化的固定配方。
更新你的 AGENTS.md: 说明特定文档和测试何时相关,并明确授权安全的常规工作流,例如使用一次性数据运行本地测试且不访问生产环境。
设定决策边界: 说明哪些操作可以独立进行,哪些需要批准,用清晰的边界取代“总是询问”的一刀切规则。
对持久性做出明确规定: 定义“完成”包括哪些内容——实施变更、运行变更、检查结果并修复失败——并确定任何需要你审查的决策。
定义你需要的输出
无论你是在 Codex 中工作,还是使用 API 进行构建,都要明确模型可以做出哪些决策、何时应请求输入,以及什么样的响应才算有用。
给模型足够的方向指引,让工作持续推进,同时不必对重要决策进行猜测。告诉它哪些选择可以自行做出,以及何时征求你的意见(在新窗口中打开),例如,它可以决定如何组织摘要,但在改变项目范围之前应与你确认。描述什么样的响应才算有用(在新窗口中打开),例如使用平实的语言、适合你受众的技术细节,以及一份简短的交接说明,涵盖改了什么、检查了什么、还有什么需要关注。
3. 优化长时间运行的任务
让复杂工作持续推进
借助 GPT‑6 系列模型,你现在可以承担跨越数小时甚至数天的任务。使用以下功能来更好地管理长时间运行任务中的智能体。
API
在 API 中,使用引导、异步工具和并行工作来让长时间运行的任务持续推进。
在运行过程中更新指令:回合中引导(在新窗口中打开)让你可以在模型工作时通过 Responses WebSocket API(在新窗口中打开)发送更正。更新会排队;它们不会取消正在运行的工具或撤销已完成的动作。
在工具运行时继续工作:异步工具调用(在新窗口中打开)让模型在你的应用运行较慢任务(例如测试)时继续独立工作。你的应用在结果准备好后返回结果。在开始依赖该结果的工作之前,先等待该结果。
委派独立子任务: GPT‑6.1 Sol 支持Responses API 中的多智能体工作流(在新窗口中打开)。它可以将独立工作分配给子智能体(例如调查代码库的不同部分),并将它们的发现合并为最终响应。多智能体目前处于测试阶段。
Codex
长时间运行的任务可能会暴露出你在初始提示中未必预料到的决策。使用澄清和引导来让工作保持正轨。
随着工作推进回答问题: 借助 GPT‑6 Astra,Codex 可以在工作时请求澄清(在新窗口中打开)。解决影响下一步的问题,并说明在你做决定期间哪些独立工作可以继续。如果你将离开,请告诉 Codex 哪些任务可以继续,以及它应在何时暂停等待你的回答。
需求变化时重定向工作: 用新信息引导当前任务(在新窗口中打开),说明哪些应该改变、哪些应保持不变。这有助于避免在不再满足你需求的方法上花费更多时间。
利用计算机使用来完成更多工作
计算机使用(在新窗口中打开)让 GPT‑6 Astra、GPT‑6.1 Sol 和 GPT‑6 Luna 能够直接与网站和桌面应用交互,甚至是那些没有 API 的应用。例如,你可以要求模型调查一个 bug、修复代码,并在浏览器中打开你的产品以检查修复是否有效。
为每个步骤选择最简单可靠的方式:
当 API 或已连接工具可以直接完成工作时,就使用它。
当模型需要为你读取屏幕、点击按钮或填写表单时,就使用计算机使用。
如果你要将计算机使用构建到自己的应用中,请给模型一个可以运行代码来控制浏览器或桌面的工具。Playwright 可用于浏览器(在新窗口中打开);PyAutoGUI 可用于桌面应用。
从测试到生产:团队如何基于 GPT‑6 Astra 构建
4 个中的第 1 个
GPT‑6 isour most advanced suite of models yet, and offers you a choice of models for different kinds of work.
Whether you’re turning an idea into a working prototype, building and testing a feature, or orchestrating multi-step workflows across code repositories, databases, and external APIs, this guide explains how to choose a GPT‑6 model, give it effective instructions, manage long-running work, and prepare for production.
TL;DR
Run effectively in production. Use caching(opens in a new window) and compaction(opens in a new window) to manage context and cost. Measure task success and latency, and plan for monitoring and data controls.
Match the model to your workload. Balance capability, cost, and latency by choosing the model, reasoning effort(opens in a new window), and speed that fit the task.
Adjust your prompts and skills. Keep prompts, skills, and repository instructions consistent about what the model should deliver, what it can do independently, and what counts as done.
Keep long-running work on track. Use steering(opens in a new window), async tools(opens in a new window), and delegation(opens in a new window) to handle updates and independent work. Set clear boundaries for when the model should ask for input.
1. Run effectively in production
Prepare your workflow for production
Before deploying, there are several checks and best practices you’ll want to put into place.
Keep efficiency in mind.Cut context the task doesn’t need(opens in a new window) while keeping the evidence it does. Where your application supports it,run independent tasks together(opens in a new window) so one slow step doesn’t hold up unrelated work.
Reuse shared context throughprompt caching(opens in a new window) for recurring work. Cached input tokens cost up to 95% less(opens in a new window)than uncached input tokens, depending on the model. Put stable instructions and reference material before changing task details, and keep tool definitions consistent. Thecaching dashboard(opens in a new window) anddiagnostics guide(opens in a new window) help you see where that reuse breaks down. Include cache writes and any long-context rates when estimating the cost of a complete workflow.
For longer conversations,compaction(opens in a new window) reduces context size while preserving the state needed to continue.
Decide how you’llmonitor behavior(opens in a new window) and review thedata controls(opens in a new window) for your application.
Test before deploying: Run representative tasks and measure task success, latency, and cost per successful task. Check out our API deployment checklist(opens in a new window).
Match the model to the workload
Think of the model choice and reasoning level as an intelligence/ price tradeoff.
Model:
GPT‑6 Astra(opens in a new window) for the hardest reasoning work where maximum intelligence is needed.
GPT‑6.1 Sol(opens in a new window) for complex coding, research, and computer use.
GPT‑6 Luna(opens in a new window) for focused tasks at scale and everyday, repeated work with a clear goal, such as extracting invoice fields, classifying requests, or producing structured summaries.
When evaluating the best model for the task, compare pricing(opens in a new window)for each model.
Reasoning level: In the API, choose how much effort the model spends on the task.
Low: Routine tasks, such as extracting facts or making small edits.
Medium: Work requiring judgment, such as planning a feature or comparing options.
High: Difficult debugging, deeper analysis, or careful review.
Extra high / Max: Test where supported when High falls short, and keep only if the improvement justifies the added time and cost.
In Codex, start with the default reasoning level for that model, then lower it for simpler tasks or increase it for deeper analysis.
Speed:
In the API, use Fast mode(opens in a new window) when response time matters, such as in chat apps or coding tools. It provides faster, more consistent response times at a higher per-token cost than Standard processing.
In Codex and the API, useUltrafast(opens in a new window) when faster responses are worth the premium, such as rapid coding iterations. It speeds up token generation independently of reasoning effort. Available for GPT‑6 Astra(opens in a new window).
2. Adjust your prompts and skills
Give the model a clear assignment
—Eric Provencher, Developer Experience at OpenAI
Start with a clear assignment: the result you want, who it’s for, the relevant context and constraints, and what counts as done. Then review these four areas, summarized from_Rethinking skills and prompts for GPT‑6 Astra_(opens in a new window), for a deeper dive into updating your instructions:
Create better skills: Keep descriptions short and explicit about when each skill should run, load supporting details only when needed, and replace rigid recipes with guidance suited to the models your team uses.
Update your AGENTS.md: Explain when particular documents and tests are relevant, and explicitly authorize safe routine workflows, such as running local tests with disposable data and no production access.
Set decision boundaries: State which actions can proceed independently and which require approval, replacing blanket “always ask” rules with clear boundaries.
Be prescriptive about persistence: Define what “done” includes—implementing the change, running it, inspecting the result, and fixing failures—and identify any decisions that require your review.
Define the output you need
Whether you’re working in Codex or building with the API, specify which decisions the model can make, when it should ask for input, and what a useful response looks like.
Give the model enough direction to keep work moving without guessing at decisions that matter.Tell it which choices it can make and when to ask for your input(opens in a new window), for example, it can choose how to organize a summary, but should check with you before changing the project’s scope.Describe what a useful response looks like(opens in a new window), for example plain language, technical detail suited to your audience, and a short handoff covering what changed, what was checked, and what still needs attention.
3. Optimize long-running tasks
Keep complex work moving
With the GPT‑6 family of models, you can now take on tasks that span hours or days. Use the following features to better manage agents on long-running tasks.
API
In the API, use steering, asynchronous tools, and parallel work to keep long-running tasks moving.
Update instructions during a run:Mid-turn steering(opens in a new window) lets you send a correction through the Responses WebSocket API(opens in a new window) while the model works. Updates are queued; they don’t cancel running tools or undo completed actions.
Keep working while a tool runs:Asynchronous tool calling(opens in a new window) lets the model continue independent work while your app runs a slower task, such as tests. Your app returns the result when it’s ready. Wait for that result before starting work that depends on it.
Delegate independent subtasks: GPT‑6.1 Sol supportsmulti-agent workflows in the Responses API(opens in a new window). It can assign independent work to subagents (such as investigating different parts of a codebase) and combine their findings into a final response. Multi-agent is currently in beta.
Codex
Long-running tasks can uncover decisions you wouldn’t necessarily anticipate in the initial prompt. Use clarification and steering to keep the work on course.
Answer questions as work progresses: With GPT‑6 Astra, Codex canask for clarification while it works(opens in a new window). Resolve questions that affect the next step, and specify which independent work can continue while you decide. If you’ll be away, tell Codex which tasks can continue and when it should pause for your answer.
Redirect work when requirements change:Steer the active task(opens in a new window) with new information, explaining what should change and what should stay the same. This helps avoid spending more time on an approach that no longer meets your needs.
Leverage computer use to do more of the job
Computer use(opens in a new window) lets GPT‑6 Astra, GPT‑6.1 Sol, and GPT‑6 Luna interact directly with websites and desktop apps, even applications without an API. For example, you can ask the model to investigate a bug, fix the code, and open your product in a browser to check that the fix works.
Choose the simplest reliable way to do each step:
Use an API or connected tool when it can do the job directly.
Use computer use when the model needs to read a screen, click buttons, or fill in a form for you.
If you’re building computer use into your own app, give the model a tool that can run code to control a browser or desktop. Playwright works with browsers(opens in a new window); PyAutoGUI works with desktop apps.
From testing to production: How teams are building with GPT‑6 Astra
1 of 4
本文内容采集自官方网站,排版和翻译可能与原页面存在差异。
阅读官方全文