OpenAI’s Codex: Translating English to Code

OpenAI’s Codex: Translating English to Code

OpenAI is an AI research lab founded by Elon Musk, Sam Altman, and others. Microsoft is also a close partner with a US$1 billion investment in OpenAI. Its upcoming software Codex translates English into code and implements it. It aims to expedite programming and help amateurs get started easily.

Codex builds upon the GPT-3, a massive language generation model that produces human-like text. The model is trained on a substantial portion of the internet; its training data contains both natural language and billions of lines of source code from publicly available sources like public GitHub repositories.

In fact, OpenAI developed GitHub’s CoPilot feature that provides augmented autocompletion for code — it produces suggestions for whole lines or entire functions in your editor. CoPilot understands the context the developer has provided and synthesizes code to match their intentions. GitHub, owned by Microsoft, hasn’t released CoPilot publicly yet.

OpenAI’s Codex, though, is more advanced — it creates code. It is proficient in over a dozen programming languages — Python, JavaScript, Go, Perl, PHP, Ruby, Swift, TypeScript, and Shell. You can issue commands in English to any piece of software with an API.

The act of writing code is a two-step process: (1) breaking a problem down into simpler problems, and (2) mapping those simple problems to code. The latter is time-consuming but Codex makes it efficient. It bridges the gap between the algorithmic formulation of the problem and the implementation of the solution taking the grunt work out of programming.

The demonstrations of Codex have been remarkable. In this demo, the user creates a video game purely based on typed English commands. The user is able to import images using their URLs, crop them, instantiate User Interface (UI) elements, and create gameplay using English.

In another demonstration that involves MS Word, the user can dictate editing commands and see the results reflected in the document immediately. Through speech in English, the user is able to realign the text, delete lines and spaces, add line numbering, change the font, and even append information from the internet. Similarly, you can control other programs like Spotify and Google Calendar.

In this demonstration involving using Codex for Data Science, the user can download data, visualize it, create a website to display it, summarize the findings, and email them to contacts all through typed English.

These use cases only scratch the surface of the possibilities of this technology down the line. Codex is a step towards making programming more accessible for everyone.

Thank you for reading. I hope this was informative.

More content at plainenglish.io