What is ChatGPT's Code Interpreter and what can it do?
The world of learning and education is about to be stirred up again...
ChatGPT, the artificial intelligence-powered chatbot made by OpenAI, has created a huge impact on the way we learn around the world over the past few months with its ability to generate text in seconds and minutes.
Recently on July 6th, the technology released a new feature called Code Interpreter. This new feature allows users to create charts, analyze data, solve math problems, extract and change the colors of images, and possibly much more use cases.
The feature is currently only available to paid subscribers and is still in Beta.
Let’s get more into it!
What is Code Interpreter?
Code interpreter is a new feature that allows ChatGPT to analyze data, create charts, solve math problems, and edit files, among other users. It also supports uploading and downloading files, which was not possible in ChatGPT before.
How does Code Interpreter work?
When we ask ChatGPT a question, it guesses an answer based on previous words in the prompt. This process is enabled by a technology called large language model, or LLM, which predicts the next word in a sequence.
According to OpenAI, when Code Interpreter is enabled, ChatGPT writes and runs a piece of computer code to find the answer. Code interpreter combines the user of LLM like GPT with more traditional programming capabilities without the need to write programming code.
Before Code Interpreter
Similar to generating text, ChatGPT can generate code written in a programming language, for example, Python. We can then copy and paste this code into an environment that interprets and executes the code. If there is an error, we can simply tell ChatGPT: “Hey, there is this error when running the code, please rewrite.”
After Code Interpreter
Now instead of just generating lines of code based on previous words, the steps of generating code and executing code based on a ChatGPT prompt are done entirely within ChatGPT. This functionality of Code Interpreter requires the ability to upload data through a file update capability.
What can we use Code Interpreter for?
OpenAI’s initial user studies have revealed that people are using Code Interpreter for:
1. Solve math problems, both quantitative and qualitative

2. Doing data analysis and visualization
Code Interpreter allows detailed data analysis without the need for any programming code. We can pose questions directly to the data.



As explained above, with Code Interpreter, the steps of generating code and executing code based on a ChatGPT prompt are done entirely within ChatGPT. Here, we can see that when clicking ‘show work’, ChatGPT allows us to see the code that it uses to arrive at the answer.

Furthermore, Code Interpreter can create graphs based on the dataset and the prompt that we ask ChatGPT.
Pretty cool!
3. Change and extracting colors of images
Another interesting use case is that Code Interpreter allows us to extract colors from an image to create the same image in another color palette!!!


This is really exciting, especially for people who are not good with data analytics and programming skills like me.
Now with Code Interpreter, I can upload data files, ask ChatGPT to analyze the data for me, create visualizations as well as explain the code that it uses for me!
I am still learning about this technology so please correct me if I explain anything in this post inaccurately:)
Cheers 🍻

