Top 10 Ways to Use ChatGPT Code Interpreter
OpenAI just released a new ChatGPT update called Code Interpreter, and it’s available to all Plus users, and it’s one of the most powerful and useful updates to ever come to ChatGPT. So let me break down the top 10 ways to use this new code interpreter inside of ChatGPT with very practical examples, my favorite use cases, and some resources. And even though it has the word “code” in the name, it could actually do so many more things than what developers would use it for. So I wanna break that down as well in this video. Regular people without any technical skills could use this and get a lot out of ChatGPT now.
Okay, first inside of ChatGPT, as long as you have ChatGPT Plus, the paid version, you’ll see this option. So press the three dots right over here. And then click the settings option here and go to beta and make sure Code Interpreter is activated. If you have the subscription, you should see it. If you don’t, it may still take a few days to roll out to everyone. Then I’ll come over here, click ChatGPT Four, and make sure this is checked on. So from default, I need to go to Code Interpreter and see this icon. Now, I’ll see a new plus sign, right over here. You see it says upload files. So you could upload files, you could upload codes, documents, datasets, pictures, videos, all kinds of different things and interact and have ChatGPT do different things for you to those documents.
So let’s go through the list right now.
Analyze Data:
The very first thing you could do is it could analyze data. So it could be your data analyst. Let me show you how that works. I’m gonna upload a file, and if you wanna also follow along with some test data, if you don’t have your own, you can upload your own. I’ll show you that in a second. But there’s this website, Kaggle. It has a whole set of datasets across different things. So right now, under datasets, I could do financial data. I could just do text-based data, and you could download any of ’em. So any of ’em, if you click over here, for example, you could press downloads. This is just a CSV file. This is a text document with a ton of different data, right? Really hard to figure out what’s going on here? So I’m gonna go ahead and open it, and you could press enter, but I typically like to say, “Can you explain this data or describe this data,” and then go ahead and send that message. And then it’s gonna start working. If you wanna see the work, it would actually show you. It’s writing a little bit of Python code, but I usually don’t have to worry about that. Then it’s gonna break down basically what this dataset has. So it’s gonna basically give me all the different columns and the rows of the dataset, and then I could keep talking to it with a ton of different prompts. So let me show you this. I have an entire prompt list that I’ll go ahead and link below, free for download. And I could basically ask any of these from any type of dataset. So I could say, “Can you explain this dataset in simple terms?” I’ll go back to ChatGPT. I’ll go ahead and paste that. This just kind of gave me the breakdown of what’s included, but I kind of want to know in plain English, what is this all about? And then it says, “This dataset is like a diary of air quality in different places at different times,” and it kind of breaks down exactly what it’s all about. Then I could say, “What are some of the trends shown in this data?” And it created this graph for me right here that basically shows me exactly what the trends are over time. This graph, this visual representation, was not in the data. It’s giving the data to me, which brings me to use case number two, which is it could create any type of graphs and visual elements like diagrams for you. So I’m gonna follow up with one of those prompts. This is one of my favorite prompts. “Can you create 10 visuals that represent the different data points here?” And look at this. It created 10 different visuals for me with a download link to each one. So I could just click download. It’s downloading PNG files. I’ll open a couple to show you. So it created these graphs. Sometimes it represents them here, but in this case, it gave it to me as a downloadable version of it. And any of these could be opened up like this, put into a presentation. All 10 are available here for download. This is extremely useful to analyze data this way and represent them with different graphics. You could ask for bar charts and different types of graphs as well.
Image Processing:
Now the third one on my list is image processing. This could do a ton of different things with just basic images like a JPEG or PNG. Let me upload one, and here’s an image I just created in Midjourney, and let me refer to my list here. So I’m gonna say “crop this image for vertical formats.” And I’m gonna add one more thing. I’m gonna say “without distorting the aspect ratio.” So sometimes when it crops, it actually squeezes. If you add a prompt like this, it’s not going to do that. And then basically my result is this download link. And if I go ahead and click on it, there we go. I got a nicely cropped image to vertical, and you could do a whole bunch of different things. I recommend you copy and paste from the list. Let me show you this one. And I asked, “Transform this photo into a color palette and export it as a PNG.” If I download this right here and look at this, this is the color palette you just created for me, and it’s based on this image. So it scanned this image, it found this color palette, so I could use this in a lot of my marketing and designs. And something really interesting happened I want to point out. Sometimes, if it finds a problem with the dataset, it actually goes and corrects it, or if it finds a problem with the way it’s going about writing the code, it will correct it on its own. So in this case, it finished the work, didn’t give me a result, but it fixed it on its own.
File Conversion:
Next on my list is file conversion. It could basically turn a song into an MP3 file for you. It could turn a JPEG into a PNG. It could convert different text files into caption files. So let me try to give it this video file. This is an mp4. This is just a music video I created in another AI app called Kaiber. I’ll go ahead and add it here. And I said, “Can you convert this to a GIF with a download link?” And it asked me, “Hey, this is a 30-second video. Do you want a shorter version of that?” And I basically had it edit my video. I said, “Yeah, from five seconds to ten seconds.” Let’s go ahead and download it, and here it is. This is a GIF version of that MP4 file, and it’s only five seconds long. It basically let me edit it and turn it into a whole different type of file just using that prompt.
QR Codes:
Next thing you could do with ChatGPT Code Interpreter is you could create QR codes that are scannable to send people to different websites, and my prompt was “Create a QR code to send people to Skillleap.ai, my website.” And it’s created that for me just like that. I could go ahead and right-click on it, save as an image, and then post it on social media or anywhere else I would like.
Financial Data:
Now, Code Interpreter could also analyze financial data, so this is useful. You could also do this with sales and marketing data too, but I’ll show you financial data right now. I downloaded this CSV file again from that same Kaggle website. This is basically Amazon stock price over time. I’m gonna start with a simple prompt. “Explain this dataset in a paragraph,” and as usual, it’s breaking this down for me. It’s a historical stock price of Amazon over time, and it’s gonna give me the start date and the closing date as well. Now, I have a lot of different prompts for analyzing financial data, so I’m gonna go ahead and take this one. “Give me the date for the highest closing price.” And that was a real simple one. Now I’m gonna give it something more visual. “Can you plot a histogram of daily returns?” And it quickly created this for me. Again, with all these, I could go ahead and save it as an image to my computer.
Making Predictions:
Now let me show you the next one. This is ChatGPT making a prediction. I’m gonna ask it, “Make a prediction of where this stock price will be in five years. Show me in a graph.” Now, different ways of asking it to make predictions. Sometimes it does it, sometimes it doesn’t do it. So let’s see what comes out of this one. And it gave me some sort of an answer after a bunch of back and forth, and he tried to project the price of the Amazon stock in one year, but he still told me it’s having issues, so I’m not really sure if this worked or not, but making predictions, it is part of what it could do, but it really depends on the dataset that you give it. So give it a try. Again, the prompt for that is just “What predictions can you make based on the dataset” or “Ask for a specific prediction and see what it could do for you.” I’m still testing this out on the prediction model, but that could be really powerful if it actually works.
Interacting with Data:
Now let me show you my favorite things, which is interacting with your dataset here using ChatGPT Code Interpreter. So I’m gonna go back to that prompt list here, and I’m gonna go ahead and export this. Usually, it’s best to not do a PDF document. It has more problems with things like that, but these kinds of CSV files for datasets, it does the best possible job. So again, my prompt is gonna be “Explain this document to me in a single paragraph.” It’s going to work, writing a little bit of code, and then I’ll get the recap here. And then I did a follow-up prompt. “What’s the main purpose of this document?” Basically the main theme, something like that could be a really good prompt from my prompt list again, and it says, “It seems to be a list of prompts for data analysis and so on.”
Visual Word Cloud:
Then I asked it to create a visual word cloud. So this is a really nice representation tool that I like to use. It basically looks into your text document or any type of document you give it, finds the most commonly used words in a word cloud. Now that document didn’t have any actual data, right? It was just text. So I could ask it those types of prompts, but I’m gonna give it one with lots of different data from my YouTube channel. And this is basically something you could download from YouTube Studio. And I did the usual, I said, “Explain this document to me.” So it basically broke that down right here. So it has lots of different things like my subscribers, estimated revenue, watch time, views.
Create Entire Presentations:
Now I’m gonna use one of my favorite prompts, which brings us to this point of using this ChatGPT code interpreter to create entire presentations. So I’m gonna take this prompt. “Can you create 10 visuals to represent the different data points presented?” Now, I didn’t ask for anything specific, so I wanna see what it thinks the 10 different data points should be, based on that table. And it gave me 10 different charts here, and I’ll kind of break down what these different charts are, but it’s a really good way for me to analyze this YouTube channel. But it gave me the 10 videos by views for a 30-day period, which is the table I gave it. The top watch time, how many views brought me the most subscribers? He gave me a view to revenue. So this shows the relationship between views and estimated revenue for each video. So this is a very practical application for me, to basically analyze all the numbers behind my YouTube channel with just one prompt that gave me a very easy output, in a couple of seconds. Then I told it, “Can you create the entire presentation?” It says, “No, I can’t create the whole presentation, but it basically told me what the slides should be in a presentation.” So it created all the slides and a little further down, I said, “Create the graphs that I can include in all the slides that it mentioned.” So all the slides that he created, I said, “Create graphs.” So all I have to do now is open some kind of a slide creator like Google Slides, and I could basically just go ahead and I have the title. Then it gave me all these as a downloadable file, and any of them I could click, I got a PNG, I could go ahead and put that into my presentation.
Analyze and Optimize Code:
And the next thing is actually using it to analyze, optimize, and help you improve your codes. So I’m gonna give it some Python code again that I got from Kaggle. So this is gonna be a.py file. So this one right here. I’ll go ahead and press enter. So as usual, I said, “Explain it to me.” It appears to be a Python code, and as usual, it’s gonna go through the whole data points and basically give me everything. And there’s a ton of things you could do here. So on my list, let me show you some of the things you could do when it comes to analyzing and optimizing code. So all these prompts are related to analyzing code, so you could get it to explain it to you. You could get the key purpose for it. You could list the different modules, extract the functions, finding errors. So this one’s really good. I like this one. “Analyze the code for potential errors.” So right here, it says, “The code does not have any glaring errors, but these are the ways to improve the code,” and it’s gonna give me a breakdown, and I could say, “Tell me more about number one or number two,” and then get it to optimize that for me. So I just said, “Help me achieve number three,” which is one of the recommendations it gave me. And then it’s gonna give me more breakdown detail of exactly what to do, and it’s writing the Python code for me. It says, “Here’s an example for image processing.” So this is really useful. Again, this is more for the developers to analyze their code, but this has the potential, if I go back to my prompt list, to basically do all kinds of different things. For example, create a flow chart to show you how the code is getting executed, even time estimation, identifying algorithms if you’re given a kind of algorithm as your code source. So lots of different ways to use it. Again, check out this page here. You could always ask ChatGPT a follow-up too. “Can you give me other ways to improve my code?” And it’s gonna give you a bunch of different suggestions after it tries to debug it and find errors for you.
I’ll also put a link in the description to SkillLeap.ai. This is an entire AI-based learning platform we rolled out that has entire courses on things like ChatGPT, Midjourney, prompt engineering, and we’re adding new tutorials and courses to it almost every single week, so make sure you check that out if you’re interested in learning AI. I hope you found this code interpreter and the prompt list useful, and I will catch you on the next video.