Openai Codex | AI Natural Language Programming

Post author: Kevin Sims
Kevin Sims
1/23/22 in
AI

The openai codex model was developed by microsoft who owns openai to help translate natural language to code. Codex has sparked many debates in the programming world on whether AI will replace programmers in the future.

AI has a long way to go before it can get close to fully replacing programmers if even at all. The human element when it comes to designing and building code is something that’s hard to match from a computer systems.

As programmers start to get more involved with working alongside platforms such as openai codex, it will only make them more powerful and efficient. Programmers do not just spend all of their time focused on code. They must understand the business as a whole and the true reasoning and value behind a project. Something like codex cannot threaten skilled developers like that.

What is Openai Codex

Openai Codex is a trained model based off GPT-3. The data set includes billions of lines of various coding languages from some of the top publicly available sources such as github, stackoverflow, etc. Codex is not only capable of completing code but can generate code from natural language.

How to access Codex

In November of 2021 Openai released the restrictions needed to access the openai playground. Within the playground there are currently 2 codex models available for use.

The playground has a couple of example prompts that can be used to test the functionality of the codex playground. You can view a detailed guide on the openai playground from our other article. Examples of codex include:

  • Python to natural language: Explain a piece of Python code in human understandable language.
  • SQL request: Help create simple sql queries. Your probably see that its using the text-davinci engine and thats ok. The codex is just better trained at understanding code but the normal engines can handle some simple request.
  • Then also the ability fix buggy python code

So once you signup and get access to openai you will have the ability to use the codex engines free of charge while they are still in beta.

Can you use Openai Codex to write software

The codex engine in its current form does not have the capability to write software applications 100% by itself. When using the playground you still need to feed it the needed information to output what you need and still that output may not be 100% correct.

The playground should be looked at as a way to test the capabilities of AI in software development or maybe integrate into an application to test with.

One application looking to push the envelope in is something called Github Copilot. Powered by the OpenAI Codex engine, copilot is an extension that can be added to an IDE such as visual studio code to help aid the the writing and completion of code.

The copilot program started out with the end users typing everything that is not highlighted and the copilot was able to complete the code with the instructions given.

Autocompletion has been around for a while in certain editors but AI will continue to push forward the speed of which programmers can develop. Currently Github Copilot is under beta which you can signup for on their site

Codex Playground

The openai codex engine can be specifically tested in the playground but there is another cool way to see the true power. Openai has a test javascript sandbox you can play with. The sandbox then takes any instructions you give it and outputs it into javascript and displays the result.

Lets then take this example text to build a quick 1 page website:

Make a website for a cat that’s an attorney. Provide a bio and a phone number. Create a small round avatar image: https://bit.ly/3fsc0rH. Center everything.

Here is the output:

Pretty cool huh well that only scratches the surface. Click here to test out yourself.

The limitations of Openai Codex

While the Codex demos are fun to work with, they do not provide an accurate representation of how a programmer would tackle certain situations.

The output of Codex is not always the best way to solve problems. At times codex may use an uneeded way to solve certain problems such as resizing a picture. Codex may use some css method vs maybe doing something like inline.

The future of programming and AI

The programming field will continue to grow and so will the need for businesses to build applications. AI is a very long way from not needing the human element to drive its direction. Programs like Copilot and Codex will give possibly people in other non programming jobs the ability to possibly work up something functional with little to no coding skills for specific job task.

If somebody in the finance department could say code up something that could maybe improve their job function, it could then maybe give programmers the ability to spend time on less needed projects or maybe come in and fill in specific gaps.

Related Posts From AI