Copilot VS Codex
Tags: githubcopilot, codex, ai, javascript
Published: 2022-09-15 20:03:47

AI Coding models have become more and more prevalent with the introduction of new and advanced machine learning advances. There is more attention on the subject with it taking over with the automation of jobs, predicting of stock markets, and its ability to perform certain creative tasks faster than humans.

All this hype has caught the development world by storm with the introduction of new AI coding models OpenAi's Codex and Github's Copilot. Although these models are efficient at auto completion and generating small block of code, they still need thinking humans to be able to translate customer goals and build complete applications. However, it may only be a question of time till developers need only write detailed documentation and let large AI models generate the code.

Should AI driven development be the inevitable way of the future, how should you use it? And what models would bring the best results. Recently AI models have made a great leap in functionality, making code completions that would seem like black magic only a couple of years ago. Big tech companies are constantly investing big money into Machine Learning with most notably Microsoft investing Billions into OpenAI. These investment go into making bigger and more accurate models that have an exponential effect on results


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sd3yapvzoru04ti13i1t.png)

Development firms spend a lot of money on developers. Although the developer costs may be justified by the value they are bringing, Firms continually look for ways to lower their costs and increase profits. AI code generation has been proved to increase development speed and lead to overall cost savings. Using AI tools developers spend less time brainstorming ideas for algorithms and functions, and more time on the big picture aspects of the projects.

Firms benefit from faster workflows, more results, less costs and the increased developer productivity that comes with these AI tools which may lead to mass adoption and standarisation of the technology. Furthermore, the ability to work with AI to write code could soon become a requirement in job descriptions.

## Which AI Code Generator should you choose?
### Choosing one might not be as simple as you think

There are two AI models that are considered the top tier in AI Code Generation. Although, Both of these models are trained on the GPT-3 language prediction model and both can generate code from natural language prompts there is a main difference. Github Copilot generates code directly in the editor, making it work similar to an advanced autocompletion tool. OpenAi's Codex generates code from written prompts through it's GUI or Api.

The main benefit of using Github Copilot is its seamless integration with your code editor, it basically works like autocomplete but with more understanding of your code structure. On the other hand, Codex involves many more steps to be able to generate the code you need. Although Copilot might seem like the obvious choice at first, there are other, not so obvious reasons, to use Codex instead.

Copilot is only usable with certain supported IDE's and, consequently , unavailable to some developers. In this case developers can instead use codex to generate code. In addition to this, Codex has another trick up its sleeve. Codex can also be trained and fine tuned on specific projects which can greatly improve the accuracy of the responses


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jvs4pt9jaejivhe1bzb2.png)


Copilot's ease of implementation and use makes it the most attractive option for developers who need a quick AI productivity boost. Codex's training capabilities and api interface makes it the best candidate for large codebases that need really accurate completions. Both options are great tools and clearly two sides of the same coin and, without a doubt, whichever one you choose will surely increase your productivity.