Wiki Article
OpenAI Codex (language model)
Nguồn dữ liệu từ Wikipedia, hiển thị bởi DefZone.Net
OpenAI Codex is a large language model developed by OpenAI for translating natural-language prompts into source code. Announced in 2021, it was a modified production version of GPT-3 that was fine-tuned on source code in multiple programming languages, and it served as the original model for GitHub Copilot.[1][2]
Codex was designed to assist programmers by generating code from plain-language instructions, completing partially written code, and interacting with software and online services.[3][4] Researchers and commentators also described limitations and risks, including inaccurate or insecure output, difficulty with more complex prompts, and copyright concerns related to training on publicly available code.[5][6][7]
It should not be confused with the separate coding agent OpenAI Codex, which OpenAI introduced in 2025 under the same name.[8]
Capabilities
[edit]Built on GPT-3, Codex was further trained on 159 gigabytes of Python code drawn from 54 million GitHub repositories.[9][2] 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.[10] 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".[11][3] Co-founder of Fast.ai, Jeremy Howard, said 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".[12] OpenAI stated that Codex could complete about 37% of programming tasks in its evaluation set and was intended to make human programmers faster rather than replace them.[5]
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.[1] According to VentureBeat, OpenAI demonstrations suggested that Codex could keep track of earlier parts of a prompt and use that context to generate working code. In these demonstrations, it was used to create a browser game in JavaScript and to generate data-visualization code using matplotlib.[3]
In demonstrations, OpenAI showed Codex interacting with services and applications such as Mailchimp, Microsoft Word, Spotify, and Google Calendar.[3][4]
Limitations and concerns
[edit]OpenAI demonstrations also showed weaknesses such as inefficient code and occasional unexpected results in individual examples.[3] 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.[4] OpenAI researchers found that Codex struggled with multi-step prompts and could produce unexpected output. They also raised safety concerns including over-reliance by novice programmers, biases in the training data, and security risks from vulnerable code.[5] 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.[4] 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.[5]
VentureBeat stated that because Codex is trained on public data, it could be vulnerable to "data poisoning" via intentional uploads of malicious code.[3] 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.[6]
Copyright concerns
[edit]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.[7] 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.[7][13] 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.[10]
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."[10]
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.[10][14]
References
[edit]- ^ a b Zaremba, Wojciech (August 10, 2021). "OpenAI Codex". OpenAI. Archived from the original on February 3, 2023. Retrieved September 3, 2021.
- ^ a b Alford, Anthony (August 31, 2021). "OpenAI Announces 12 Billion Parameter Code-Generation AI Codex". InfoQ. Archived from the original on July 9, 2022. Retrieved September 3, 2021.
- ^ a b c d e f Dickson, Ben (August 16, 2021). "What to expect from OpenAI's Codex API". VentureBeat. Archived from the original on February 3, 2023. Retrieved September 3, 2021.
- ^ a b c d Vincent, James (August 10, 2021). "OpenAI can translate English into code with its new machine learning software Codex". The Verge. Archived from the original on September 2, 2021. Retrieved September 3, 2021.
- ^ a b c d Chen, Mark; Tworek, Jerry; Jun, Heewoo; Yuan, Qiming; Pinto, Henrique Ponde de Oliveira; Kaplan, Jared; Edwards, Harri; Burda, Yuri; Joseph, Nicholas; Brockman, Greg; Ray, Alex (July 14, 2021). "Evaluating Large Language Models Trained on Code". arXiv:2107.03374 [cs].
- ^ a b Pearce, Hammond; Ahmad, Baleegh; Tan, Benjamin; Dolan-Gavitt, Brendan; Karri, Ramesh (December 16, 2021). "Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions". arXiv:2108.09293 [cs.CR].
- ^ a b c Krill, Paul (August 2, 2021). "GitHub Copilot is 'unacceptable and unjust,' says Free Software Foundation". InfoWorld. Archived from the original on September 3, 2021. Retrieved September 3, 2021.
- ^ Knight, Will (May 16, 2025). "OpenAI Launches an Agentic, Web-Based Coding Tool". Wired. Retrieved May 20, 2025.
- ^ Wiggers, Kyle (July 8, 2021). "OpenAI warns AI behind GitHub's Copilot may be susceptible to bias". VentureBeat. Archived from the original on February 3, 2023. Retrieved September 3, 2021.
- ^ a b c d Anderson, Tim; Quach, Katyanna (July 6, 2021). "GitHub Copilot auto-coder snags emerge, from seemingly spilled secrets to bad code, but some love it". The Register. Archived from the original on June 2, 2023. Retrieved September 4, 2021.
- ^ Dorrier, Jason (August 15, 2021). "OpenAI's Codex Translates Everyday Language Into Computer Code". SingularityHub. Archived from the original on May 26, 2023. Retrieved September 3, 2021.
- ^ Metz, Cade (September 9, 2021). "A.I. Can Now Write Its Own Computer Code. That's Good News for Humans". The New York Times. Archived from the original on March 30, 2022. Retrieved September 16, 2021.
- ^ Robertson, Donald (July 28, 2021). "FSF-funded call for white papers on philosophical and legal questions around Copilot: Submit before Monday, August 23, 2021". Free Software Foundation. Archived from the original on August 11, 2021. Retrieved September 4, 2021.
- ^ Barber, Gregory (July 12, 2021). "GitHub's Commercial AI Tool Was Built From Open Source Code". WIRED. Archived from the original on July 25, 2021. Retrieved September 4, 2021.