ChatGPT’s new Code Interpreter and what it means for you

Everything you need to know about ChatGPT’s Code Interpreter, the AI Data Scientist

Chandler K
The AI Archives
4 min readJul 12, 2023

--

Image created by DALLE

Last week, OpenAI officially released their Code Interpreter to Beta. Previously, the feature was only available to a select few Alpha testers who were able to gain early access. The Code Interpreter is now available to all ChatGPT Plus users. This new ChatGPT Plus feature will be joining an already impressive list that includes GPT-4, Plugins, and the recently removed GPT-4 with Web-browsing.

In this post, we will cover the following:

  • How to enable the Code Interpreter
  • What this new feature is
  • Important things to know
  • Why this impacts ChatGPT users
  • What kinds of solutions can be created
  • Some incredible examples showcasing the power of Code Interpreter

👋 Hey! Quick ask, I am just starting my writing journey here on Medium about AI. If you want to see my next articles, consider supporting me by following me here on Medium. I am going to have new articles 3 times a week! Thank you : )

How do I enable Code Interpreter?

While the process is extremely quick and simple, Code Interpreter won’t show up by default. Once you’ve loaded into ChatGPT, look in the bottom left corner for your name/account. Click on the 3 dots next to your account name and then select “Settings”. Select “Beta features” on the left hand side of the menu and enable Code Interpreter. While you’re here, it is also worth enabling Plugins.

What you need to know 💡

ChatGPT already has an understanding of programming code thanks to GPT-4’s training data. However, the Code Interpreter goes beyond this general level of understanding. It enhances the model’s ability to process, generate, manipulate, and run code.

Can I upload files?

Yes! Code Interpreter allows users to upload files. Currently, one one file can be uploaded at a time. However, if you can add a zip file that contains multiple files and the Code Interpreter can see and interact with all the files contained within.

What is the file size limit?

The current file size is 100 MB.

What does the Code Interpreter output?

The output from the code interpreter depends on your prompt. You might ask ChatGPT to explain a piece of difficult code, in which case it will provide a detailed explanation. If your request involves code generation, it will output a code snippet and a brief explanation about what it created. In general, the model is versatile and can deliver various types of outputs based on your needs.

Can ChatGPT edit my files directly?

Yes and no. While it can’t edit your files locally, it has the capacity to make changes to uploaded files and prompt the user to download this modified file.

What programming languages does it support?

Currently, the only language that is supported by the Code Interpreter is Python. Note that GPT-4 has a base understanding of most programming languages and can help solve issues in non-Python languages.

What problems does Code Interpreter help solve and why should I care?

While there are undoubtedly countless ways that users will apply the Code Interpreter going forward, there are a few possibilities that are most practical. These include Software Development, Data Analytics, Documentation, and Education. Streamlining code generation, error detection, and code refactoring are all aspects of Software Development that can be improved with Code Interpreter.

Additionally, the Interpreter has the ability to perform Data Analytics tasks such as creating visualizations for data and providing insight into data sets. The prospect of assisting with the writing of Documentation is another real world application. The ability to understand and explain code to users of different skill levels ensures that documentation will be thorough and readable. Finally, the education use cases for Code Interpreter are some of the most ground breaking. It can serve as a personalized programming tutor, offering explanations, examples, and feedback in real time.

Code Interpreter in action

Although Code Interpreter has only been out for a short time, Alpha and Beta users have been able to accomplish impressive feats. One of the more unique examples was just shared by Alex Ker. Alex explains in a Twitter thread that he was able to use the Code Interpreter to recreate the global phenomenon Flappy Bird in less than 10 minutes. Without going into too much detail, Alex explains how he used prompt engineering to utilize the full power of the Code Interpreter. I highly recommend reading the full post below.

Users are also testing the limits of Code Interpreter by uploading data sets and asking the model to clean, analyze , and create visualizations.

One of the more unique use cases I’ve come across in the creation of audio files and music using the Code Interpreter. Check out Andrew Mayne’s blog post below for more details:

Thanks for taking the time to read this post! I hope it was useful as a starting point for exploring the new ChatGPT Code Interpreter. As you explore, please feel free to comment below with use cases you find compelling. See you in the next post!

--

--

Chandler K
The AI Archives

Harvard, UPenn, prev NASA , writing about AI, game development, and more..