ChatGPT Code Interpreter
Code Interpreter - which should really be called Data Interpreter - is the most important addition to the list of capabilities of ChatGPT. But most results will still be wrong without user guidance.
A few weeks ago, OpenAI made the Code Interpreter plugin available to all ChatGPT Plus subscribers.
OpenAI describes the plugin as follows:
We provide our models with a working Python interpreter in a sandboxed, firewalled execution environment, along with some ephemeral disk space. Code run by our interpreter plugin is evaluated in a persistent session that is alive for the duration of a chat conversation (with an upper-bound timeout) and subsequent calls can build on top of each other. We support uploading files to the current conversation workspace and downloading the results of your work.
There are a number of aspects here that are significant. Let’s go through them one by one and then look at a few use cases to show how powerful this is.
“We provide our models with a working Python interpreter”
This is really powerful - using regular ChatGPT, you’d have to copy the generated Python code and and execute it on your end. In Code Interpreter, the plugin will execute the code for you. This significantly speeds up development, as the model will often realize itself that something isn’t working with the provided code, and attempt to fix it.“Code run by our interpreter plugin is evaluated in a persistent session that is alive for the duration of a chat conversation”
While OpenAI does not specify the exact upper-bound timeout, it seems to prevent the kind of “forgetting” that can easily happen in a regular coding session with the standard ChatGPT model. Indeed, it’s presumably exactly because that kind of forgetting is so common, due to the current context length limits of the various models, that OpenAI enabled a quasi-permanent session for Code Interpreter. Again, this will significantly speed up development as you won’t have to remind the model again and again about your data or code.“We support uploading files to the current conversation workspace and downloading the results of your work”
File upload has so far been impossible with ChatGPT, and this capability thus significantly enhances the functionality of Code Interpreter, when compared to ChatGPT. It is very much this capability that leads me to say it would be more meaningful to call this plugin Data Interpreter.
Demo Time
My early explorations of Code Interpreter turned out to be quite interesting. It’s an incredibly powerful tool if you don’t make a key mistake.
Keep reading with a 7-day free trial
Subscribe to Prompt Engineering to keep reading this post and get 7 days of free access to the full post archives.