Top Qs
Timeline
Chat
Perspective
OpenAI Codex
Artificial intelligence model geared towards programming From Wikipedia, the free encyclopedia
Remove ads
OpenAI Codex is an artificial intelligence model developed by OpenAI that translates natural language into code, a technology described by artificial intelligence researchers as an AI agent.[1] It powers GitHub Copilot, an AI-based code autocompletion tool available in select IDEs such as Visual Studio Code and Neovim[2]. Codex is a fine-tuned descendant of OpenAI's GPT-3 model, specifically optimized for programming tasks.
On May 16, 2025, OpenAI announced the launch of a research preview of Codex.[3]
Remove ads
Capabilities
Summarize
Perspective
Based on GPT-3, a neural network trained on text, Codex was additionally trained on 159 gigabytes of Python code from 54 million GitHub repositories.[4][5] A typical use case of Codex is for a user to type a comment, such as "//compute the moving average of an array for a given window size
", then use the AI to suggest a block of code that satisfies that comment prompt.[6] OpenAI stated that Codex can complete approximately 37% of requests and is meant to make human programming faster rather than to replace it. According to OpenAI's blog, Codex excels most at "mapping... simple problems to existing code", which they describe as "probably the least fun part of programming".[7][8] Jeremy Howard, co-founder of Fast.ai, stated that "Codex is a way of getting code written without having to write as much code", and that "it is not always correct, but it is just close enough".[9] According to a paper written by OpenAI researchers, when Codex attempted each test case 100 times, it generated working solutions for 70.2% of prompts.[10]
OpenAI claims that Codex can create code in over a dozen programming languages, including Go, JavaScript, Perl, PHP, Ruby, Shell, Swift, and TypeScript, though it is most effective in Python.[2] According to VentureBeat, demonstrations uploaded by OpenAI showed impressive coreference resolution capabilities. The demonstrators were able to create a browser game in JavaScript and generate data science charts using matplotlib.[8]
OpenAI showed that Codex can interface with services and apps such as Mailchimp, Microsoft Word, Spotify, and Google Calendar.[8][11]
The Codex-1 model is trained to detect requests for malware, exploits or policy-violating content and returns a refusal with a cited policy clause. Also, the container has no outbound internet and only whitelisted dependencies, reducing the blast radius of any bad code.[12]
Remove ads
Issues
Summarize
Perspective
OpenAI demonstrations showcased flaws such as inefficient code and one-off quirks in code samples.[8] In an interview with The Verge, OpenAI chief technology officer Greg Brockman said that "sometimes [Codex] doesn't quite know exactly what you're asking" and that it can require some trial and error.[11] OpenAI researchers found that Codex struggles with multi-step prompts, often failing or yielding counter-intuitive behavior. Additionally, they brought up several safety issues, such as over-reliance by novice programmers, biases based on the training data, and security impacts due to vulnerable code.[10]
VentureBeat stated that because Codex is trained on public data, it could be vulnerable to "data poisoning" via intentional uploads of malicious code.[8] According to a study by researchers from New York University, approximately 40% of code generated by GitHub Copilot (which uses Codex) in scenarios relevant to high-risk CWEs included glitches or other exploitable design flaws.[13]
Copyright
The Free Software Foundation expressed concerns that code snippets generated by Copilot and Codex could violate copyright, in particular the condition of the GPL that requires derivative works to be licensed under equivalent terms.[14] Issues they raised include whether training on public repositories falls into fair use or not, how developers could discover infringing generated code, whether trained machine learning models could be considered modifiable source code or a compilation of the training data, and if machine learning models could themselves be copyrighted and by whom.[14][15] An internal GitHub study found that approximately 0.1% of generated code contained direct copies from the training data. In one example the model outputted the training data code implementing the fast inverse square root algorithm, including comments and an incorrect copyright notice.[6]
In response, OpenAI stated that "legal uncertainty on the copyright implications of training AI systems imposes substantial costs on AI developers and so should be authoritatively resolved."[6]
The copyright issues with Codex have been compared to the Authors Guild, Inc. v. Google, Inc. court case, in which judges ruled that Google Books's use of text snippets from millions of scanned books constituted fair use.[6][16] However, use of text snippets from books provides for a reliable reference of the copyright owner, as opposed to compiled works used for the training algorithm data where the final output is made without any such reference.
Remove ads
References
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads