You have 2 free member-only stories left this month.

Codex by OpenAI, in Action

Powerful AI-driven support for everyone who codes (or even for those who don’t).

The code is the Digital Layer DNA of our world. By mastering the code — its features and peculiarities — you build up the digital reality we are all living in. Today, OpenAI revealed a new milestone to our AI spring (Reminder: the AI Winter is over), which will enable more people to create:

CODEX

Official Blog: https://openai.com/blog/openai-codex/
Paper: https://arxiv.org/abs/2107.03374
Join the Waitlist: https://openai.com/join

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 is most capable in Python, but it is also proficient in over a dozen languages including JavaScript, Go, Perl, PHP, Ruby, Swift and TypeScript, and even Shell. It has a memory of 14KB for Python code, compared to GPT-3 which has only 4KB — so it can take into account over 3x as much contextual information while performing any task. [OpenAI blog]

Last month you were able to witness one of the manifold possibilities enabled by Codex — GitHub in cooperation with OpenAI presented CoPilot, which is running on Codex. CoPilot is an assistant, understanding your approach and providing you with examples, hints, and appropriate code snippets, an intelligent autocorrect, augmentation of your coding.

But this was just the beginning. Codex is a powerful, transformer-driven system, which can be compared with GPT-3 as an NLP model.

Like with GPT-3, its use-cases are sheer endless. Codex understands your task and fulfills it most effectively and efficiently.

First Steps

We had the opportunity to look into Codex and to try out its functions. Feeling like we are just scratching on the surface, we want to share several demos demonstrating the new way of communicating with the code.

But wait, who are “we”? Back in 2020, as GPT-3 was released, OpenAI was looking for Community Ambassadors, who would help and support developers, researchers, artists, writers in the growing GPT-3 community (which became around 60k members). They asked some of us, most active users in the forum, to assist — and here we are, OpenAI Community Ambassadors. We advise GPT-3 users in open hours, we brainstorm how to enhance user experience, we also discuss with OpenAI about the user perspective, representing the big community.

And sometimes, we get insights into the newest developments of OpenAI to impart this knowledge to the world better. Like, in the case of Codex as well. Below you will see some cool Codex demos made by the OpenAI Community Ambassadors.

What does Codex look like?

The current interface of Codex is minimalistic (and will undoubtedly change since OpenAI is continuously working on it).

In FIELD 1, you can enter your tasks, written in plain English (and pretty much every other language, as we will see later).

FIELD 2 shows you the code generated by Codex.

FIELD 3 previews the result.

Modus operandi

You give Codex your instructions in plain text. The generated code can be used for your projects — you save time and enable more productive work, you try out new things, being creative, and thinking outside the box.

Sure, coding purists can continue coding manually. Codex doesn’t create a challenge or competition for them. Codex enables everybody to learn and apply code interactively. Codex will not kill coders, like cinema hasn’t killed theater. Like GPT-3 doesn’t kill writers. Yes, it transforms our way of work, but it augments our creativity and does not replace us. Both approaches (AI-driven and genuinely human) can exist in parallel. Codex allows you to code more efficiently, effectively, and educationally.

How does it work? Like in GPT-3's Instruct Engine, everything you need to input — just ask (politely), and Codex will fulfill the request.

Do you want to see it in action? In this demo, we asked Codex to create “a landing page for a website called NTech”, “the side should be in dark mode, with an email list for people to sign up”:

Sure, you have to set up an email and fine-tune other elements, but you see how Codex takes your demand into action.

Speak to Codex / barrier-free approaches.

With some workarounds, you can control Codex using your voice:

Not only a valuable function for easy coding, it will also enable people with physical disabilities to create and implement their ideas and dreams. Also, think about the vast educational value (and fun) kids may have from such conversations with a machine.

Another way for contactless control of Codex is using your webcam and movements:

Demo by

Use Cases

Let’s see what is possible with Codex — in our first encounters with this system.

Math.

The system can do math:

Assessment test

Creating assessment tests requires functionality and knowledge — Codex has both of them:

Apps? Yes, it can.

“Countdown”

In the following demo, a countdown function is implemented — with several control buttons. Simple — and just with plain text as demand:

Image processing

With Codex you can easily create a simple app modifying images:

Outside the box

Codex can interact with your browser and computer system.

You can, for example, control your webcam and let Codex transform speech-to-text in the lower part of the webcam stream.

The system allows you even controlling your browser:

Demo by Bram Adams

Experience it!

A fully new web experience, where interacting, editing, and rendering are happening in real-time, is provided in the first glimpse of “maslo happen”, powered by Codex:

Other languages?

Codex is global. There are no language barriers anymore. In my experiments, I tried a straightforward task: creating and modifying a shape in a specific color. But: I asked it in English, German, Japanese, and Russian.

As you see: the result is the same. Codex gets it! Whatever language you are speaking to it.

Codex as a storytelling tool?

Sure, Codex is not a writer. It isn’t designed to write brilliant novels — you better use GPT-3 if you want to have an AI-driven narrative. But it can help you nevertheless.

For example: creating memes.

Demo by Bram Adams

It also can write simple (or funny poems) and translate them into another language:

Demo by Vlad Alex (Merzmensch)

Conclusion

Codex OpenAI provides immense educational value:

Imagine using this in schools — playing around with Codex, kids will fall in love with code. And I can assure you, they won’t transform themselves into those lazy folks from WALL-E, they will research and encounter.

Codex enables people who don’t code to dive in, try things out, and implement their ideas. Artists, teachers, many other people whose profession doesn’t involve coding languages will create their approaches and fulfill their visions.

It also will help coders with short try&break brainstorming experiments without investing hours into programming “just to try out”.

This system is a huge leap for human-machine interaction.

Update 1:

Here is an official demo of CODEX by OpenAI recorded several hours ago, with more information and experiments:

Update 2:

There is a Codex Challenge on Thursday, the 12th August 2021: https://challenge.openai.com/
Signup for the Codex Waitlist: https://openai.com/join

Update 3 (2021.08.24):

Check out these and many more demos, compiled in this informative video by Sandra Kublik:

https://www.youtube.com/watch?v=66xTYJrOxKk

Vladimir Alexeev. Futurist. AI-driven Dadaist. Living in Germany, loving Japan, AI, mysteries, books, and stuff. https://www.linkedin.com/in/v-alexeev/

Sign up for The Variable

By Towards Data Science

Every Thursday, the Variable delivers the very best of Towards Data Science: from hands-on tutorials and cutting-edge research to original features you don't want to miss. Take a look.

Your home for data science. A Medium publication sharing concepts, ideas and codes.