A new AI system created by OpenAI. OpenAI Codex has extensive knowledge of how people use code and performs significantly better than GPT-3 in code generation, partly because it has been trained on a dataset that includes a much larger concentration of publicly available source code.
OpenAI Codex is a new machine learning tool that translates your English text into code. Codex is designed to accelerate the work of professional programmers, as well as to help amateurs get started with coding.
In collaboration with GitHub, OpenAI is launching the first Codex-powered application, GitHub Copilot. Codex has many more capabilities that developers can explore – and integrate into their own applications – when we release Codex via our API later this summer.
What is Codex?
OpenAI Codex is a descendant of GPT-3; its training data contains both natural language and billions of lines of source code from publicly available sources, including code in public GitHub repositories. OpenAI Codex performs best in Python, but it is also proficient in more than a dozen languages, including JavaScript, Go, Perl, PHP, Ruby, Swift, and TypeScript, and even Shell. It has a memory of 14 KB for Python code, compared to 4 KB for GPT-3, allowing it to consider three times as much contextual information when performing a task. [OpenAI Blog]
Last month, you were able to see one of the many possibilities offered by Codex – GitHub, in cooperation with OpenAI, unveiled CoPilot, which operates on Codex. CoPilot is an assistant that understands your approach and provides you with relevant examples, advice, and code snippets, smart auto-correction, and enhancement of your coding.
But this is just the beginning. Codex is a powerful system, powered by a transformer, that can be compared to GPT-3 as an NLP model.
As with GPT-3, its use cases are infinite. Codex understands your task and accomplishes it in the most efficient and effective manner.
First steps
We had the opportunity to review Codex and try its functions. Feeling like we have only scratched the surface, we want to share several demonstrations of this new way of communicating with code.
But wait, who are “we”? In 2020, at the time of the release of GPT-3, OpenAI was looking for community ambassadors to help and support developers, researchers, artists, and writers in the growing GPT-3 community (which had about 60,000 members). They asked some of us, the most active forum users, to help them – and here we are, OpenAI community ambassadors. We advise GPT-3 users during business hours, think about how to improve user experience, and also discuss user perspectives with OpenAI, representing the larger community.
And sometimes, we get a glimpse of the latest developments from OpenAI to better convey this knowledge to the world. As in the case of Codex. Below you will find some demonstrations of Codex conducted by OpenAI community ambassadors.
Modus operandi
You give Codex your instructions in plain text. The generated code can be used for your projects. You save time and can work more productively, you try new things, you are creative, and you think outside the box.
Of course, coding purists can continue to code manually. Codex does not create a challenge or competition for them. Codex allows everyone to learn and apply code interactively. Codex will not kill coders, just as cinema did not kill theater. Just as GPT-3 does not kill writers. Yes, it changes our way of working, but it enhances our creativity and does not replace us. Both approaches (AI-driven and authentically human) can coexist in parallel. Codex allows you to code more efficiently and instructively.
How does it work? Like in the instruction engine of GPT-3, all you need to input – just ask (politely), and Codex will respond to the request.