
ChatGPT Code Interpreter can run Python on an uploaded dataset and turn the results into charts. OpenAI began rolling out the beta to ChatGPT Plus users on the web on July 6, with the rollout continuing over the following week. Testing by All About AI explores what the tool can do with data, scripts and images, as well as where its output needs checking. Learn how uploaded files became charts and where the results fell short.
Enable Code Interpreter and Upload a File
TL;DR Key Takeaways :
- The web beta is rolling out to ChatGPT Plus subscribers.
- A sleep dataset produced charts and a written presentation, but the requested presentation images were absent.
- A Tesla chart displayed eight trades when the prompt asked for 10.
- The tool explained an uploaded script but could not interpret the tested image.
- Content-calendar analysis generated keyword visuals and video ideas that still needed editorial judgment.
Once the beta reaches your account, you can enable Code Interpreter through the Plus settings and select it for a conversation. Along with analyzing data and creating charts, the tool can edit files, perform math and convert between file formats. Follow these steps to start with an uploaded file:
- Open Settings, go to Beta features and turn on Code Interpreter.
- Select GPT-4 and then Code Interpreter.
- Use the plus sign in the chat to upload a file.
The plugin runs Python in an isolated, firewalled environment with temporary disk storage, and executed code cannot access the external internet. Its execution session persists through the conversation, subject to a maximum duration, so subsequent code can build on earlier work. GPT-4 API access is a separate topic from using Code Interpreter in ChatGPT.
Turn Sleep Data Into Charts
One test used a Kaggle dataset covering sleep, lifestyle factors and cardiovascular health. Its fields included age, occupation, sleep duration, activity and heart rate. Asked to explain the file, Code Interpreter generated Python code using pandas and identified the fields and the dataset’s general subject.
When asked about trends, it reported an average age of 42 years, average sleep of 7.13 hours and an average heart rate of about 70 beats per minute. A further prompt asked for four interesting visual displays, which covered:
- The age distribution of the individuals in the dataset.
- Sleep duration by gender, shown as a chart.
- Daily steps versus physical activity level, shown together.
- Counts of sleep disorders, including sleep apnea and insomnia.
A request for a 300-word meeting presentation with visual graphs produced a written overview of 374 individuals and a conclusion suggesting deeper investigation of correlations and trends. The images did not appear in the presentation. A draft like this could save preparation time, but anyone planning to use the graphs in a meeting would need to check the output first.
Read Python Scripts and Inspect Images
Code Interpreter can also explain an uploaded script rather than just work with a dataset. A Python script that extracted and processed trending technology news from YouTube and the web was correctly identified, with an explanation of its library imports and functions, audio transcription and YouTube video extraction. Asked for a visual representation, the tool described the flow but did not produce a good diagram.
An image test had a different limit. Given a Midjourney image of a woman looking out over New York, Code Interpreter said it could not perceive or interpret the image. It did provide the file’s size, mode and dominant colors, although those properties did not explain the scene. Computer vision capability might be added in the future.
Chart Tesla Stock Data
The stock test used a five-year Tesla dataset downloaded from Kaggle and unzipped before upload. Asked to visualize monthly prices over the last three years, Code Interpreter used the date and closing price to create a line chart. It showed a spike around 400 in late 2021 and a more recent rise, although the chart could not be hovered over for details.
In its written interpretation of the same three-year period, the tool described a generally upward trend, significant volatility and a more recent downward trend. It offered to investigate specific aspects, such as correlations with market events. A second chart marked hypothetical buy actions in green and sell actions in red to illustrate buying low and selling high. The request was for 10 perfect trades, but only eight were counted on the result.
Explore a Content Calendar
An exported Notion content calendar gave the tool another kind of file to examine. It identified the upload as an AI-focused content calendar and listed fields including name, deadline, link and media. Asked to visualize the most-used keywords in titles, it highlighted ChatGPT, GPT, AI and prompt engineering.
The tool also made correlations and brainstormed five video ideas from the titles. These included AI in interior design using Midjourney, the life cycle of an AI agent, and prompt engineering with AI agents. Most of the suggestions were not appealing enough to pursue, although the prompt-engineering idea might be worth considering.
We find the keyword chart and the stock examples useful reasons to explore uploaded files, but the missed trade count shows why the output needs a close read. A chart can address a question without meeting every part of the request. For a meeting, we would also verify that the visual material has actually made it into the presentation before relying on the draft. The script explanation is useful too, provided a requested diagram is checked for clarity.
The early tests suggest Code Interpreter is useful for exploring data and explaining scripts, provided you check the results against what you asked it to do. Its uses extend to generating files: Ethan Mollick of OneUsefulThing used it to write programs that create GIFs and PDF documentation explaining how they worked. Those examples offer another direction to explore beyond the datasets.
More on ChatGPT:
- Useful ChatGPT prompts for writing code
- Improve your productivity using ChatGPT
- How to write lyrics and songs using ChatGPT
- What is OpenAI Playground? – Playground vs ChatGPT
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.