最新 微软与美国政府警告:重大技术故障还将持续 The Verge
模型发布 ●●●●○

OpenAI 提升低资源编程语言编码能力

Advancing coding in low-resource programming languages

摘要Summary

OpenAI 发布针对 COBOL、Fortran、Visual Basic 等低资源编程语言的模型能力进展,并推出 MultiLangBench 与 COBOL 迁移两项评测。GPT-6 Astra 在 MultiLangBench 上平均通过率达 87.4%,GPT-6.1 Sol 在 COBOL 迁移评测中低推理强度下准确率达 86.6%。这些语言支撑银行、ATM、天气预报等关键基础设施,能力提升有助于老系统维护与现代化。

OpenAI detailed model improvements for low-resource programming languages such as COBOL, Fortran and Visual Basic, introducing two evaluations: MultiLangBench and a COBOL migration benchmark. GPT-6 Astra reaches an average 87.4% pass rate on MultiLangBench, while GPT-6.1 Sol hits 86.6% accuracy on COBOL migration at low reasoning effort. These languages underpin banking, ATM and weather-forecasting infrastructure, so better support aids maintenance and modernization of legacy systems.

  • GPT-6 Astra 在 MultiLangBench 平均通过率 87.4%
  • COBOL 迁移评测 GPT-6.1 Sol 低推理强度达 86.6%
  • MultiLangBench 评测套件已在 GitHub 开源

全文对照Full text · 中 / EN

我们最新的模型进展为使用 COBOL、Fortran 和 Visual Basic 等低资源编程语言构建和迁移软件带来了更强的能力。与 Python 和 JavaScript 等语言相比,这些语言可供模型学习的代码和文档更少,但它们支撑着全球关键基础设施和基本服务。COBOL 支持超过 40% 的网上银行系统、80% 的线下信用卡交易和 95% 的 ATM 交易,而 Fortran 被用于天气预报和核反应堆安全分析。提升 AI 在这些语言中的工作能力,可以帮助团队维护和现代化基本服务所依赖的软件。

Our latest model advances bring stronger capabilities for building and migrating software in low-resource programming languages such as COBOL, Fortran, and Visual Basic. These languages have less code and documentation available for models to learn from than languages like Python and JavaScript, yet support critical infrastructure and essential services around the world. COBOL supports ⁠ (opens in a new window) more than 40% of online banking systems, 80% of in-person credit card transactions and 95% of ATM transactions, while Fortran is used in weather forecasting ⁠ (opens in a new window) and nuclear reactor safety analysis ⁠ (opens in a new window) . Improving AI’s ability to work in these languages could help teams maintain and modernize the software that essential services depend on.

这项工作以开发者和企业客户的反馈为指导,他们告诉我们,编程模型在这些语言上往往表现不佳。维护和现代化这类软件可能很困难:文档可能不完整,最初的开发者可能已经离开公司,重要的业务规则可能只存在于代码中。无论团队是在修复缺陷还是迁移到另一种语言,他们都需要保留系统所依赖的行为。

This work is guided by feedback from developers and enterprise customers who have told us that coding models often struggle with these languages. Maintaining and modernizing this software can be difficult: documentation may be incomplete, original developers may have left the company, and important business rules may only exist in code. Whether teams are fixing bugs or migrating to another language, they need to preserve the behavior their systems depend on.

为了衡量进展,我们开发了两项评估。MultiLangBench 测试模型能否在 20 种不同的编程语言中从零构建一个兼容 SQLite 的数据库引擎。我们的 COBOL 迁移评估测试模型能否将现有程序迁移到另一种语言,同时保留其行为。两者共同测试了两项互补的技能:构建新软件,以及保留现有软件的行为。

To measure progress, we developed two evaluations. MultiLangBench tests whether a model can build a SQLite-compatible database engine from scratch across 20 different programming languages. Our COBOL migration evaluation tests whether a model can migrate existing programs to another language while preserving their behavior. Together, they test two complementary skills: building new software and preserving what existing software does.

我们最新的模型在两项评估中都显示出大幅提升,以更低的成本实现了更高的准确率。

Our latest models show substantial improvements across both evaluations, delivering much higher accuracy at lower cost.

在 MultiLangBench 上,GPT‑6 Astra 在 20 种编程语言中平均测试通过率达到 87.4%,高于 GPT‑5.6 Sol 的 26.8%,且在所有测试语言中均有提升。GPT‑6 Luna 也优于 GPT‑5.6 Sol,达到 40.3%,同时估计 API 成本降低约 78%。

On MultiLangBench, GPT‑6 Astra achieves an average test pass rate of 87.4% across 20 programming languages, up from 26.8% for GPT‑5.6 Sol, with improvements in every language tested. GPT‑6 Luna also outperforms GPT‑5.6 Sol, reaching 40.3% at approximately 78% lower estimated API cost.

在我们的 COBOL 迁移评估中,GPT‑6.1 Sol 在低推理努力下达到 86.6% 的准确率,而 GPT‑5.6 Sol 仅为 5.4%,同时成本降低 39%。在更高推理努力下,准确率达到 97.9%,几乎使该评估饱和。

On our COBOL migration evaluation, GPT‑6.1 Sol achieves 86.6% accuracy at low reasoning effort, compared with just 5.4% for GPT‑5.6 Sol, while costing 39% less. At higher reasoning effort, accuracy reaches 97.9%, nearly saturating the evaluation.

这些结果共同表明,我们的模型在处理多种编程语言方面正变得显著更强,同时也更具成本效益。

Together, these results show that our models are becoming significantly better at working with a wide range of programming languages, while also becoming more cost-efficient.

MultiLangBench 要求模型用指定的编程语言构建一个兼容 SQLite 的数据库引擎。模型必须组织代码库、管理状态、处理错误,并在保持现有功能的同时添加新功能。

MultiLangBench asks a model to build a SQLite-compatible database engine in a specified programming language. The model must organize a codebase, manage state, handle errors, and add new features while preserving existing functionality.

为了比较不同语言的实现,我们使用数据库文件作为共享接口。候选程序接收一个初始数据库和一条 SQL 查询,然后生成一个修改后的数据库。我们使用参考 SQLite 实现来检查结果数据库是否具有预期内容。这使我们能够应用相同的测试,无论构建引擎使用的是哪种语言。

To compare implementations across languages, we use database files as a shared interface. The candidate program receives an initial database and a SQL query, then produces a modified database. We use the reference SQLite implementation to check whether the resulting database has the expected contents. This lets us apply the same tests regardless of the language used to build the engine.

我们将 SQLite 现有测试套件中的测试改编为此格式。该评估衡量模型在长时间编码会话中能构建多少可用的功能,并报告测试通过率和 API 成本。

We adapted tests from SQLite’s existing test suite to this format. The evaluation measures how much working functionality a model can build over an extended coding session, reporting both test pass rate and API cost.

在最大推理努力下,GPT‑6 Astra 在 20 种语言上的平均测试通过率达到 87.4%,高于 GPT‑5.6 Sol 的 26.8%。改进覆盖所有测试语言,包括 COBOL(10.9% 至 72.1%)、OCaml(25.6% 至 85.8%)、Fortran(21.4% 至 83.5%)和 Visual Basic(27.5% 至 89.4%)。Astra 在 20 种语言中的 19 种上得分超过 83%,COBOL 仍是最难的,为 72%。

At maximum reasoning effort, GPT‑6 Astra achieves an average test pass rate of 87.4% across the 20 languages, up from 26.8% for GPT‑5.6 Sol. Improvements extend to every language tested, including COBOL (10.9% to 72.1%), OCaml (25.6% to 85.8%), Fortran (21.4% to 83.5%), and Visual Basic (27.5% to 89.4%). Astra scores above 83% in 19 of the 20 languages, with COBOL remaining the hardest at 72%.

GPT‑6 Luna 提供了一种成本更低的选项,并且在所有测试语言上也优于 GPT‑5.6 Sol。在最大推理努力下,其平均测试通过率达到 40.3%。提升包括 COBOL(10.9% 至 17.1%)、OCaml(25.6% 至 34.1%)、Fortran(21.4% 至 31.4%)和 Visual Basic(27.5% 至 41.6%)。这些改进的估计平均 API 成本为每个样本 0.77 美元,而 GPT‑5.6 Sol 为 3.48 美元,约低 78%。

GPT‑6 Luna offers a lower-cost option that also improves on GPT‑5.6 Sol in every language tested. At maximum reasoning effort, it reaches an average test pass rate of 40.3%. Gains include COBOL (10.9% to 17.1%), OCaml (25.6% to 34.1%), Fortran (21.4% to 31.4%), and Visual Basic (27.5% to 41.6%). These improvements come at an estimated average API cost of $0.77 per sample, compared with $3.48 for GPT‑5.6 Sol, approximately 78% lower.

我们在 GitHub 上发布了 MultiLangBench 评估设置和测试套件(在新窗口中打开),以及每种语言的结果。开发者可以查看评估测试的内容,审阅其使用语言的性能表现,并找出对其自身工作至关重要的差距。

We are releasing the MultiLangBench evaluation setup and test suite on GitHub ⁠ (opens in a new window) , along with results for each language. Developers can inspect what the evaluation tests, review performance in the languages they use, and identify gaps that matter for their own work.

我们的第二项评估要求模型将 COBOL 程序迁移到 C++、Java、Kotlin、Python 或 Rust,同时保持每个程序的功能不变。

Our second evaluation asks models to migrate COBOL programs to C++, Java, Kotlin, Python, or Rust while preserving what each program does.

成功的迁移需要理解程序的业务逻辑和 COBOL 的特定语言行为。COBOL 程序通常处理金融交易和业务记录,其中舍入规则和缺失记录处理等细节反映了业务需求。例如,COBOL 的定点算术会丢弃多余的小数位,除非明确要求舍入。如果重写时对这些值进行舍入,程序可能运行无错误,但会产生不同的财务结果。

Successful migration requires understanding both the program’s business logic and COBOL’s specific language behavior. COBOL programs often process financial transactions and business records, where details such as rounding rules and missing-record handling reflect business requirements. For example, COBOL’s fixed-point arithmetic discards excess decimal digits unless rounding is explicitly requested. A rewrite that rounds those values instead can run without errors while producing different financial results.

为了测试这些行为是否得到保留,我们在隐藏测试上评估模型,这些测试要求可观察输出逐字节一致。只有当所有测试通过时,迁移才被视为成功。这类保持行为的能力对维护和现代化旧系统的团队很有用,但将其应用于生产软件仍需要专家审查,并针对系统的业务规则和依赖关系进行测试。

To test whether these behaviors are preserved, we evaluate our models on hidden tests that require byte-for-byte parity on observable outputs. A migration is considered successful only if all tests pass. Behavior-preserving capabilities like these are useful for teams maintaining and modernizing older systems, though applying it to production software still requires expert review and testing against the system’s business rules and dependencies.

在这项评估中,GPT‑6.1 Sol 在低推理努力下达到 86.6% 的准确率,而 GPT‑5.6 Sol 在相同设置下仅为 5.4%,且 API 成本仅为后者的 61%。在更高推理努力下,准确率达到 97.9%,使该评估接近饱和。这些评估结果展示了在为团队现代化其业务所依赖的软件方面,朝着更准确、更经济的代码迁移所取得的进展。

On this evaluation, GPT‑6.1 Sol achieves 86.6% accuracy at low reasoning effort, compared with GPT‑5.6 Sol’s 5.4% at the same setting at just 61% of the API cost. At higher reasoning effort, accuracy reaches 97.9%, bringing the evaluation close to saturation. These evaluation results demonstrate progress toward more accurate, affordable code migration for teams modernizing the software their businesses depend on.

这些评估,连同开发者和企业客户的直接反馈,帮助我们了解模型在哪些方面正在改进,以及哪些方面仍有不足。

These evaluations, alongside direct feedback from developers and enterprise customers, help us see where our models are improving and where they still fall short.

我们的目标是帮助模型将软件工程技能应用到更多语言中:理解不熟悉的代码仓库、规划变更、使用构建工具、运行测试以及调试失败。

Our goal is to help models apply software engineering skills across more languages: understanding unfamiliar repositories, planning changes, using build tools, running tests, and debugging failures.

你可以通过 API 在团队所用语言的编码任务上试用我们的最新模型。你对哪些方面有效、模型在哪些地方存在困难,以及我们接下来应重点关注哪些语言或工作流程的反馈,有助于塑造我们训练和评估模型的方式,从而更好地支持你所依赖的软件。

You can try our latest models through the API on coding tasks in the languages your team uses. Your feedback on what works, where the models struggle, and which languages or workflows we should focus on next helps shape how we train and evaluate models to better support the software you depend on.