OpenAI Debuts Tool to Translate Natural Language into Code

OpenAI’s Codex, an AI system that translates natural language into code, was released via an API in private beta. Codex, trained on billions of lines of public code, can turn plain English commands into 12+ programming languages and also powers GitHub service Copilot that suggests whole lines of code within Microsoft Visual Studio and other development environments. OpenAI explained that Codex will be offered for free during an “initial period,” and invites “businesses and developers to build on top of it through the API.”

VentureBeat reports that, “according to OpenAI, the Codex model available via the API is most capable in Python but is also ‘proficient’ in JavaScript, Go, Perl, PHP, Ruby, Swift, TypeScript, Shell, and others.” Its 14KB Python code memory “enables it to [take] into account contextual information while performing programming tasks including transpilation, explaining code, and refactoring code.”

In a published paper, OpenAI did reveal that Codex might include “biases and [that] … the model proposes syntactically incorrect or undefined code, invoking variables and attributes that are undefined or outside the scope of a codebase.” Codex can also “sometimes suggests solutions that appear superficially correct but don’t actually perform the intended task.”

Regarding racial and religious bias, OpenAI responded that risk can “be mitigated with ‘careful’ documentation and user interface design, code review, and content controls.” The company said it is “taking a multi-prong approach” to reduce “the risk of misuse of Codex, including limiting the frequency of requests to prevent automated usage that may be malicious.”

Wired reports that OpenAI co-founders Greg Brockman, chief technology officer, and Wojciech Zaremba demonstrated how Codex can be used to build a simple game using “casual language one might use in a conversation.”

“The simple commands that Codex translates from language to code break no ground on what a computer can do, but ideally it will wash away the painstaking minutes that even an expert coder would expend to get such tasks done,” notes the reviewer. OpenAI chief executive Sam Altman claims that a programmer would take 30 minutes to do something that Codex can achieve in seconds.

OpenAI, which previously created natural language system GPT-3, stated that Codex “executes about 37 percent of tasks,” an improvement from Copilot “that was successful with only 27 percent of requests.” Brockman noted that Codex won’t displace programmers but, rather, does “the more conceptual work that humans are better at, for now at least.” But OpenAI tests also show that, “when using Codex, programmers produce software more than two times faster.”

Brockman explained that Codex “will revolutionize not just writing code but learning how to code.” Code.org founder Hadi Partovi agreed that “computer education will improve when students can instantly see how Codex tackles a problem and learn from it.”

“As the rote work of coding becomes easier, computer science education can focus on higher-level computational thinking concepts such as designing interfaces, algorithms, and data structures,” said Partovi.

No Comments Yet

You can be the first to comment!

Sorry, comments for this entry are closed at this time.